[SCSI] convert sd to scsi_execute_req (and update the scsi_execute_req API)
This one removes struct scsi_request entirely from sd. In the process, I noticed we have no callers of scsi_wait_req who don't immediately normalise the sense, so I updated the API to make it take a struct scsi_sense_hdr instead of simply a big sense buffer. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This commit is contained in:
@ -9,6 +9,7 @@
|
||||
struct request_queue;
|
||||
struct scsi_cmnd;
|
||||
struct scsi_lun;
|
||||
struct scsi_sense_hdr;
|
||||
|
||||
struct scsi_mode_data {
|
||||
__u32 length;
|
||||
@ -237,7 +238,7 @@ extern int scsi_set_medium_removal(struct scsi_device *, char);
|
||||
extern int scsi_mode_sense(struct scsi_device *sdev, int dbd, int modepage,
|
||||
unsigned char *buffer, int len, int timeout,
|
||||
int retries, struct scsi_mode_data *data,
|
||||
char *sense);
|
||||
struct scsi_sense_hdr *);
|
||||
extern int scsi_test_unit_ready(struct scsi_device *sdev, int timeout,
|
||||
int retries);
|
||||
extern int scsi_device_set_state(struct scsi_device *sdev,
|
||||
@ -260,15 +261,10 @@ extern int scsi_execute(struct scsi_device *sdev, const unsigned char *cmd,
|
||||
int data_direction, void *buffer, unsigned bufflen,
|
||||
unsigned char *sense, int timeout, int retries,
|
||||
int flag);
|
||||
extern int scsi_execute_req(struct scsi_device *sdev, const unsigned char *cmd,
|
||||
int data_direction, void *buffer, unsigned bufflen,
|
||||
struct scsi_sense_hdr *, int timeout, int retries);
|
||||
|
||||
static inline int
|
||||
scsi_execute_req(struct scsi_device *sdev, const unsigned char *cmd,
|
||||
int data_direction, void *buffer, unsigned bufflen,
|
||||
unsigned char *sense, int timeout, int retries)
|
||||
{
|
||||
return scsi_execute(sdev, cmd, data_direction, buffer, bufflen, sense,
|
||||
timeout, retries, 0);
|
||||
}
|
||||
static inline int scsi_device_online(struct scsi_device *sdev)
|
||||
{
|
||||
return sdev->sdev_state != SDEV_OFFLINE;
|
||||
|
Reference in New Issue
Block a user