ncr5380: Remove disused atari_NCR5380.c core driver
Now that atari_scsi and sun3_scsi have been converted to use the NCR5380.c core driver, remove atari_NCR5380.c. Also remove the last vestiges of its Tagged Command Queueing implementation from the wrapper drivers. The TCQ support in atari_NCR5380.c is abandoned by this patch. It is not merged into the remaining core driver because, 1) atari_scsi defines SUPPORT_TAGS but leaves FLAG_TAGGED_QUEUING disabled by default, which indicates that it is mostly undesirable. 2) I'm told that it doesn't work correctly when enabled. 3) The algorithm does not make use of block layer tags which it will have to do because scmd->tag is deprecated. 4) sun3_scsi doesn't define SUPPORT_TAGS at all, yet the the SUPPORT_TAGS macro interacts with the CONFIG_SUN3 macro in 'interesting' ways. 5) Compile-time configuration with macros like SUPPORT_TAGS caused the configuration space to explode, leading to untestable and unmaintainable code that is too hard to reason about. The merge_contiguous_buffers() code is also abandoned. This was unused by sun3_scsi. Only atari_scsi used it and then only on TT, because only TT supports scatter/gather. I suspect that the TT would work fine with ENABLE_CLUSTERING instead. If someone can benchmark the difference then perhaps the merge_contiguous_buffers() code can be be justified. Until then we are better off without the extra complexity. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Reviewed-by: Hannes Reinecke <hare@suse.com> Tested-by: Michael Schmitz <schmitzmic@gmail.com> Tested-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
e9db3198e0
commit
c4ec6f924f
@ -33,13 +33,6 @@
|
||||
|
||||
/* Adapted for the Sun 3 by Sam Creasey. */
|
||||
|
||||
/*
|
||||
* Further development / testing that should be done :
|
||||
*
|
||||
* 4. Test SCSI-II tagged queueing (I have no devices which support
|
||||
* tagged queueing)
|
||||
*/
|
||||
|
||||
/*
|
||||
* Design
|
||||
*
|
||||
@ -1257,14 +1250,6 @@ static struct scsi_cmnd *NCR5380_select(struct Scsi_Host *instance,
|
||||
* was true but before BSY was false during selection, the information
|
||||
* transfer phase should be a MESSAGE OUT phase so that we can send the
|
||||
* IDENTIFY message.
|
||||
*
|
||||
* If SCSI-II tagged queuing is enabled, we also send a SIMPLE_QUEUE_TAG
|
||||
* message (2 bytes) with a tag ID that we increment with every command
|
||||
* until it wraps back to 0.
|
||||
*
|
||||
* XXX - it turns out that there are some broken SCSI-II devices,
|
||||
* which claim to support tagged queuing but fail when more than
|
||||
* some number of commands are issued at once.
|
||||
*/
|
||||
|
||||
/* Wait for start of REQ/ACK handshake */
|
||||
@ -1287,9 +1272,6 @@ static struct scsi_cmnd *NCR5380_select(struct Scsi_Host *instance,
|
||||
tmp[0] = IDENTIFY(((instance->irq == NO_IRQ) ? 0 : 1), cmd->device->lun);
|
||||
|
||||
len = 1;
|
||||
cmd->tag = 0;
|
||||
|
||||
/* Send message(s) */
|
||||
data = tmp;
|
||||
phase = PHASE_MSGOUT;
|
||||
NCR5380_transfer_pio(instance, &phase, &len, &data);
|
||||
@ -2256,8 +2238,8 @@ static void NCR5380_reselect(struct Scsi_Host *instance)
|
||||
NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE);
|
||||
|
||||
hostdata->connected = tmp;
|
||||
dsprintk(NDEBUG_RESELECTION, instance, "nexus established, target %d, lun %llu, tag %d\n",
|
||||
scmd_id(tmp), tmp->device->lun, tmp->tag);
|
||||
dsprintk(NDEBUG_RESELECTION, instance, "nexus established, target %d, lun %llu\n",
|
||||
scmd_id(tmp), tmp->device->lun);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -199,13 +199,6 @@
|
||||
|
||||
#define PHASE_SR_TO_TCR(phase) ((phase) >> 2)
|
||||
|
||||
/*
|
||||
* "Special" value for the (unsigned char) command tag, to indicate
|
||||
* I_T_L nexus instead of I_T_L_Q.
|
||||
*/
|
||||
|
||||
#define TAG_NONE 0xff
|
||||
|
||||
/*
|
||||
* These are "special" values for the irq and dma_channel fields of the
|
||||
* Scsi_Host structure
|
||||
@ -223,17 +216,8 @@
|
||||
#define FLAG_DMA_FIXUP 1 /* Use DMA errata workarounds */
|
||||
#define FLAG_NO_PSEUDO_DMA 8 /* Inhibit DMA */
|
||||
#define FLAG_LATE_DMA_SETUP 32 /* Setup NCR before DMA H/W */
|
||||
#define FLAG_TAGGED_QUEUING 64 /* as X3T9.2 spelled it */
|
||||
#define FLAG_TOSHIBA_DELAY 128 /* Allow for borken CD-ROMs */
|
||||
|
||||
#ifdef SUPPORT_TAGS
|
||||
struct tag_alloc {
|
||||
DECLARE_BITMAP(allocated, MAX_TAGS);
|
||||
int nr_allocated;
|
||||
int queue_size;
|
||||
};
|
||||
#endif
|
||||
|
||||
struct NCR5380_hostdata {
|
||||
NCR5380_implementation_fields; /* implementation specific */
|
||||
struct Scsi_Host *host; /* Host backpointer */
|
||||
@ -254,9 +238,6 @@ struct NCR5380_hostdata {
|
||||
int read_overruns; /* number of bytes to cut from a
|
||||
* transfer to handle chip overruns */
|
||||
struct work_struct main_task;
|
||||
#ifdef SUPPORT_TAGS
|
||||
struct tag_alloc TagAlloc[8][8]; /* 8 targets and 8 LUNs */
|
||||
#endif
|
||||
struct workqueue_struct *work_q;
|
||||
unsigned long accesses_per_ms; /* chip register accesses per ms */
|
||||
};
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -87,9 +87,6 @@
|
||||
|
||||
/* Definitions for the core NCR5380 driver. */
|
||||
|
||||
#define SUPPORT_TAGS
|
||||
#define MAX_TAGS 32
|
||||
|
||||
#define NCR5380_implementation_fields /* none */
|
||||
|
||||
#define NCR5380_read(reg) atari_scsi_reg_read(reg)
|
||||
@ -189,8 +186,6 @@ static int setup_cmd_per_lun = -1;
|
||||
module_param(setup_cmd_per_lun, int, 0);
|
||||
static int setup_sg_tablesize = -1;
|
||||
module_param(setup_sg_tablesize, int, 0);
|
||||
static int setup_use_tagged_queuing = -1;
|
||||
module_param(setup_use_tagged_queuing, int, 0);
|
||||
static int setup_hostid = -1;
|
||||
module_param(setup_hostid, int, 0);
|
||||
static int setup_toshiba_delay = -1;
|
||||
@ -479,8 +474,7 @@ static int __init atari_scsi_setup(char *str)
|
||||
setup_sg_tablesize = ints[3];
|
||||
if (ints[0] >= 4)
|
||||
setup_hostid = ints[4];
|
||||
if (ints[0] >= 5)
|
||||
setup_use_tagged_queuing = ints[5];
|
||||
/* ints[5] (use_tagged_queuing) is ignored */
|
||||
/* ints[6] (use_pdma) is ignored */
|
||||
if (ints[0] >= 7)
|
||||
setup_toshiba_delay = ints[7];
|
||||
@ -853,9 +847,6 @@ static int __init atari_scsi_probe(struct platform_device *pdev)
|
||||
instance->irq = irq->start;
|
||||
|
||||
host_flags |= IS_A_TT() ? 0 : FLAG_LATE_DMA_SETUP;
|
||||
#ifdef SUPPORT_TAGS
|
||||
host_flags |= setup_use_tagged_queuing > 0 ? FLAG_TAGGED_QUEUING : 0;
|
||||
#endif
|
||||
host_flags |= setup_toshiba_delay > 0 ? FLAG_TOSHIBA_DELAY : 0;
|
||||
|
||||
error = NCR5380_init(instance, host_flags);
|
||||
|
@ -55,8 +55,6 @@ static int setup_sg_tablesize = -1;
|
||||
module_param(setup_sg_tablesize, int, 0);
|
||||
static int setup_use_pdma = -1;
|
||||
module_param(setup_use_pdma, int, 0);
|
||||
static int setup_use_tagged_queuing = -1;
|
||||
module_param(setup_use_tagged_queuing, int, 0);
|
||||
static int setup_hostid = -1;
|
||||
module_param(setup_hostid, int, 0);
|
||||
static int setup_toshiba_delay = -1;
|
||||
@ -95,8 +93,7 @@ static int __init mac_scsi_setup(char *str)
|
||||
setup_sg_tablesize = ints[3];
|
||||
if (ints[0] >= 4)
|
||||
setup_hostid = ints[4];
|
||||
if (ints[0] >= 5)
|
||||
setup_use_tagged_queuing = ints[5];
|
||||
/* ints[5] (use_tagged_queuing) is ignored */
|
||||
if (ints[0] >= 6)
|
||||
setup_use_pdma = ints[6];
|
||||
if (ints[0] >= 7)
|
||||
@ -382,9 +379,6 @@ static int __init mac_scsi_probe(struct platform_device *pdev)
|
||||
} else
|
||||
host_flags |= FLAG_NO_PSEUDO_DMA;
|
||||
|
||||
#ifdef SUPPORT_TAGS
|
||||
host_flags |= setup_use_tagged_queuing > 0 ? FLAG_TAGGED_QUEUING : 0;
|
||||
#endif
|
||||
host_flags |= setup_toshiba_delay > 0 ? FLAG_TOSHIBA_DELAY : 0;
|
||||
|
||||
error = NCR5380_init(instance, host_flags | FLAG_LATE_DMA_SETUP);
|
||||
|
@ -41,9 +41,6 @@
|
||||
|
||||
/* Definitions for the core NCR5380 driver. */
|
||||
|
||||
/* #define SUPPORT_TAGS */
|
||||
/* #define MAX_TAGS 32 */
|
||||
|
||||
#define NCR5380_implementation_fields /* none */
|
||||
|
||||
#define NCR5380_read(reg) sun3scsi_read(reg)
|
||||
@ -75,10 +72,6 @@ static int setup_cmd_per_lun = -1;
|
||||
module_param(setup_cmd_per_lun, int, 0);
|
||||
static int setup_sg_tablesize = -1;
|
||||
module_param(setup_sg_tablesize, int, 0);
|
||||
#ifdef SUPPORT_TAGS
|
||||
static int setup_use_tagged_queuing = -1;
|
||||
module_param(setup_use_tagged_queuing, int, 0);
|
||||
#endif
|
||||
static int setup_hostid = -1;
|
||||
module_param(setup_hostid, int, 0);
|
||||
|
||||
@ -512,10 +505,6 @@ static int __init sun3_scsi_probe(struct platform_device *pdev)
|
||||
instance->io_port = (unsigned long)ioaddr;
|
||||
instance->irq = irq->start;
|
||||
|
||||
#ifdef SUPPORT_TAGS
|
||||
host_flags |= setup_use_tagged_queuing > 0 ? FLAG_TAGGED_QUEUING : 0;
|
||||
#endif
|
||||
|
||||
error = NCR5380_init(instance, host_flags);
|
||||
if (error)
|
||||
goto fail_init;
|
||||
|
Loading…
Reference in New Issue
Block a user