summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mpi3mr
diff options
context:
space:
mode:
authorSreekanth Reddy <sreekanth.reddy@broadcom.com>2022-05-06 00:18:06 +0530
committerMartin K. Petersen <martin.petersen@oracle.com>2022-05-10 22:28:21 -0400
commit256bd4f23d9cecaba2e6795f0058fa9c2362698c (patch)
treeea524cf6fcbdd35c20b169e25ca8d7a7d3e2a628 /drivers/scsi/mpi3mr
parent2dd8389f96d6d00a24816888262e33a85d414c05 (diff)
downloadlinux-256bd4f23d9cecaba2e6795f0058fa9c2362698c.tar.bz2
scsi: mpi3mr: Return I/Os to an unrecoverable HBA with DID_ERROR
Complete all new I/O requests issued to an unrecoverable controller with DID_ERROR status instead of returning the I/O requests with SCSI_MLQUEUE_HOST_BUSY. This will prevent the infinite retries of the new I/Os when a controller is in an unrecoverable state. Link: https://lore.kernel.org/r/20220505184808.24049-1-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/mpi3mr')
-rw-r--r--drivers/scsi/mpi3mr/mpi3mr_os.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c
index 70da6d8e7c3c..f5c345d1ffa1 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_os.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_os.c
@@ -4002,6 +4002,12 @@ static int mpi3mr_qcmd(struct Scsi_Host *shost,
int iprio_class;
u8 is_pcie_dev = 0;
+ if (mrioc->unrecoverable) {
+ scmd->result = DID_ERROR << 16;
+ scsi_done(scmd);
+ goto out;
+ }
+
sdev_priv_data = scmd->device->hostdata;
if (!sdev_priv_data || !sdev_priv_data->tgt_priv_data) {
scmd->result = DID_NO_CONNECT << 16;