ncr5380: Forget aborted commands
authorFinn Thain <fthain@telegraphics.com.au>
Mon, 22 Feb 2016 23:07:07 +0000 (10:07 +1100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 1 Mar 2016 14:38:25 +0000 (09:38 -0500)
commitdc183965282d28c82f192e39cbfa91da85505a6f
treeec18ea81ee71f6f448a6cdc2b820f51b9fbef299
parent71a00593ec0c2e2c1720e4041cf2926ff1d07826
ncr5380: Forget aborted commands

The list structures and related logic used in the NCR5380 driver mean that
a command cannot be queued twice (i.e. can't appear on more than one queue
and can't appear on the same queue more than once).

The abort handler must forget the command so that the mid-layer can re-use
it. E.g. the ML may send it back to the LLD via via scsi_eh_get_sense().

Fix this and also fix two error paths, so that commands get forgotten iff
completed.

Fixes: 8b00c3d5d40d ("ncr5380: Implement new eh_abort_handler")
Tested-by: Michael Schmitz <schmitzmic@gmail.com>
Cc: <stable@vger.kernel.org> # 4.5
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/NCR5380.c
drivers/scsi/atari_NCR5380.c