mpi3mr: Return IOs to an unrecoverable HBA with DID_ERROR
Subsystems (2)
Sreekanth Reddy
maintainerPATCH 1/1 mpi3mr: Return IOs 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 the unrecoverable state.
--- drivers/scsi/mpi3mr/mpi3mr_os.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/scsi/mpi3mr/mpi3mr_os.c +6 -0
@@ -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 ;
Signature · 1 line
2.27.0
Sreekanth Reddy
maintainerPATCH 1/1 mpi3mr: Hidden drives not removed during soft reset
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.
--- drivers/scsi/mpi3mr/mpi3mr_os.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/scsi/mpi3mr/mpi3mr_os.c +5 -3
@@ -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); }
Signature · 1 line
2.27.0
Martin K. Petersen
AppliedRe: [PATCH] mpi3mr: Hidden drives not removed during soft reset
Sreekanth,
Quoted 7 lines
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!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Martin K. Petersen
AppliedRe: [PATCH] mpi3mr: Hidden drives not removed during soft reset
In reply to Sreekanth ReddyQuoted 10 lines · Sreekanth Reddy
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
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Sreekanth Reddy
maintainerPATCH 1/1 mpi3mr: Increase IO timeout value to 60s
In reply to Sreekanth ReddySet each SCSI device's default IO timeout and
default error handling IO timeout to 60s.
--- drivers/scsi/mpi3mr/mpi3mr.h | 3 +++ drivers/scsi/mpi3mr/mpi3mr_os.c | 4 ++++ 2 files changed, 7 insertions(+)
drivers/scsi/mpi3mr/mpi3mr.h +3 -0
@@ -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
drivers/scsi/mpi3mr/mpi3mr_os.c +4 -0
@@ -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*/
Signature · 1 line
2.27.0
Martin K. Petersen
AppliedRe: [PATCH] mpi3mr: Increase IO timeout value to 60s
Sreekanth,
Quoted 2 lines
Set each SCSI device's default IO timeout and default error handling IO timeout to 60s.
Applied to 5.19/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Martin K. Petersen
AppliedRe: [PATCH] mpi3mr: Increase IO timeout value to 60s
In reply to Sreekanth ReddyQuoted 4 lines · Sreekanth Reddy
Set each SCSI device's default IO timeout and
default error handling IO timeout to 60s.
Applied to 5.19/scsi-queue, thanks!
[1/1] mpi3mr: Increase IO timeout value to 60s
https://git.kernel.org/mkp/scsi/c/1aa529d40025
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Martin K. Petersen
AppliedSreekanth,
Quoted 4 lines
Complete all new I/O requests issued to an unrecoverable controller with
DID_ERRORstatus instead of returning the I/O requests withSCSI_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!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering