OSDN Git Service

scsi: mpt3sas: Fix Sync cache command failure during driver unload
authorSuganath Prabu <suganath-prabu.subramani@broadcom.com>
Wed, 31 Oct 2018 13:23:36 +0000 (18:53 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 7 Nov 2018 01:16:01 +0000 (20:16 -0500)
commit9029a72500b95578a35877a43473b82cb0386c53
tree66cad46bd3d45ddb9acff611d3aa0be0b1f44ab0
parentdc730212e8a378763cb182b889f90c8101331332
scsi: mpt3sas: Fix Sync cache command failure during driver unload

This is to fix SYNC CACHE and START STOP command failures with
DID_NO_CONNECT during driver unload.

In driver's IO submission patch (i.e. in driver's .queuecommand()) driver
won't allow any SCSI commands to the IOC when ioc->remove_host flag is set
and hence SYNC CACHE commands which are issued to the target drives (where
write cache is enabled) during driver unload time is failed with
DID_NO_CONNECT status.

Now modified the driver to allow SYNC CACHE and START STOP commands to IOC,
even when remove_host flag is set.

Signed-off-by: Suganath Prabu <suganath-prabu.subramani@broadcom.com>
Reviewed-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/mpt3sas/mpt3sas_scsih.c