The first patch prevents the SCSI error handlers to run once the shutdown/unload
path starts.  This avoids an oops at least in the host reset handler, on kernels
with a recent patch, and also in the abort handler on kernels without that 
patch.

The second patch goes a step further, and prevents the SCSI error handlers to be
called for SCSI IO commands running at the shutdown/unload time (in case adapter
interrupts are disabled before they complete) by finishing them.

Notice the second patch only affects SCSI IO commands. Other command types, 
e.g.,
Task Manangement Functions, which are running at the shutdown/unload time still
must be handled separately -- this is also covered in patch 1.

The patchset is v3 as PATCH 1/2 is identical to its v2 submission, and PATCH 2/2
has been added (in its first version).

Thanks to Sreekanth Reddy and Bart Van Assche for review and contributions.

Mauricio Faria de Oliveira (2):
  scsi: mpt3sas: fix oops in error handlers after shutdown/unload
  scsi: mpt3sas: wait for and flush running commands on shutdown/unload

 drivers/scsi/mpt3sas/mpt3sas_base.c  |  8 ++++----
 drivers/scsi/mpt3sas/mpt3sas_base.h  |  3 +++
 drivers/scsi/mpt3sas/mpt3sas_scsih.c | 21 ++++++++++++++++-----
 3 files changed, 23 insertions(+), 9 deletions(-)

-- 
1.8.3.1

Reply via email to