summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/NCR5380.c
diff options
context:
space:
mode:
authorFinn Thain <fthain@telegraphics.com.au>2016-01-03 06:05:50 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2016-01-07 03:43:04 +0100
commitbe3f4121aa352d8fef77a57df4b5e106d7f9a917 (patch)
treeeedef716328818f44a6fb73dd25d8c9e4b322ed2 /drivers/scsi/NCR5380.c
parentatari_NCR5380: Fix queue_size limit (diff)
downloadlinux-be3f4121aa352d8fef77a57df4b5e106d7f9a917.tar.xz
linux-be3f4121aa352d8fef77a57df4b5e106d7f9a917.zip
ncr5380: Remove redundant ICR_ARBITRATION_LOST test and eliminate FLAG_DTC3181E
Remove FLAG_DTC3181E. It was used to suppress a final Arbitration Lost (SEL asserted) test that isn't actually needed. The test was suppressed because it causes problems for DTC436 and DTC536 chips. It takes place after the host wins arbitration, so SEL has been asserted. These chips can't seem to tell whether it was the host or another bus device that did so. This questionable final test appears in a flow chart in an early NCR5380 datasheet. It was removed from later documents like the DP5380 datasheet. By the time this final test takes place, the driver has already tested the Arbitration Lost bit several times. The first test happens 3 us after BUS FREE (or longer due to register access delays). The protocol requires that a device stop signalling within 1.8 us after BUS FREE unless it won arbitration, in which case it must assert SEL, which is detected 1.2 us later by the first Arbitration Lost test. 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.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c
index be40c965fffb..a4defd1977c9 100644
--- a/drivers/scsi/NCR5380.c
+++ b/drivers/scsi/NCR5380.c
@@ -528,14 +528,13 @@ static void prepare_info(struct Scsi_Host *instance)
"base 0x%lx, irq %d, "
"can_queue %d, cmd_per_lun %d, "
"sg_tablesize %d, this_id %d, "
- "flags { %s%s%s%s}, "
+ "flags { %s%s%s}, "
"options { %s} ",
instance->hostt->name, instance->io_port, instance->n_io_port,
instance->base, instance->irq,
instance->can_queue, instance->cmd_per_lun,
instance->sg_tablesize, instance->this_id,
hostdata->flags & FLAG_NO_DMA_FIXUP ? "NO_DMA_FIXUP " : "",
- hostdata->flags & FLAG_DTC3181E ? "DTC3181E " : "",
hostdata->flags & FLAG_NO_PSEUDO_DMA ? "NO_PSEUDO_DMA " : "",
hostdata->flags & FLAG_TOSHIBA_DELAY ? "TOSHIBA_DELAY " : "",
#ifdef AUTOPROBE_IRQ
@@ -1159,17 +1158,6 @@ static int NCR5380_select(struct Scsi_Host *instance, struct scsi_cmnd *cmd)
NCR5380_write(INITIATOR_COMMAND_REG,
ICR_BASE | ICR_ASSERT_SEL | ICR_ASSERT_BSY);
- if (!(hostdata->flags & FLAG_DTC3181E) &&
- /* RvC: DTC3181E has some trouble with this
- * so we simply removed it. Seems to work with
- * only Mustek scanner attached
- */
- (NCR5380_read(INITIATOR_COMMAND_REG) & ICR_ARBITRATION_LOST)) {
- NCR5380_write(MODE_REG, MR_BASE);
- NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE);
- dprintk(NDEBUG_ARBITRATION, "scsi%d : lost arbitration, deasserting ICR_ASSERT_SEL\n", instance->host_no);
- return -1;
- }
/*
* Again, bus clear + bus settle time is 1.2us, however, this is
* a minimum so we'll udelay ceil(1.2)