OSDN Git Service

scsi: smartpqi: Shorten drive visibility after removal
authorMike McGowen <Mike.McGowen@microchip.com>
Fri, 8 Jul 2022 18:46:50 +0000 (13:46 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 14 Jul 2022 03:42:02 +0000 (23:42 -0400)
commit4e7d26029ee7558badad4188ddb3a79566da69c0
treeac786ad0e0cfb0e28907ff9afee06d77750a3443
parentaec95e3a8dedb626739efd3d7d6cb7110cab31b0
scsi: smartpqi: Shorten drive visibility after removal

Check the response code returned from the LUN reset task management
function and if it indicates the LUN is not valid, do not retry.

Reduce rescan worker delay to 5 seconds for the event handler only.

The removal of a drive from the OS could have been delayed up to 30 seconds
after being physically pulled.

The driver was retrying a LUN reset 3 times even though the return code
indiciated the LUN was no longer valid. There was a 10 second delay between
each retry. Additionally, the rescan worker was scheduled to run 10 seconds
after the driver received the event.

Link: https://lore.kernel.org/r/165730601025.177165.9416869335174437006.stgit@brunhilda
Reviewed-by: Scott Teel <scott.teel@microchip.com>
Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com>
Signed-off-by: Mike McGowen <Mike.McGowen@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