aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/device_handler/scsi_dh_alua.c16
-rw-r--r--drivers/scsi/device_handler/scsi_dh_emc.c7
-rw-r--r--drivers/scsi/device_handler/scsi_dh_hp_sw.c10
-rw-r--r--drivers/scsi/device_handler/scsi_dh_rdac.c7
-rw-r--r--drivers/scsi/scsi_lib.c11
-rw-r--r--drivers/scsi/sd.c9
-rw-r--r--drivers/scsi/ufs/ufshcd.c10
-rw-r--r--include/scsi/scsi_device.h8
8 files changed, 27 insertions, 51 deletions
diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c
index d704752b6332..48e200102221 100644
--- a/drivers/scsi/device_handler/scsi_dh_alua.c
+++ b/drivers/scsi/device_handler/scsi_dh_alua.c
@@ -151,11 +151,9 @@ static int submit_rtpg(struct scsi_device *sdev, unsigned char *buff,
151 cdb[1] = MI_REPORT_TARGET_PGS; 151 cdb[1] = MI_REPORT_TARGET_PGS;
152 put_unaligned_be32(bufflen, &cdb[6]); 152 put_unaligned_be32(bufflen, &cdb[6]);
153 153
154 return scsi_execute_req_flags(sdev, cdb, DMA_FROM_DEVICE, 154 return scsi_execute(sdev, cdb, DMA_FROM_DEVICE, buff, bufflen, NULL,
155 buff, bufflen, sshdr, 155 sshdr, ALUA_FAILOVER_TIMEOUT * HZ,
156 ALUA_FAILOVER_TIMEOUT * HZ, 156 ALUA_FAILOVER_RETRIES, req_flags, 0, NULL);
157 ALUA_FAILOVER_RETRIES, NULL,
158 req_flags, 0);
159} 157}
160 158
161/* 159/*
@@ -185,11 +183,9 @@ static int submit_stpg(struct scsi_device *sdev, int group_id,
185 cdb[1] = MO_SET_TARGET_PGS; 183 cdb[1] = MO_SET_TARGET_PGS;
186 put_unaligned_be32(stpg_len, &cdb[6]); 184 put_unaligned_be32(stpg_len, &cdb[6]);
187 185
188 return scsi_execute_req_flags(sdev, cdb, DMA_TO_DEVICE, 186 return scsi_execute(sdev, cdb, DMA_TO_DEVICE, stpg_data, stpg_len, NULL,
189 stpg_data, stpg_len, 187 sshdr, ALUA_FAILOVER_TIMEOUT * HZ,
190 sshdr, ALUA_FAILOVER_TIMEOUT * HZ, 188 ALUA_FAILOVER_RETRIES, req_flags, 0, NULL);
191 ALUA_FAILOVER_RETRIES, NULL,
192 req_flags, 0);
193} 189}
194 190
195static struct alua_port_group *alua_find_get_pg(char *id_str, size_t id_size, 191static struct alua_port_group *alua_find_get_pg(char *id_str, size_t id_size,
diff --git a/drivers/scsi/device_handler/scsi_dh_emc.c b/drivers/scsi/device_handler/scsi_dh_emc.c
index f1578832ec7a..8654e940e1a8 100644
--- a/drivers/scsi/device_handler/scsi_dh_emc.c
+++ b/drivers/scsi/device_handler/scsi_dh_emc.c
@@ -276,10 +276,9 @@ static int send_trespass_cmd(struct scsi_device *sdev,
276 BUG_ON((len > CLARIION_BUFFER_SIZE)); 276 BUG_ON((len > CLARIION_BUFFER_SIZE));
277 memcpy(csdev->buffer, page22, len); 277 memcpy(csdev->buffer, page22, len);
278 278
279 err = scsi_execute_req_flags(sdev, cdb, DMA_TO_DEVICE, 279 err = scsi_execute(sdev, cdb, DMA_TO_DEVICE, csdev->buffer, len, NULL,
280 csdev->buffer, len, &sshdr, 280 &sshdr, CLARIION_TIMEOUT * HZ, CLARIION_RETRIES,
281 CLARIION_TIMEOUT * HZ, CLARIION_RETRIES, 281 req_flags, 0, NULL);
282 NULL, req_flags, 0);
283 if (err) { 282 if (err) {
284 if (scsi_sense_valid(&sshdr)) 283 if (scsi_sense_valid(&sshdr))
285 res = trespass_endio(sdev, &sshdr); 284 res = trespass_endio(sdev, &sshdr);
diff --git a/drivers/scsi/device_handler/scsi_dh_hp_sw.c b/drivers/scsi/device_handler/scsi_dh_hp_sw.c
index be43c940636d..62d314e07d11 100644
--- a/drivers/scsi/device_handler/scsi_dh_hp_sw.c
+++ b/drivers/scsi/device_handler/scsi_dh_hp_sw.c
@@ -100,9 +100,8 @@ static int hp_sw_tur(struct scsi_device *sdev, struct hp_sw_dh_data *h)
100 REQ_FAILFAST_DRIVER; 100 REQ_FAILFAST_DRIVER;
101 101
102retry: 102retry:
103 res = scsi_execute_req_flags(sdev, cmd, DMA_NONE, NULL, 0, &sshdr, 103 res = scsi_execute(sdev, cmd, DMA_NONE, NULL, 0, NULL, &sshdr,
104 HP_SW_TIMEOUT, HP_SW_RETRIES, 104 HP_SW_TIMEOUT, HP_SW_RETRIES, req_flags, 0, NULL);
105 NULL, req_flags, 0);
106 if (res) { 105 if (res) {
107 if (scsi_sense_valid(&sshdr)) 106 if (scsi_sense_valid(&sshdr))
108 ret = tur_done(sdev, h, &sshdr); 107 ret = tur_done(sdev, h, &sshdr);
@@ -139,9 +138,8 @@ static int hp_sw_start_stop(struct hp_sw_dh_data *h)
139 REQ_FAILFAST_DRIVER; 138 REQ_FAILFAST_DRIVER;
140 139
141retry: 140retry:
142 res = scsi_execute_req_flags(sdev, cmd, DMA_NONE, NULL, 0, &sshdr, 141 res = scsi_execute(sdev, cmd, DMA_NONE, NULL, 0, NULL, &sshdr,
143 HP_SW_TIMEOUT, HP_SW_RETRIES, 142 HP_SW_TIMEOUT, HP_SW_RETRIES, req_flags, 0, NULL);
144 NULL, req_flags, 0);
145 if (res) { 143 if (res) {
146 if (!scsi_sense_valid(&sshdr)) { 144 if (!scsi_sense_valid(&sshdr)) {
147 sdev_printk(KERN_WARNING, sdev, 145 sdev_printk(KERN_WARNING, sdev,
diff --git a/drivers/scsi/device_handler/scsi_dh_rdac.c b/drivers/scsi/device_handler/scsi_dh_rdac.c
index b64eaae8533d..3cbab8710e58 100644
--- a/drivers/scsi/device_handler/scsi_dh_rdac.c
+++ b/drivers/scsi/device_handler/scsi_dh_rdac.c
@@ -555,10 +555,9 @@ static void send_mode_select(struct work_struct *work)
555 (char *) h->ctlr->array_name, h->ctlr->index, 555 (char *) h->ctlr->array_name, h->ctlr->index,
556 (retry_cnt == RDAC_RETRY_COUNT) ? "queueing" : "retrying"); 556 (retry_cnt == RDAC_RETRY_COUNT) ? "queueing" : "retrying");
557 557
558 if (scsi_execute_req_flags(sdev, cdb, DMA_TO_DEVICE, 558 if (scsi_execute(sdev, cdb, DMA_TO_DEVICE, &h->ctlr->mode_select,
559 &h->ctlr->mode_select, data_size, &sshdr, 559 data_size, NULL, &sshdr, RDAC_TIMEOUT * HZ,
560 RDAC_TIMEOUT * HZ, 560 RDAC_RETRIES, req_flags, 0, NULL)) {
561 RDAC_RETRIES, NULL, req_flags, 0)) {
562 err = mode_select_handle_sense(sdev, &sshdr); 561 err = mode_select_handle_sense(sdev, &sshdr);
563 if (err == SCSI_DH_RETRY && retry_cnt--) 562 if (err == SCSI_DH_RETRY && retry_cnt--)
564 goto retry; 563 goto retry;
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index b0cb3e0713f3..f5e45a252485 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -289,17 +289,6 @@ int scsi_execute(struct scsi_device *sdev, const unsigned char *cmd,
289} 289}
290EXPORT_SYMBOL(scsi_execute); 290EXPORT_SYMBOL(scsi_execute);
291 291
292int scsi_execute_req_flags(struct scsi_device *sdev, const unsigned char *cmd,
293 int data_direction, void *buffer, unsigned bufflen,
294 struct scsi_sense_hdr *sshdr, int timeout, int retries,
295 int *resid, u64 flags, req_flags_t rq_flags)
296{
297 return scsi_execute(sdev, cmd, data_direction, buffer, bufflen,
298 NULL, sshdr, timeout, retries, flags, rq_flags,
299 resid);
300}
301EXPORT_SYMBOL(scsi_execute_req_flags);
302
303/* 292/*
304 * Function: scsi_init_cmd_errh() 293 * Function: scsi_init_cmd_errh()
305 * 294 *
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index be535d4215c4..c7839f6c35cc 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -1508,9 +1508,8 @@ static int sd_sync_cache(struct scsi_disk *sdkp)
1508 * Leave the rest of the command zero to indicate 1508 * Leave the rest of the command zero to indicate
1509 * flush everything. 1509 * flush everything.
1510 */ 1510 */
1511 res = scsi_execute_req_flags(sdp, cmd, DMA_NONE, NULL, 0, 1511 res = scsi_execute(sdp, cmd, DMA_NONE, NULL, 0, NULL, &sshdr,
1512 &sshdr, timeout, SD_MAX_RETRIES, 1512 timeout, SD_MAX_RETRIES, 0, RQF_PM, NULL);
1513 NULL, 0, RQF_PM);
1514 if (res == 0) 1513 if (res == 0)
1515 break; 1514 break;
1516 } 1515 }
@@ -3296,8 +3295,8 @@ static int sd_start_stop_device(struct scsi_disk *sdkp, int start)
3296 if (!scsi_device_online(sdp)) 3295 if (!scsi_device_online(sdp))
3297 return -ENODEV; 3296 return -ENODEV;
3298 3297
3299 res = scsi_execute_req_flags(sdp, cmd, DMA_NONE, NULL, 0, &sshdr, 3298 res = scsi_execute(sdp, cmd, DMA_NONE, NULL, 0, NULL, &sshdr,
3300 SD_TIMEOUT, SD_MAX_RETRIES, NULL, 0, RQF_PM); 3299 SD_TIMEOUT, SD_MAX_RETRIES, 0, RQF_PM, NULL);
3301 if (res) { 3300 if (res) {
3302 sd_print_result(sdkp, "Start/Stop Unit failed", res); 3301 sd_print_result(sdkp, "Start/Stop Unit failed", res);
3303 if (driver_byte(res) & DRIVER_SENSE) 3302 if (driver_byte(res) & DRIVER_SENSE)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 8b721f431dd0..dc6efbd1be8e 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -6915,9 +6915,9 @@ ufshcd_send_request_sense(struct ufs_hba *hba, struct scsi_device *sdp)
6915 goto out; 6915 goto out;
6916 } 6916 }
6917 6917
6918 ret = scsi_execute_req_flags(sdp, cmd, DMA_FROM_DEVICE, buffer, 6918 ret = scsi_execute(sdp, cmd, DMA_FROM_DEVICE, buffer,
6919 UFSHCD_REQ_SENSE_SIZE, NULL, 6919 UFSHCD_REQ_SENSE_SIZE, NULL, NULL,
6920 msecs_to_jiffies(1000), 3, NULL, 0, RQF_PM); 6920 msecs_to_jiffies(1000), 3, 0, RQF_PM, NULL);
6921 if (ret) 6921 if (ret)
6922 pr_err("%s: failed with err %d\n", __func__, ret); 6922 pr_err("%s: failed with err %d\n", __func__, ret);
6923 6923
@@ -6982,8 +6982,8 @@ static int ufshcd_set_dev_pwr_mode(struct ufs_hba *hba,
6982 * callbacks hence set the RQF_PM flag so that it doesn't resume the 6982 * callbacks hence set the RQF_PM flag so that it doesn't resume the
6983 * already suspended childs. 6983 * already suspended childs.
6984 */ 6984 */
6985 ret = scsi_execute_req_flags(sdp, cmd, DMA_NONE, NULL, 0, &sshdr, 6985 ret = scsi_execute(sdp, cmd, DMA_NONE, NULL, 0, NULL, &sshdr,
6986 START_STOP_TIMEOUT, 0, NULL, 0, RQF_PM); 6986 START_STOP_TIMEOUT, 0, 0, RQF_PM, NULL);
6987 if (ret) { 6987 if (ret) {
6988 sdev_printk(KERN_WARNING, sdp, 6988 sdev_printk(KERN_WARNING, sdp,
6989 "START_STOP failed for power mode: %d, result %x\n", 6989 "START_STOP failed for power mode: %d, result %x\n",
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
index cb4c8c889da0..6f22b39f1b0c 100644
--- a/include/scsi/scsi_device.h
+++ b/include/scsi/scsi_device.h
@@ -413,17 +413,13 @@ extern int scsi_execute(struct scsi_device *sdev, const unsigned char *cmd,
413 unsigned char *sense, struct scsi_sense_hdr *sshdr, 413 unsigned char *sense, struct scsi_sense_hdr *sshdr,
414 int timeout, int retries, u64 flags, 414 int timeout, int retries, u64 flags,
415 req_flags_t rq_flags, int *resid); 415 req_flags_t rq_flags, int *resid);
416extern int scsi_execute_req_flags(struct scsi_device *sdev,
417 const unsigned char *cmd, int data_direction, void *buffer,
418 unsigned bufflen, struct scsi_sense_hdr *sshdr, int timeout,
419 int retries, int *resid, u64 flags, req_flags_t rq_flags);
420static inline int scsi_execute_req(struct scsi_device *sdev, 416static inline int scsi_execute_req(struct scsi_device *sdev,
421 const unsigned char *cmd, int data_direction, void *buffer, 417 const unsigned char *cmd, int data_direction, void *buffer,
422 unsigned bufflen, struct scsi_sense_hdr *sshdr, int timeout, 418 unsigned bufflen, struct scsi_sense_hdr *sshdr, int timeout,
423 int retries, int *resid) 419 int retries, int *resid)
424{ 420{
425 return scsi_execute_req_flags(sdev, cmd, data_direction, buffer, 421 return scsi_execute(sdev, cmd, data_direction, buffer,
426 bufflen, sshdr, timeout, retries, resid, 0, 0); 422 bufflen, NULL, sshdr, timeout, retries, 0, 0, resid);
427} 423}
428extern void sdev_disable_disk_events(struct scsi_device *sdev); 424extern void sdev_disable_disk_events(struct scsi_device *sdev);
429extern void sdev_enable_disk_events(struct scsi_device *sdev); 425extern void sdev_enable_disk_events(struct scsi_device *sdev);