* [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
* [PATCH] mpi3mr: Hidden drives not removed during soft reset
2022-05-05 18:48 [PATCH] mpi3mr: Return IOs to an unrecoverable HBA with DID_ERROR Sreekanth Reddy
@ 2022-05-05 18:48 ` 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 ` [PATCH] mpi3mr: Return IOs to an unrecoverable HBA with DID_ERROR Martin K. Petersen
2 siblings, 2 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: 1406 bytes --]
If any drive is missing during the reset, the driver
checks whether the device is exposed to the OS and if it is,
then only it removes the device from the OS and
its own internal list. For hidden devices even if they are found
as missing during reset the driver is not removing them from
its internal list. Modified driver to remove hidden devices
from the driver's target device list if they are missing
during soft reset.
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
---
drivers/scsi/mpi3mr/mpi3mr_os.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c
index 5c57519..5ba490c 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_os.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_os.c
@@ -911,9 +911,11 @@ void mpi3mr_rfresh_tgtdevs(struct mpi3mr_ioc *mrioc)
list_for_each_entry_safe(tgtdev, tgtdev_next, &mrioc->tgtdev_list,
list) {
- if ((tgtdev->dev_handle == MPI3MR_INVALID_DEV_HANDLE) &&
- tgtdev->host_exposed) {
- mpi3mr_remove_tgtdev_from_host(mrioc, tgtdev);
+ if (tgtdev->dev_handle == MPI3MR_INVALID_DEV_HANDLE) {
+ dprint_reset(mrioc, "removing target device with perst_id(%d)\n",
+ tgtdev->perst_id);
+ if (tgtdev->host_exposed)
+ mpi3mr_remove_tgtdev_from_host(mrioc, tgtdev);
mpi3mr_tgtdev_del_from_list(mrioc, tgtdev);
mpi3mr_tgtdev_put(tgtdev);
}
--
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
* Re: [PATCH] mpi3mr: Hidden drives not removed during soft reset
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
1 sibling, 0 replies; 8+ messages in thread
From: Martin K. Petersen @ 2022-05-11 2:29 UTC (permalink / raw)
To: Sreekanth Reddy; +Cc: linux-scsi, martin.petersen
Sreekanth,
> If any drive is missing during the reset, the driver checks whether
> the device is exposed to the OS and if it is, then only it removes the
> device from the OS and its own internal list. For hidden devices even
> if they are found as missing during reset the driver is not removing
> them from its internal list. Modified driver to remove hidden devices
> from the driver's target device list if they are missing during soft
> reset.
Applied to 5.19/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mpi3mr: Hidden drives not removed during soft reset
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
1 sibling, 0 replies; 8+ messages in thread
From: Martin K. Petersen @ 2022-05-17 2:16 UTC (permalink / raw)
To: Sreekanth Reddy, linux-scsi; +Cc: Martin K . Petersen
On Fri, 6 May 2022 00:18:07 +0530, Sreekanth Reddy wrote:
> If any drive is missing during the reset, the driver
> checks whether the device is exposed to the OS and if it is,
> then only it removes the device from the OS and
> its own internal list. For hidden devices even if they are found
> as missing during reset the driver is not removing them from
> its internal list. Modified driver to remove hidden devices
> from the driver's target device list if they are missing
> during soft reset.
>
> [...]
Applied to 5.19/scsi-queue, thanks!
[1/1] mpi3mr: Hidden drives not removed during soft reset
https://git.kernel.org/mkp/scsi/c/2dd8389f96d6
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] mpi3mr: Increase IO timeout value to 60s
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-05 18:48 ` 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
2 siblings, 2 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: 1346 bytes --]
Set each SCSI device's default IO timeout and
default error handling IO timeout to 60s.
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
---
drivers/scsi/mpi3mr/mpi3mr.h | 3 +++
drivers/scsi/mpi3mr/mpi3mr_os.c | 4 ++++
2 files changed, 7 insertions(+)
diff --git a/drivers/scsi/mpi3mr/mpi3mr.h b/drivers/scsi/mpi3mr/mpi3mr.h
index 8612b66..584659e 100644
--- a/drivers/scsi/mpi3mr/mpi3mr.h
+++ b/drivers/scsi/mpi3mr/mpi3mr.h
@@ -124,6 +124,9 @@ extern atomic64_t event_counter;
#define MPI3MR_WATCHDOG_INTERVAL 1000 /* in milli seconds */
+#define MPI3MR_SCMD_TIMEOUT (60 * HZ)
+#define MPI3MR_EH_SCMD_TIMEOUT (60 * HZ)
+
/* Internal admin command state definitions*/
#define MPI3MR_CMD_NOTUSED 0x8000
#define MPI3MR_CMD_COMPLETE 0x0001
diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c
index 5ba490c..f5c345d 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_os.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_os.c
@@ -3727,6 +3727,10 @@ static int mpi3mr_slave_configure(struct scsi_device *sdev)
return -ENXIO;
mpi3mr_change_queue_depth(sdev, tgt_dev->q_depth);
+
+ sdev->eh_timeout = MPI3MR_EH_SCMD_TIMEOUT;
+ blk_queue_rq_timeout(sdev->request_queue, MPI3MR_SCMD_TIMEOUT);
+
switch (tgt_dev->dev_type) {
case MPI3_DEVICE_DEVFORM_PCIE:
/*The block layer hw sector size = 512*/
--
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
* Re: [PATCH] mpi3mr: Return IOs to an unrecoverable HBA with DID_ERROR
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-05 18:48 ` [PATCH] mpi3mr: Increase IO timeout value to 60s Sreekanth Reddy
@ 2022-05-11 2:29 ` Martin K. Petersen
2 siblings, 0 replies; 8+ messages in thread
From: Martin K. Petersen @ 2022-05-11 2:29 UTC (permalink / raw)
To: Sreekanth Reddy; +Cc: linux-scsi, martin.petersen
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!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.