From 280e91b026653af77296b5feb54f16d85973b104 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 15 Apr 2021 15:08:10 -0700 Subject: scsi: core: Modify the scsi_send_eh_cmnd() return value for the SDEV_BLOCK case The comment above scsi_send_eh_cmnd() says: "Returns SUCCESS or FAILED or NEEDS_RETRY". This patch makes all values returned by scsi_send_eh_cmnd() match the documentation of this function. This change does not affect the behavior of scsi_eh_tur() nor of scsi_eh_try_stu() nor of the scsi_request_sense() callers. See also commit bbe9fb0d04b9 ("scsi: Avoid that .queuecommand() gets called for a blocked SCSI device"; v5.3). Link: https://lore.kernel.org/r/20210415220826.29438-5-bvanassche@acm.org Cc: Christoph Hellwig Cc: Johannes Thumshirn Cc: Hannes Reinecke Cc: Daniel Wagner Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen --- drivers/scsi/scsi_error.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 08c06c56331c..271718e888d1 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -1109,7 +1109,7 @@ retry: if (sdev->sdev_state != SDEV_BLOCK) rtn = shost->hostt->queuecommand(shost, scmd); else - rtn = SCSI_MLQUEUE_DEVICE_BUSY; + rtn = FAILED; mutex_unlock(&sdev->state_mutex); if (rtn) { -- cgit v1.2.3