diff options
author | Finn Thain <fthain@telegraphics.com.au> | 2014-11-12 16:11:53 +1100 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-11-20 09:11:05 +0100 |
commit | 76f13b9321ec8f9550cd1557ed28ac6ae91e612c (patch) | |
tree | cb4066631e701617bc35131231469e2c8c343ccf /drivers/scsi/sun3_NCR5380.c | |
parent | 4d3d2a54f731aa25f66adcf934ba9a55ca8204d4 (diff) |
ncr5380: Cleanup TAG_NEXT and TAG_NONE macros
Both atari_NCR5380.c and sun3_NCR5380.c core drivers #undef TAG_NONE and
then redefine it. But the original definition is unused because NCR5380.c
lacks support for tagged queueing. So just define it once.
The TAG_NEXT macro only appears in the arguments to NCR5380_select() calls.
But that routine doesn't use its tag argument as the tag was already
assigned in NCR5380_main(). So remove the unused argument and the macro.
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Tested-by: Michael Schmitz <schmitzmic@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/sun3_NCR5380.c')
-rw-r--r-- | drivers/scsi/sun3_NCR5380.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/drivers/scsi/sun3_NCR5380.c b/drivers/scsi/sun3_NCR5380.c index 24e90c9776a6..3586fecdc8bb 100644 --- a/drivers/scsi/sun3_NCR5380.c +++ b/drivers/scsi/sun3_NCR5380.c @@ -305,10 +305,6 @@ static struct scsi_host_template *the_template = NULL; * important: the tag bit must be cleared before 'nr_allocated' is decreased. */ -/* -1 for TAG_NONE is not possible with unsigned char cmd->tag */ -#undef TAG_NONE -#define TAG_NONE 0xff - /* For the m68k, the number of bits in 'allocated' must be a multiple of 32! */ #if (MAX_TAGS % 32) != 0 #error "MAX_TAGS must be a multiple of 32!" @@ -1057,9 +1053,7 @@ static void NCR5380_main (struct work_struct *bl) #ifdef SUPPORT_TAGS cmd_get_tag( tmp, tmp->cmnd[0] != REQUEST_SENSE ); #endif - if (!NCR5380_select(instance, tmp, - (tmp->cmnd[0] == REQUEST_SENSE) ? TAG_NONE : - TAG_NEXT)) { + if (!NCR5380_select(instance, tmp)) { break; } else { local_irq_disable(); @@ -1292,16 +1286,14 @@ static void collect_stats(struct NCR5380_hostdata *hostdata, /* * Function : int NCR5380_select(struct Scsi_Host *instance, - * struct scsi_cmnd *cmd, int tag); + * struct scsi_cmnd *cmd) * * Purpose : establishes I_T_L or I_T_L_Q nexus for new or existing command, * including ARBITRATION, SELECTION, and initial message out for * IDENTIFY and queue messages. * * Inputs : instance - instantiation of the 5380 driver on which this - * target lives, cmd - SCSI command to execute, tag - set to TAG_NEXT for - * new tag, TAG_NONE for untagged queueing, otherwise set to the tag for - * the command that is presently connected. + * target lives, cmd - SCSI command to execute. * * Returns : -1 if selection could not execute for some reason, * 0 if selection succeeded or failed because the target @@ -1321,8 +1313,7 @@ static void collect_stats(struct NCR5380_hostdata *hostdata, * cmd->result host byte set to DID_BAD_TARGET. */ -static int NCR5380_select(struct Scsi_Host *instance, struct scsi_cmnd *cmd, - int tag) +static int NCR5380_select(struct Scsi_Host *instance, struct scsi_cmnd *cmd) { SETUP_HOSTDATA(instance); unsigned char tmp[3], phase; @@ -2735,7 +2726,7 @@ static int NCR5380_abort(struct scsi_cmnd *cmd) local_irq_restore(flags); dprintk(NDEBUG_ABORT, "scsi%d: aborting disconnected command.\n", HOSTNO); - if (NCR5380_select (instance, cmd, (int) cmd->tag)) + if (NCR5380_select(instance, cmd)) return FAILED; dprintk(NDEBUG_ABORT, "scsi%d: nexus reestablished.\n", HOSTNO); |