aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_ioctl.c
diff options
context:
space:
mode:
authorJames Bottomley <jejb@titanic.(none)>2005-08-28 11:33:52 -0500
committerJames Bottomley <jejb@titanic.(none)>2005-08-28 11:33:52 -0500
commitea73a9f23906c374b697cd5b0d64f6dceced63de (patch)
treec000be3180caccc6d484aad0f82f58d733358622 /drivers/scsi/scsi_ioctl.c
parent33aa687db90dd8541bd5e9a762eebf880eaee767 (diff)
downloadkernel_samsung_crespo-ea73a9f23906c374b697cd5b0d64f6dceced63de.zip
kernel_samsung_crespo-ea73a9f23906c374b697cd5b0d64f6dceced63de.tar.gz
kernel_samsung_crespo-ea73a9f23906c374b697cd5b0d64f6dceced63de.tar.bz2
[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>
Diffstat (limited to 'drivers/scsi/scsi_ioctl.c')
-rw-r--r--drivers/scsi/scsi_ioctl.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/scsi/scsi_ioctl.c b/drivers/scsi/scsi_ioctl.c
index 5f399c9..179a767 100644
--- a/drivers/scsi/scsi_ioctl.c
+++ b/drivers/scsi/scsi_ioctl.c
@@ -90,19 +90,16 @@ static int ioctl_internal_command(struct scsi_device *sdev, char *cmd,
{
int result;
struct scsi_sense_hdr sshdr;
- char sense[SCSI_SENSE_BUFFERSIZE];
SCSI_LOG_IOCTL(1, printk("Trying ioctl with scsi command %d\n", *cmd));
-
- memset(sense, 0, sizeof(*sense));
result = scsi_execute_req(sdev, cmd, DMA_NONE, NULL, 0,
- sense, timeout, retries);
+ &sshdr, timeout, retries);
SCSI_LOG_IOCTL(2, printk("Ioctl returned 0x%x\n", result));
if ((driver_byte(result) & DRIVER_SENSE) &&
- (scsi_normalize_sense(sense, sizeof(*sense), &sshdr))) {
+ (scsi_sense_valid(&sshdr))) {
switch (sshdr.sense_key) {
case ILLEGAL_REQUEST:
if (cmd[0] == ALLOW_MEDIUM_REMOVAL)
@@ -132,7 +129,7 @@ static int ioctl_internal_command(struct scsi_device *sdev, char *cmd,
sdev->id,
sdev->lun,
result);
- __scsi_print_sense(" ", sense, sizeof(*sense));
+ scsi_print_sense_hdr(" ", &sshdr);
break;
}
}
@@ -315,9 +312,9 @@ int scsi_ioctl_send_command(struct scsi_device *sdev,
break;
}
- result = scsi_execute_req(sdev, cmd, data_direction, buf, needed,
- sense, timeout, retries);
-
+ result = scsi_execute(sdev, cmd, data_direction, buf, needed,
+ sense, timeout, retries, 0);
+
/*
* If there was an error condition, pass the info back to the user.
*/