diff options
author | Finn Thain <fthain@telegraphics.com.au> | 2016-01-03 16:05:16 +1100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-01-06 21:42:54 -0500 |
commit | ac9399d09544525ff4713ab942cb44a7cea29a84 (patch) | |
tree | 1e0c5291983fe38365b596ab3b6ad9baed94c22f /drivers/scsi/NCR5380.c | |
parent | 6323876f5539e808a293395b1960427c62d2436d (diff) | |
download | linux-ac9399d09544525ff4713ab942cb44a7cea29a84.tar.gz linux-ac9399d09544525ff4713ab942cb44a7cea29a84.tar.bz2 linux-ac9399d09544525ff4713ab942cb44a7cea29a84.zip |
ncr5380: Always escalate bad target time-out in NCR5380_select()
Remove the restart_select and targets_present variables introduced in
Linux v1.1.38. The former was used only for a questionable debug printk
and the latter "so we can call a select failure a retryable condition".
Well, retrying select failure in general is a different problem to a
target that doesn't assert BSY. We need to handle these two cases
differently; the latter case can be left to the SCSI ML.
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Tested-by: Ondrej Zary <linux@rainbow-software.org>
Tested-by: Michael Schmitz <schmitzmic@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/NCR5380.c')
-rw-r--r-- | drivers/scsi/NCR5380.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c index ce80a5c65eb3..051684b08a77 100644 --- a/drivers/scsi/NCR5380.c +++ b/drivers/scsi/NCR5380.c @@ -790,7 +790,6 @@ static int NCR5380_init(struct Scsi_Host *instance, int flags) #ifdef REAL_DMA hostdata->dmalen = 0; #endif - hostdata->targets_present = 0; hostdata->connected = NULL; hostdata->issue_queue = NULL; hostdata->disconnected_queue = NULL; @@ -1186,8 +1185,6 @@ static int NCR5380_select(struct Scsi_Host *instance, struct scsi_cmnd *cmd) if (hostdata->selecting) goto part2; - hostdata->restart_select = 0; - NCR5380_dprint(NDEBUG_ARBITRATION, instance); dprintk(NDEBUG_ARBITRATION, "scsi%d : starting arbitration, id = %d\n", instance->host_no, instance->this_id); @@ -1363,21 +1360,12 @@ part2: if (!(NCR5380_read(STATUS_REG) & SR_BSY)) { NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE); - if (hostdata->targets_present & (1 << scmd_id(cmd))) { - printk(KERN_DEBUG "scsi%d : weirdness\n", instance->host_no); - if (hostdata->restart_select) - printk(KERN_DEBUG "\trestart select\n"); - NCR5380_dprint(NDEBUG_SELECTION, instance); - NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask); - return -1; - } cmd->result = DID_BAD_TARGET << 16; cmd->scsi_done(cmd); NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask); dprintk(NDEBUG_SELECTION, "scsi%d : target did not respond within 250ms\n", instance->host_no); return 0; } - hostdata->targets_present |= (1 << scmd_id(cmd)); /* * Since we followed the SCSI spec, and raised ATN while SEL @@ -2382,7 +2370,6 @@ static void NCR5380_reselect(struct Scsi_Host *instance) { */ NCR5380_write(MODE_REG, MR_BASE); - hostdata->restart_select = 1; target_mask = NCR5380_read(CURRENT_SCSI_DATA_REG) & ~(hostdata->id_mask); dprintk(NDEBUG_SELECTION, "scsi%d : reselect\n", instance->host_no); |