aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/scsi.c')
-rw-r--r--drivers/scsi/scsi.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index dbeb86cafc0d..2ac3cb2b9081 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -668,13 +668,14 @@ int scsi_dispatch_cmd(struct scsi_cmnd *cmd)
668 goto out; 668 goto out;
669 } 669 }
670 670
671 /* Check to see if the scsi lld put this device into state SDEV_BLOCK. */ 671 /* Check to see if the scsi lld made this device blocked. */
672 if (unlikely(cmd->device->sdev_state == SDEV_BLOCK)) { 672 if (unlikely(scsi_device_blocked(cmd->device))) {
673 /* 673 /*
674 * in SDEV_BLOCK, the command is just put back on the device 674 * in blocked state, the command is just put back on
675 * queue. The suspend state has already blocked the queue so 675 * the device queue. The suspend state has already
676 * future requests should not occur until the device 676 * blocked the queue so future requests should not
677 * transitions out of the suspend state. 677 * occur until the device transitions out of the
678 * suspend state.
678 */ 679 */
679 680
680 scsi_queue_insert(cmd, SCSI_MLQUEUE_DEVICE_BUSY); 681 scsi_queue_insert(cmd, SCSI_MLQUEUE_DEVICE_BUSY);