]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
scsi: NCR5380: Handle BUS FREE during reselection
authorFinn Thain <fthain@telegraphics.com.au>
Thu, 27 Sep 2018 01:17:11 +0000 (11:17 +1000)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 28 Sep 2018 06:21:55 +0000 (02:21 -0400)
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>
drivers/scsi/NCR5380.c

index 419033643015d7261c0e650d001ff0b9d93c67f8..b9a3eb0647e4ed45db5b455fbe2ce58f315fdf82 100644 (file)
@@ -2047,6 +2047,9 @@ static void NCR5380_reselect(struct Scsi_Host *instance)
 
        if (NCR5380_poll_politely(hostdata,
                                  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;