Scroll to navigation

SCSI_EXECUTE(9) SCSI mid layer SCSI_EXECUTE(9)

NAME

scsi_execute - insert request and wait for the result

SYNOPSIS

int scsi_execute(struct scsi_device * sdev, const unsigned char * cmd, int data_direction, void * buffer, unsigned bufflen, unsigned char * sense, struct scsi_sense_hdr * sshdr, int timeout, int retries, u64 flags, req_flags_t rq_flags, int * resid);

ARGUMENTS

struct scsi_device * sdev

scsi device

const unsigned char * cmd

scsi command

int data_direction

data direction

void * buffer

data buffer

unsigned bufflen

len of buffer

unsigned char * sense

optional sense buffer

struct scsi_sense_hdr * sshdr

optional decoded sense header

int timeout

request timeout in seconds

int retries

number of times to retry request

u64 flags

flags for ->cmd_flags

req_flags_t rq_flags

flags for ->rq_flags

int * resid

optional residual length

DESCRIPTION

returns the req->errors value which is the scsi_cmnd result field.

AUTHORS

James Bottomley <James.Bottomley@hansenpartnership.com>

Author.

Rob Landley <rob@landley.net>

Author.

COPYRIGHT

June 2017 Kernel Hackers Manual 4.11