public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mpi3mr: Return IOs to an unrecoverable HBA with DID_ERROR
@ 2022-05-05 18:48 Sreekanth Reddy
  2022-05-05 18:48 ` [PATCH] mpi3mr: Hidden drives not removed during soft reset Sreekanth Reddy
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Sreekanth Reddy @ 2022-05-05 18:48 UTC (permalink / raw)
  To: linux-scsi; +Cc: martin.petersen, Sreekanth Reddy

[-- Attachment #1: Type: text/plain, Size: 963 bytes --]

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 the unrecoverable state.

Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
---
 drivers/scsi/mpi3mr/mpi3mr_os.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c
index 89a4918..5c57519 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_os.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_os.c
@@ -3996,6 +3996,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;
-- 
2.27.0


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4218 bytes --]

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-05-17  2:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-05 18:48 [PATCH] mpi3mr: Return IOs to an unrecoverable HBA with DID_ERROR Sreekanth Reddy
2022-05-05 18:48 ` [PATCH] mpi3mr: Hidden drives not removed during soft reset Sreekanth Reddy
2022-05-11  2:29   ` Martin K. Petersen
2022-05-17  2:16   ` Martin K. Petersen
2022-05-05 18:48 ` [PATCH] mpi3mr: Increase IO timeout value to 60s Sreekanth Reddy
2022-05-11  2:29   ` Martin K. Petersen
2022-05-17  2:16   ` Martin K. Petersen
2022-05-11  2:29 ` [PATCH] mpi3mr: Return IOs to an unrecoverable HBA with DID_ERROR Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox