From: Ionut Nechita megasas_build_syspd_fusion() always sends READ/WRITE commands to system PDs (JBOD drives) down the fast path. The fast path needs a valid device handle, which the driver takes from the JBOD sequence map or from the RAID map. When neither is available it sets DevHandle to 0xFFFF and still uses the fast path. This happens whenever the controller supports the JBOD sequence map but the driver does not use it, which is always the case with reset_devices (kdump), since megasas_setup_jbod_map() disables the map there. The firmware cannot route the I/O and fails every read with MFI_STAT_SCSI_DONE_WITH_ERROR (0x2d) and no data. The controller terminal log shows it explicitly: Out of range devHandle ffff from SMID 8 MptHostProcessJbodIoErrors: ... devId d devH ffff INVALID - FAILING CDB 28 00 00 00 00 00 00 00 08 00 FP Error lmid=20c smid=7 cdb0=28 status=2d devId=0 tgtId=10c devH=ffff Non-READ/WRITE commands are unaffected because they already go down the firmware path when secure JBOD is supported, so the drives are discovered but cannot be read, and the kdump kernel cannot mount the dump target. Seen on an Intel S2600WFQ with a MegaRAID SAS3508 (1000:0016, 8086:9461, FW 5.020.00-0838) and two SATA SSDs in JBOD. Without reset_devices the sequence map is used and the dump completes. Use the firmware path whenever no valid device handle is available. Fixes: 59db5a931bbe ("scsi: megaraid_sas: Handle sequence JBOD map failure at driver level") Cc: stable@vger.kernel.org Signed-off-by: Ionut Nechita --- drivers/scsi/megaraid/megaraid_sas_fusion.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c index 2877b3829..15524d899 100644 --- a/drivers/scsi/megaraid/megaraid_sas_fusion.c +++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c @@ -3173,6 +3173,16 @@ megasas_build_syspd_fusion(struct megasas_instance *instance, } } + /* + * Without a valid device handle the fast path cannot address the + * drive and the firmware fails the I/O with "devHandle out of + * range". This happens when the JBOD sequence map is not in use + * (e.g. it is disabled under reset_devices in a kdump kernel), so + * send the I/O down the firmware path instead. + */ + if (io_request->DevHandle == cpu_to_le16(0xFFFF)) + fp_possible = false; + cmd->request_desc->SCSIIO.DevHandle = io_request->DevHandle; megasas_get_msix_index(instance, scmd, cmd, 1); -- 2.55.0