Commit f9dfed1c authored by Finn Thain's avatar Finn Thain Committed by Martin K. Petersen

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: 1da177e4 ("Linux-2.6.12-rc2")
Signed-off-by: default avatarFinn Thain <fthain@telegraphics.com.au>
Tested-by: default avatarStan Johnson <userm57@yahoo.com>
Tested-by: default avatarMichael Schmitz <schmitzmic@gmail.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 57f31326
...@@ -1761,10 +1761,8 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) ...@@ -1761,10 +1761,8 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance)
scmd_printk(KERN_INFO, cmd, scmd_printk(KERN_INFO, cmd,
"switching to slow handshake\n"); "switching to slow handshake\n");
cmd->device->borken = 1; cmd->device->borken = 1;
sink = 1; do_reset(instance);
do_abort(instance); bus_reset_cleanup(instance);
cmd->result = DID_ERROR << 16;
/* XXX - need to source or sink data here, as appropriate */
} }
} else { } else {
/* Transfer a small chunk so that the /* Transfer a small chunk so that the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment