summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorFinn Thain <fthain@telegraphics.com.au>2018-09-27 04:17:11 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-11-25 11:53:05 +0300
commit9e47acea96d0e5f79e47ca7e3f48a5a8df60d101 (patch)
treeeecaca21eb05076c745e9eaf16d9e6e6bffe9fe4 /drivers
parentbbef21812f054b765c8d9906594ebbb1c86bbdb8 (diff)
downloadlinux-9e47acea96d0e5f79e47ca7e3f48a5a8df60d101.tar.xz
scsi: NCR5380: Handle BUS FREE during reselection
[ Upstream commit ca694afad707cb3ae2fdef3b28454444d9ac726e ] The X3T9.2 specification (draft) says, under "6.1.4.2 RESELECTION time-out procedure", that a target may assert RST or go to BUS FREE phase if the initiator does not respond within 200 us. Something like this has been observed with AztecMonster II target. When it happens, all we can do is wait for the target to try again. Tested-by: Michael Schmitz <schmitzmic@gmail.com> Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/NCR5380.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c
index 03f9ddbc37fb..27270631c70c 100644
--- a/drivers/scsi/NCR5380.c
+++ b/drivers/scsi/NCR5380.c
@@ -2133,6 +2133,9 @@ static void NCR5380_reselect(struct Scsi_Host *instance)
if (NCR5380_poll_politely(instance,
STATUS_REG, SR_REQ, SR_REQ, 2 * HZ) < 0) {
+ if ((NCR5380_read(STATUS_REG) & (SR_BSY | SR_SEL)) == 0)
+ /* BUS FREE phase */
+ return;
shost_printk(KERN_ERR, instance, "reselect: REQ timeout\n");
do_abort(instance);
return;