]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: smartpqi: Fix PCI control linkdown system hang
authorSagar Biradar <sagar.biradar@microchip.com>
Fri, 8 Jul 2022 18:47:15 +0000 (13:47 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 14 Jul 2022 03:42:03 +0000 (23:42 -0400)
commit6023b2d194ab6ab81745b63eb147a38bd897c922
tree3ee15b3854cd084c303014bbbefa40619b692641
parentbcc374d403776c59b656f618a284917132a8d3ae
scsi: smartpqi: Fix PCI control linkdown system hang

Fail all outstanding requests after a PCI linkdown.

Block access to device SCSI attributes during the following conditions:

  "Cable pull" is called PQI_CTRL_SURPRISE_REMOVAL.

  "PCIe Link Down" is called PQI_CTRL_GRACEFUL_REMOVAL.

Block access to device SCSI attributes during and in rare instances when
the controller goes offline.

Either outstanding requests or the access of SCSI attributes post linkdown
can lead to a hang.

Post linkdown, driver does not fail the outstanding requests leading to
long wait time before all the IOs eventually fail.

Also access of the SCSI attributes by host applications can lead to a
system hang.

Link: https://lore.kernel.org/r/165730603578.177165.4699352086827187263.stgit@brunhilda
Reviewed-by: Scott Benesh <scott.benesh@microchip.com>
Reviewed-by: Scott Teel <scott.teel@microchip.com>
Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com>
Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com>
Signed-off-by: Sagar Biradar <sagar.biradar@microchip.com>
Signed-off-by: Don Brace <don.brace@microchip.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/smartpqi/smartpqi.h
drivers/scsi/smartpqi/smartpqi_init.c
drivers/scsi/smartpqi/smartpqi_sis.c