ncr5380: Remove redundant register writes
authorFinn Thain <fthain@telegraphics.com.au>
Sun, 3 Jan 2016 05:05:14 +0000 (16:05 +1100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 7 Jan 2016 02:42:54 +0000 (21:42 -0500)
Remove the duplicate write to the Select Enable Register that appeared
in v1.1.38.

Also remove the redundant write to Initiator Command Register prior to
calling do_abort().

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>
drivers/scsi/NCR5380.c
drivers/scsi/atari_NCR5380.c

index 663773e6687270b5351481b30dd6fc126fee566e..b75c92967d6e741241d8a12eafd9234aa8087904 100644 (file)
@@ -1384,7 +1384,6 @@ part2:
                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);
-               NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask);
                return 0;
        }
        hostdata->targets_present |= (1 << scmd_id(cmd));
@@ -2076,7 +2075,6 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) {
                                                scmd_printk(KERN_INFO, cmd,
                                                            "switching to slow handshake\n");
                                                cmd->device->borken = 1;
-                                               NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE | ICR_ASSERT_ATN);
                                                sink = 1;
                                                do_abort(instance);
                                                cmd->result = DID_ERROR << 16;
index 463d2d47661a9f0e320d7ce28054bdd88a81ff3a..df42610df6e4730d52456cc20c4c03b16670c3e8 100644 (file)
@@ -1640,7 +1640,6 @@ static int NCR5380_select(struct Scsi_Host *instance, struct scsi_cmnd *cmd)
                cmd->scsi_done(cmd);
                NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask);
                dprintk(NDEBUG_SELECTION, "scsi%d: target did not respond within 250ms\n", HOSTNO);
-               NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask);
                return 0;
        }
 
@@ -2192,8 +2191,6 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance)
                                                scmd_printk(KERN_INFO, cmd,
                                                        "switching to slow handshake\n");
                                                cmd->device->borken = 1;
-                                               NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE |
-                                                       ICR_ASSERT_ATN);
                                                sink = 1;
                                                do_abort(instance);
                                                cmd->result = DID_ERROR << 16;