]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - drivers/scsi/aacraid/commsup.c
[SCSI] aacraid: Improved error handling
authorMark Haverkamp <markh@linux-foundation.org>
Thu, 15 Mar 2007 17:27:45 +0000 (10:27 -0700)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Tue, 20 Mar 2007 15:56:03 +0000 (10:56 -0500)
commit03d4433721880bf1972c924b168e4e1dd3c59d53
tree820ad2f8aea551d03e7ff8751aba7dfe1f674bcd
parentf2b1a06ad46209c6e631e3099138d1fa3f14d3a8
[SCSI] aacraid: Improved error handling

Received from Mark Salyzyn,

This set of fixes improve error handling stability of the driver. A popular
manifestation of the problems is an NULL pointer reference in the interrupt
handler when referencing portions of the scsi command context, or in the
scsi_done handling when an offlined device is referenced.

The aacraid driver currently does not get notification of orphaned command
completions due to devices going offline. The driver also fails to handle the
commands that are finished by the error handler, and thus can complete again
later at the hands of the adapter causing situations of completion of an
invalid scsi command context. Test Unit Ready calls abort assuming that the
abort was successful, but are not, and thus when the interrupt from the adapter
occurs, they reference invalid command contexts. We add in a TIMED_OUT flag to
inform the aacraid FIB context that the interrupt service should merely release
the driver resources and not complete the command up. We take advantage of this
with the abort handler as well for select abortable commands. And we detect and
react if a command that can not be aborted is currently still outstanding to
the controller when reissued by the retry mechanism.

Signed-off-by: Mark Haverkamp <markh@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/aacraid/aachba.c
drivers/scsi/aacraid/aacraid.h
drivers/scsi/aacraid/commsup.c
drivers/scsi/aacraid/dpcsup.c
drivers/scsi/aacraid/linit.c