]> git.apps.os.sepia.ceph.com Git - ceph-client.git/commit
scsi: smartpqi: fix rare system hang during LUN reset
authorMurthy Bhat <Murthy.Bhat@microchip.com>
Tue, 27 Aug 2024 18:54:59 +0000 (13:54 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 29 Aug 2024 02:10:34 +0000 (22:10 -0400)
commit4e0a51716dae782822b5df6c3b29cc0915a9f802
tree1a86f9dd9c417bfba78baca77be543bedab23102
parentdbc39b84540f746cc814e69b21e53e6d3e12329a
scsi: smartpqi: fix rare system hang during LUN reset

Correct a rare case where in a LUN reset occurs on a device and I/O
requests for other devices persist in the driver's internal request queue.

Part of a LUN reset involves waiting for our internal request queue to
empty before proceeding. The internal request queue contains requests not
yet sent down to the controller.

We were clearing the requests queued for the LUN undergoing a reset, but
not all of the queued requests. Causing a hang.

For all requests in our internal request queue:

   Complete requests with DID_RESET for queued requests for the device
   undergoing a reset.

   Complete requests with DID_REQUEUE for all other queued requests.

Reviewed-by: Scott Benesh <scott.benesh@microchip.com>
Reviewed-by: Scott Teel <scott.teel@microchip.com>
Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com>
Signed-off-by: Murthy Bhat <Murthy.Bhat@microchip.com>
Signed-off-by: Don Brace <don.brace@microchip.com>
Link: https://lore.kernel.org/r/20240827185501.692804-6-don.brace@microchip.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/smartpqi/smartpqi_init.c