diff options
author | Finn Thain <fthain@telegraphics.com.au> | 2014-11-12 00:11:53 -0500 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-11-20 03:11:05 -0500 |
commit | 76f13b9321ec8f9550cd1557ed28ac6ae91e612c (patch) | |
tree | cb4066631e701617bc35131231469e2c8c343ccf /drivers/scsi/atari_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/atari_NCR5380.c')
-rw-r--r-- | drivers/scsi/atari_NCR5380.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/drivers/scsi/atari_NCR5380.c b/drivers/scsi/atari_NCR5380.c index 339f238598b1..3cfd39c583ad 100644 --- a/drivers/scsi/atari_NCR5380.c +++ b/drivers/scsi/atari_NCR5380.c | |||
@@ -316,10 +316,6 @@ static struct scsi_host_template *the_template = NULL; | |||
316 | * important: the tag bit must be cleared before 'nr_allocated' is decreased. | 316 | * important: the tag bit must be cleared before 'nr_allocated' is decreased. |
317 | */ | 317 | */ |
318 | 318 | ||
319 | /* -1 for TAG_NONE is not possible with unsigned char cmd->tag */ | ||
320 | #undef TAG_NONE | ||
321 | #define TAG_NONE 0xff | ||
322 | |||
323 | typedef struct { | 319 | typedef struct { |
324 | DECLARE_BITMAP(allocated, MAX_TAGS); | 320 | DECLARE_BITMAP(allocated, MAX_TAGS); |
325 | int nr_allocated; | 321 | int nr_allocated; |
@@ -1118,9 +1114,7 @@ static void NCR5380_main(struct work_struct *work) | |||
1118 | #ifdef SUPPORT_TAGS | 1114 | #ifdef SUPPORT_TAGS |
1119 | cmd_get_tag(tmp, tmp->cmnd[0] != REQUEST_SENSE); | 1115 | cmd_get_tag(tmp, tmp->cmnd[0] != REQUEST_SENSE); |
1120 | #endif | 1116 | #endif |
1121 | if (!NCR5380_select(instance, tmp, | 1117 | if (!NCR5380_select(instance, tmp)) { |
1122 | (tmp->cmnd[0] == REQUEST_SENSE) ? TAG_NONE : | ||
1123 | TAG_NEXT)) { | ||
1124 | falcon_dont_release--; | 1118 | falcon_dont_release--; |
1125 | /* release if target did not response! */ | 1119 | /* release if target did not response! */ |
1126 | falcon_release_lock_if_possible(hostdata); | 1120 | falcon_release_lock_if_possible(hostdata); |
@@ -1351,17 +1345,14 @@ static void collect_stats(struct NCR5380_hostdata* hostdata, Scsi_Cmnd *cmd) | |||
1351 | #endif | 1345 | #endif |
1352 | 1346 | ||
1353 | /* | 1347 | /* |
1354 | * Function : int NCR5380_select (struct Scsi_Host *instance, Scsi_Cmnd *cmd, | 1348 | * Function : int NCR5380_select (struct Scsi_Host *instance, Scsi_Cmnd *cmd) |
1355 | * int tag); | ||
1356 | * | 1349 | * |
1357 | * Purpose : establishes I_T_L or I_T_L_Q nexus for new or existing command, | 1350 | * Purpose : establishes I_T_L or I_T_L_Q nexus for new or existing command, |
1358 | * including ARBITRATION, SELECTION, and initial message out for | 1351 | * including ARBITRATION, SELECTION, and initial message out for |
1359 | * IDENTIFY and queue messages. | 1352 | * IDENTIFY and queue messages. |
1360 | * | 1353 | * |
1361 | * Inputs : instance - instantiation of the 5380 driver on which this | 1354 | * Inputs : instance - instantiation of the 5380 driver on which this |
1362 | * target lives, cmd - SCSI command to execute, tag - set to TAG_NEXT for | 1355 | * target lives, cmd - SCSI command to execute. |
1363 | * new tag, TAG_NONE for untagged queueing, otherwise set to the tag for | ||
1364 | * the command that is presently connected. | ||
1365 | * | 1356 | * |
1366 | * Returns : -1 if selection could not execute for some reason, | 1357 | * Returns : -1 if selection could not execute for some reason, |
1367 | * 0 if selection succeeded or failed because the target | 1358 | * 0 if selection succeeded or failed because the target |
@@ -1381,7 +1372,7 @@ static void collect_stats(struct NCR5380_hostdata* hostdata, Scsi_Cmnd *cmd) | |||
1381 | * cmd->result host byte set to DID_BAD_TARGET. | 1372 | * cmd->result host byte set to DID_BAD_TARGET. |
1382 | */ | 1373 | */ |
1383 | 1374 | ||
1384 | static int NCR5380_select(struct Scsi_Host *instance, Scsi_Cmnd *cmd, int tag) | 1375 | static int NCR5380_select(struct Scsi_Host *instance, Scsi_Cmnd *cmd) |
1385 | { | 1376 | { |
1386 | SETUP_HOSTDATA(instance); | 1377 | SETUP_HOSTDATA(instance); |
1387 | unsigned char tmp[3], phase; | 1378 | unsigned char tmp[3], phase; |
@@ -2757,7 +2748,7 @@ int NCR5380_abort(Scsi_Cmnd *cmd) | |||
2757 | local_irq_restore(flags); | 2748 | local_irq_restore(flags); |
2758 | dprintk(NDEBUG_ABORT, "scsi%d: aborting disconnected command.\n", HOSTNO); | 2749 | dprintk(NDEBUG_ABORT, "scsi%d: aborting disconnected command.\n", HOSTNO); |
2759 | 2750 | ||
2760 | if (NCR5380_select(instance, cmd, (int)cmd->tag)) | 2751 | if (NCR5380_select(instance, cmd)) |
2761 | return FAILED; | 2752 | return FAILED; |
2762 | 2753 | ||
2763 | dprintk(NDEBUG_ABORT, "scsi%d: nexus reestablished.\n", HOSTNO); | 2754 | dprintk(NDEBUG_ABORT, "scsi%d: nexus reestablished.\n", HOSTNO); |