Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: NCR5380: Handle PDMA failure reliably

A PDMA error is handled in the core driver by setting the device's 'borken'
flag and aborting the command. Unfortunately, do_abort() is not
dependable. Perform a SCSI bus reset instead, to make sure that the command
fails and gets retried.

Cc: Michael Schmitz <schmitzmic@gmail.com>
Cc: stable@vger.kernel.org # v4.20+
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Tested-by: Stan Johnson <userm57@yahoo.com>
Tested-by: Michael Schmitz <schmitzmic@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Finn Thain and committed by
Martin K. Petersen
f9dfed1c 57f31326

+2 -4
+2 -4
drivers/scsi/NCR5380.c
··· 1761 1761 scmd_printk(KERN_INFO, cmd, 1762 1762 "switching to slow handshake\n"); 1763 1763 cmd->device->borken = 1; 1764 - sink = 1; 1765 - do_abort(instance); 1766 - cmd->result = DID_ERROR << 16; 1767 - /* XXX - need to source or sink data here, as appropriate */ 1764 + do_reset(instance); 1765 + bus_reset_cleanup(instance); 1768 1766 } 1769 1767 } else { 1770 1768 /* Transfer a small chunk so that the