diff options
author | Finn Thain <fthain@telegraphics.com.au> | 2018-09-26 21:17:11 -0400 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-09-28 02:21:23 -0400 |
commit | 08267216b3f8aa5adc204bdccf8deb72c1cd7665 (patch) | |
tree | 056e27ec0a39e0e8cf78a11595399789bde47bc9 | |
parent | 45ddc1b24806cc8f1a09f23dd4e7b6e4a8ae36e1 (diff) |
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: Michael Schmitz <schmitzmic@gmail.com>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r-- | drivers/scsi/NCR5380.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c index 5826421146ba..419033643015 100644 --- a/drivers/scsi/NCR5380.c +++ b/drivers/scsi/NCR5380.c | |||
@@ -2023,8 +2023,6 @@ static void NCR5380_reselect(struct Scsi_Host *instance) | |||
2023 | return; | 2023 | return; |
2024 | } | 2024 | } |
2025 | 2025 | ||
2026 | dsprintk(NDEBUG_RESELECTION, instance, "reselect\n"); | ||
2027 | |||
2028 | /* | 2026 | /* |
2029 | * At this point, we have detected that our SCSI ID is on the bus, | 2027 | * At this point, we have detected that our SCSI ID is on the bus, |
2030 | * SEL is true and BSY was false for at least one bus settle delay | 2028 | * 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 | NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE | ICR_ASSERT_BSY); | 2035 | NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE | ICR_ASSERT_BSY); |
2038 | if (NCR5380_poll_politely(hostdata, | 2036 | if (NCR5380_poll_politely(hostdata, |
2039 | STATUS_REG, SR_SEL, 0, 2 * HZ) < 0) { | 2037 | STATUS_REG, SR_SEL, 0, 2 * HZ) < 0) { |
2038 | shost_printk(KERN_ERR, instance, "reselect: !SEL timeout\n"); | ||
2040 | NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE); | 2039 | NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE); |
2041 | return; | 2040 | return; |
2042 | } | 2041 | } |
@@ -2048,6 +2047,7 @@ static void NCR5380_reselect(struct Scsi_Host *instance) | |||
2048 | 2047 | ||
2049 | if (NCR5380_poll_politely(hostdata, | 2048 | if (NCR5380_poll_politely(hostdata, |
2050 | STATUS_REG, SR_REQ, SR_REQ, 2 * HZ) < 0) { | 2049 | STATUS_REG, SR_REQ, SR_REQ, 2 * HZ) < 0) { |
2050 | shost_printk(KERN_ERR, instance, "reselect: REQ timeout\n"); | ||
2051 | do_abort(instance); | 2051 | do_abort(instance); |
2052 | return; | 2052 | return; |
2053 | } | 2053 | } |