Message ID | 20220505184808.24049-1-sreekanth.reddy@broadcom.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | mpi3mr: Return IOs to an unrecoverable HBA with DID_ERROR | expand |
Sreekanth, > 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. Applied to 5.19/scsi-staging, thanks!
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;
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(+)