aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sd.c
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2008-12-04 00:24:39 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-12-29 12:24:24 -0500
commitf4f4e47e4af6b02dd1c425b931c65d0165356e33 (patch)
tree1bca97ce56703d7a101674cf6bf0d28576cf7201 /drivers/scsi/sd.c
parenta528ab7a324f1dbb3598ae0ecd238ab7dd974294 (diff)
[SCSI] add residual argument to scsi_execute and scsi_execute_req
scsi_execute() and scsi_execute_req() discard the residual length information. Some callers need it. This adds residual argument (optional) to scsi_execute and scsi_execute_req. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r--drivers/scsi/sd.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 5081b3981d3c..62b28d58e65e 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -884,7 +884,7 @@ static int sd_sync_cache(struct scsi_disk *sdkp)
884 * flush everything. 884 * flush everything.
885 */ 885 */
886 res = scsi_execute_req(sdp, cmd, DMA_NONE, NULL, 0, &sshdr, 886 res = scsi_execute_req(sdp, cmd, DMA_NONE, NULL, 0, &sshdr,
887 SD_TIMEOUT, SD_MAX_RETRIES); 887 SD_TIMEOUT, SD_MAX_RETRIES, NULL);
888 if (res == 0) 888 if (res == 0)
889 break; 889 break;
890 } 890 }
@@ -1134,7 +1134,7 @@ sd_spinup_disk(struct scsi_disk *sdkp)
1134 the_result = scsi_execute_req(sdkp->device, cmd, 1134 the_result = scsi_execute_req(sdkp->device, cmd,
1135 DMA_NONE, NULL, 0, 1135 DMA_NONE, NULL, 0,
1136 &sshdr, SD_TIMEOUT, 1136 &sshdr, SD_TIMEOUT,
1137 SD_MAX_RETRIES); 1137 SD_MAX_RETRIES, NULL);
1138 1138
1139 /* 1139 /*
1140 * If the drive has indicated to us that it 1140 * If the drive has indicated to us that it
@@ -1192,7 +1192,8 @@ sd_spinup_disk(struct scsi_disk *sdkp)
1192 cmd[4] |= 1 << 4; 1192 cmd[4] |= 1 << 4;
1193 scsi_execute_req(sdkp->device, cmd, DMA_NONE, 1193 scsi_execute_req(sdkp->device, cmd, DMA_NONE,
1194 NULL, 0, &sshdr, 1194 NULL, 0, &sshdr,
1195 SD_TIMEOUT, SD_MAX_RETRIES); 1195 SD_TIMEOUT, SD_MAX_RETRIES,
1196 NULL);
1196 spintime_expire = jiffies + 100 * HZ; 1197 spintime_expire = jiffies + 100 * HZ;
1197 spintime = 1; 1198 spintime = 1;
1198 } 1199 }
@@ -1306,7 +1307,7 @@ repeat:
1306 1307
1307 the_result = scsi_execute_req(sdp, cmd, DMA_FROM_DEVICE, 1308 the_result = scsi_execute_req(sdp, cmd, DMA_FROM_DEVICE,
1308 buffer, longrc ? 13 : 8, &sshdr, 1309 buffer, longrc ? 13 : 8, &sshdr,
1309 SD_TIMEOUT, SD_MAX_RETRIES); 1310 SD_TIMEOUT, SD_MAX_RETRIES, NULL);
1310 1311
1311 if (media_not_present(sdkp, &sshdr)) 1312 if (media_not_present(sdkp, &sshdr))
1312 return; 1313 return;
@@ -1986,7 +1987,7 @@ static int sd_start_stop_device(struct scsi_disk *sdkp, int start)
1986 return -ENODEV; 1987 return -ENODEV;
1987 1988
1988 res = scsi_execute_req(sdp, cmd, DMA_NONE, NULL, 0, &sshdr, 1989 res = scsi_execute_req(sdp, cmd, DMA_NONE, NULL, 0, &sshdr,
1989 SD_TIMEOUT, SD_MAX_RETRIES); 1990 SD_TIMEOUT, SD_MAX_RETRIES, NULL);
1990 if (res) { 1991 if (res) {
1991 sd_printk(KERN_WARNING, sdkp, "START_STOP FAILED\n"); 1992 sd_printk(KERN_WARNING, sdkp, "START_STOP FAILED\n");
1992 sd_print_result(sdkp, res); 1993 sd_print_result(sdkp, res);