scsi: mpt3sas: For NVME device, issue a protocol level reset
1) Manufacturing Page 11 contains parameters to control internal firmware behavior. Based on AddlFlags2 field FW/Driver behaviour can be changed, (flag tm_custom_handling is used for this) a) For PCIe device, protocol level reset should be used if flag tm_custom_handling is 0. Since Abort Task Set, LUN reset and Target reset will result in a protocol level reset. Drivers should issue only one type of this reset, if that fails then it should escalate to a controller reset (diag reset/OCR). b) If the driver has control over the TM reset timeout value, then driver should use the value exposed in PCIe Device Page 2 for pcie device (field ControllerResetTO). Signed-off-by: Chaitra P B <chaitra.basappa@broadcom.com> Signed-off-by: Suganath Prabu S <suganath-prabu.subramani@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:

committed by
Martin K. Petersen

parent
65928d1f41
commit
c1a6c5ac42
@@ -4142,6 +4142,7 @@ _base_static_config_pages(struct MPT3SAS_ADAPTER *ioc)
|
||||
Mpi2ConfigReply_t mpi_reply;
|
||||
u32 iounit_pg1_flags;
|
||||
|
||||
ioc->nvme_abort_timeout = 30;
|
||||
mpt3sas_config_get_manufacturing_pg0(ioc, &mpi_reply, &ioc->manu_pg0);
|
||||
if (ioc->ir_firmware)
|
||||
mpt3sas_config_get_manufacturing_pg10(ioc, &mpi_reply,
|
||||
@@ -4160,6 +4161,18 @@ _base_static_config_pages(struct MPT3SAS_ADAPTER *ioc)
|
||||
mpt3sas_config_set_manufacturing_pg11(ioc, &mpi_reply,
|
||||
&ioc->manu_pg11);
|
||||
}
|
||||
if (ioc->manu_pg11.AddlFlags2 & NVME_TASK_MNGT_CUSTOM_MASK)
|
||||
ioc->tm_custom_handling = 1;
|
||||
else {
|
||||
ioc->tm_custom_handling = 0;
|
||||
if (ioc->manu_pg11.NVMeAbortTO < NVME_TASK_ABORT_MIN_TIMEOUT)
|
||||
ioc->nvme_abort_timeout = NVME_TASK_ABORT_MIN_TIMEOUT;
|
||||
else if (ioc->manu_pg11.NVMeAbortTO >
|
||||
NVME_TASK_ABORT_MAX_TIMEOUT)
|
||||
ioc->nvme_abort_timeout = NVME_TASK_ABORT_MAX_TIMEOUT;
|
||||
else
|
||||
ioc->nvme_abort_timeout = ioc->manu_pg11.NVMeAbortTO;
|
||||
}
|
||||
|
||||
mpt3sas_config_get_bios_pg2(ioc, &mpi_reply, &ioc->bios_pg2);
|
||||
mpt3sas_config_get_bios_pg3(ioc, &mpi_reply, &ioc->bios_pg3);
|
||||
|
Reference in New Issue
Block a user