diff options
author | Sreekanth Reddy <sreekanth.reddy@broadcom.com> | 2018-02-16 20:39:58 -0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-02-21 22:59:39 -0500 |
commit | c666d3be99c000bb889a33353e9be0fa5808d3de (patch) | |
tree | d8905cad89a71ec8b69c758c770f90d8eb429700 /drivers/scsi/mpt3sas/mpt3sas_base.h | |
parent | scsi: mpt3sas: fix oops in error handlers after shutdown/unload (diff) | |
download | linux-dev-c666d3be99c000bb889a33353e9be0fa5808d3de.tar.xz linux-dev-c666d3be99c000bb889a33353e9be0fa5808d3de.zip |
scsi: mpt3sas: wait for and flush running commands on shutdown/unload
This patch finishes all outstanding SCSI IO commands (but not other commands,
e.g., task management) in the shutdown and unload paths.
It first waits for the commands to complete (this is done after setting
'ioc->remove_host = 1 ', which prevents new commands to be queued) then it
flushes commands that might still be running.
This avoids triggering error handling (e.g., abort command) for all commands
possibly completed by the adapter after interrupts disabled.
[mauricfo: introduced something in commit message.]
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
Tested-by: Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
Signed-off-by: Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/mpt3sas/mpt3sas_base.h')
-rw-r--r-- | drivers/scsi/mpt3sas/mpt3sas_base.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h index 789bc421424b..99ccf83b8c51 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.h +++ b/drivers/scsi/mpt3sas/mpt3sas_base.h @@ -1433,6 +1433,9 @@ void mpt3sas_base_update_missing_delay(struct MPT3SAS_ADAPTER *ioc, int mpt3sas_port_enable(struct MPT3SAS_ADAPTER *ioc); +void +mpt3sas_wait_for_commands_to_complete(struct MPT3SAS_ADAPTER *ioc); + /* scsih shared API */ struct scsi_cmnd *mpt3sas_scsih_scsi_lookup_get(struct MPT3SAS_ADAPTER *ioc, |