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

scsi: NCR5380: Don't call dsprintk() following reselection interrupt

The X3T9.2 specification (draft) says, under "6.1.4.1 RESELECTION",

    ... The reselected initiator shall then assert the BSY signal
    within a selection abort time of its most recent detection of being
    reselected; this is required for correct operation of the time-out
    procedure.

The selection abort time is only 200 us which may be insufficient time for a
printk() call. Move the diagnostics to the error paths.
Tested-by: default avatarMichael Schmitz <schmitzmic@gmail.com>
Signed-off-by: default avatarFinn Thain <fthain@telegraphics.com.au>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 45ddc1b2
...@@ -2023,8 +2023,6 @@ static void NCR5380_reselect(struct Scsi_Host *instance) ...@@ -2023,8 +2023,6 @@ static void NCR5380_reselect(struct Scsi_Host *instance)
return; return;
} }
dsprintk(NDEBUG_RESELECTION, instance, "reselect\n");
/* /*
* At this point, we have detected that our SCSI ID is on the bus, * At this point, we have detected that our SCSI ID is on the bus,
* SEL is true and BSY was false for at least one bus settle delay * SEL is true and BSY was false for at least one bus settle delay
...@@ -2037,6 +2035,7 @@ static void NCR5380_reselect(struct Scsi_Host *instance) ...@@ -2037,6 +2035,7 @@ static void NCR5380_reselect(struct Scsi_Host *instance)
NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE | ICR_ASSERT_BSY); NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE | ICR_ASSERT_BSY);
if (NCR5380_poll_politely(hostdata, if (NCR5380_poll_politely(hostdata,
STATUS_REG, SR_SEL, 0, 2 * HZ) < 0) { STATUS_REG, SR_SEL, 0, 2 * HZ) < 0) {
shost_printk(KERN_ERR, instance, "reselect: !SEL timeout\n");
NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE); NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE);
return; return;
} }
...@@ -2048,6 +2047,7 @@ static void NCR5380_reselect(struct Scsi_Host *instance) ...@@ -2048,6 +2047,7 @@ static void NCR5380_reselect(struct Scsi_Host *instance)
if (NCR5380_poll_politely(hostdata, if (NCR5380_poll_politely(hostdata,
STATUS_REG, SR_REQ, SR_REQ, 2 * HZ) < 0) { STATUS_REG, SR_REQ, SR_REQ, 2 * HZ) < 0) {
shost_printk(KERN_ERR, instance, "reselect: REQ timeout\n");
do_abort(instance); do_abort(instance);
return; return;
} }
......
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