summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/hpsa.c4
-rw-r--r--drivers/scsi/scsi.c2
-rw-r--r--drivers/scsi/scsi_error.c4
-rw-r--r--drivers/scsi/scsi_lib.c6
-rw-r--r--drivers/scsi/smartpqi/smartpqi_init.c2
-rw-r--r--drivers/scsi/sun3_scsi.c2
6 files changed, 10 insertions, 10 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index cbc0c5fe5a60..c611412a8de9 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -5539,8 +5539,8 @@ static int hpsa_scsi_queue_command(struct Scsi_Host *sh, struct scsi_cmnd *cmd)
5539 * Retries always go down the normal I/O path. 5539 * Retries always go down the normal I/O path.
5540 */ 5540 */
5541 if (likely(cmd->retries == 0 && 5541 if (likely(cmd->retries == 0 &&
5542 cmd->request->cmd_type == REQ_TYPE_FS && 5542 !blk_rq_is_passthrough(cmd->request) &&
5543 h->acciopath_status)) { 5543 h->acciopath_status)) {
5544 rc = hpsa_ioaccel_submit(h, c, cmd, scsi3addr); 5544 rc = hpsa_ioaccel_submit(h, c, cmd, scsi3addr);
5545 if (rc == 0) 5545 if (rc == 0)
5546 return 0; 5546 return 0;
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 3d8d2153b448..7bfbcfa7af40 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -238,7 +238,7 @@ void scsi_finish_command(struct scsi_cmnd *cmd)
238 "(result %x)\n", cmd->result)); 238 "(result %x)\n", cmd->result));
239 239
240 good_bytes = scsi_bufflen(cmd); 240 good_bytes = scsi_bufflen(cmd);
241 if (cmd->request->cmd_type != REQ_TYPE_BLOCK_PC) { 241 if (!blk_rq_is_passthrough(cmd->request)) {
242 int old_good_bytes = good_bytes; 242 int old_good_bytes = good_bytes;
243 drv = scsi_cmd_to_driver(cmd); 243 drv = scsi_cmd_to_driver(cmd);
244 if (drv->done) 244 if (drv->done)
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index 4b40f746d534..b4ce7bb5d2a9 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -1106,7 +1106,7 @@ static int scsi_request_sense(struct scsi_cmnd *scmd)
1106 1106
1107static int scsi_eh_action(struct scsi_cmnd *scmd, int rtn) 1107static int scsi_eh_action(struct scsi_cmnd *scmd, int rtn)
1108{ 1108{
1109 if (scmd->request->cmd_type != REQ_TYPE_BLOCK_PC) { 1109 if (!blk_rq_is_passthrough(scmd->request)) {
1110 struct scsi_driver *sdrv = scsi_cmd_to_driver(scmd); 1110 struct scsi_driver *sdrv = scsi_cmd_to_driver(scmd);
1111 if (sdrv->eh_action) 1111 if (sdrv->eh_action)
1112 rtn = sdrv->eh_action(scmd, rtn); 1112 rtn = sdrv->eh_action(scmd, rtn);
@@ -1746,7 +1746,7 @@ check_type:
1746 * the check condition was retryable. 1746 * the check condition was retryable.
1747 */ 1747 */
1748 if (scmd->request->cmd_flags & REQ_FAILFAST_DEV || 1748 if (scmd->request->cmd_flags & REQ_FAILFAST_DEV ||
1749 scmd->request->cmd_type == REQ_TYPE_BLOCK_PC) 1749 blk_rq_is_passthrough(scmd->request))
1750 return 1; 1750 return 1;
1751 else 1751 else
1752 return 0; 1752 return 0;
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 8188e5c71f75..31629a7b728d 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -582,7 +582,7 @@ void scsi_run_host_queues(struct Scsi_Host *shost)
582 582
583static void scsi_uninit_cmd(struct scsi_cmnd *cmd) 583static void scsi_uninit_cmd(struct scsi_cmnd *cmd)
584{ 584{
585 if (cmd->request->cmd_type == REQ_TYPE_FS) { 585 if (!blk_rq_is_passthrough(cmd->request)) {
586 struct scsi_driver *drv = scsi_cmd_to_driver(cmd); 586 struct scsi_driver *drv = scsi_cmd_to_driver(cmd);
587 587
588 if (drv->uninit_command) 588 if (drv->uninit_command)
@@ -806,7 +806,7 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes)
806 sense_deferred = scsi_sense_is_deferred(&sshdr); 806 sense_deferred = scsi_sense_is_deferred(&sshdr);
807 } 807 }
808 808
809 if (req->cmd_type == REQ_TYPE_BLOCK_PC) { /* SG_IO ioctl from block level */ 809 if (blk_rq_is_passthrough(req)) {
810 if (result) { 810 if (result) {
811 if (sense_valid) { 811 if (sense_valid) {
812 /* 812 /*
@@ -847,7 +847,7 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes)
847 error = __scsi_error_from_host_byte(cmd, result); 847 error = __scsi_error_from_host_byte(cmd, result);
848 } 848 }
849 849
850 /* no bidi support for !REQ_TYPE_BLOCK_PC yet */ 850 /* no bidi support for !blk_rq_is_passthrough yet */
851 BUG_ON(blk_bidi_rq(req)); 851 BUG_ON(blk_bidi_rq(req));
852 852
853 /* 853 /*
diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c
index 8702d9cf8040..11c0dfb3dfa3 100644
--- a/drivers/scsi/smartpqi/smartpqi_init.c
+++ b/drivers/scsi/smartpqi/smartpqi_init.c
@@ -4499,7 +4499,7 @@ static int pqi_scsi_queue_command(struct Scsi_Host *shost,
4499 if (pqi_is_logical_device(device)) { 4499 if (pqi_is_logical_device(device)) {
4500 raid_bypassed = false; 4500 raid_bypassed = false;
4501 if (device->offload_enabled && 4501 if (device->offload_enabled &&
4502 scmd->request->cmd_type == REQ_TYPE_FS) { 4502 !blk_rq_is_passthrough(scmd->request)) {
4503 rc = pqi_raid_bypass_submit_scsi_cmd(ctrl_info, device, 4503 rc = pqi_raid_bypass_submit_scsi_cmd(ctrl_info, device,
4504 scmd, queue_group); 4504 scmd, queue_group);
4505 if (rc == 0 || 4505 if (rc == 0 ||
diff --git a/drivers/scsi/sun3_scsi.c b/drivers/scsi/sun3_scsi.c
index 88db6992420e..bcf7d05d1aab 100644
--- a/drivers/scsi/sun3_scsi.c
+++ b/drivers/scsi/sun3_scsi.c
@@ -260,7 +260,7 @@ static int sun3scsi_dma_xfer_len(struct NCR5380_hostdata *hostdata,
260{ 260{
261 int wanted_len = cmd->SCp.this_residual; 261 int wanted_len = cmd->SCp.this_residual;
262 262
263 if (wanted_len < DMA_MIN_SIZE || cmd->request->cmd_type != REQ_TYPE_FS) 263 if (wanted_len < DMA_MIN_SIZE || blk_rq_is_passthrough(cmd->request))
264 return 0; 264 return 0;
265 265
266 return wanted_len; 266 return wanted_len;