Commit c38ec0c8 authored by Doug Ledford's avatar Doug Ledford

host struct cleanups

parent 287bda4d
......@@ -55,8 +55,6 @@ extern int BusLogic_DetectHostAdapter(SCSI_Host_Template_T *);
extern int BusLogic_ReleaseHostAdapter(SCSI_Host_T *);
extern int BusLogic_QueueCommand(SCSI_Command_T *,
void (*CompletionRoutine)(SCSI_Command_T *));
extern int BusLogic_AbortCommand(SCSI_Command_T *);
extern int BusLogic_ResetCommand(SCSI_Command_T *, unsigned int);
extern int BusLogic_BIOSDiskParameters(SCSI_Disk_T *, struct block_device *,
int *);
extern int BusLogic_ProcDirectoryInfo(char *, char **, off_t, int, int, int);
......@@ -75,8 +73,6 @@ extern int BusLogic_SlaveAttach(SCSI_Device_T *);
release: BusLogic_ReleaseHostAdapter, /* Release Host Adapter */ \
info: BusLogic_DriverInfo, /* Driver Info Function */ \
queuecommand: BusLogic_QueueCommand, /* Queue Command Function */ \
abort: BusLogic_AbortCommand, /* Abort Command Function */ \
reset: BusLogic_ResetCommand, /* Reset Command Function */ \
slave_attach: BusLogic_SlaveAttach, /* Configure a SCSI_Device*/ \
bios_param: BusLogic_BIOSDiskParameters, /* BIOS Disk Parameters */ \
unchecked_isa_dma: 1, /* Default Initial Value */ \
......
......@@ -35,13 +35,6 @@
release: aic7xxx_release, \
info: aic7xxx_info, \
queuecommand: aic7xxx_queue, \
eh_strategy_handler: NULL, \
eh_abort_handler: NULL, \
eh_device_reset_handler: NULL, \
eh_bus_reset_handler: NULL, \
eh_host_reset_handler: NULL, \
abort: aic7xxx_abort, \
reset: aic7xxx_reset, \
slave_attach: aic7xxx_slave_attach, \
slave_detach: aic7xxx_slave_detach, \
bios_param: aic7xxx_biosparam, \
......@@ -58,8 +51,6 @@ extern int aic7xxx_queue(Scsi_Cmnd *, void (*)(Scsi_Cmnd *));
extern int aic7xxx_biosparam(Disk *, struct block_device *, int[]);
extern int aic7xxx_detect(Scsi_Host_Template *);
extern int aic7xxx_command(Scsi_Cmnd *);
extern int aic7xxx_reset(Scsi_Cmnd *, unsigned int);
extern int aic7xxx_abort(Scsi_Cmnd *);
extern int aic7xxx_release(struct Scsi_Host *);
extern int aic7xxx_slave_attach(Scsi_Device *);
extern void aic7xxx_slave_detach(Scsi_Device *);
......
......@@ -28,8 +28,6 @@ extern int cpqfcTS_ioctl( Scsi_Device *ScsiDev, int Cmnd, void *arg);
queuecommand: cpqfcTS_queuecommand, \
eh_device_reset_handler: cpqfcTS_eh_device_reset, \
eh_abort_handler: cpqfcTS_eh_abort, \
reset: cpqfcTS_reset, \
abort: cpqfcTS_abort, \
bios_param: cpqfcTS_biosparam, \
can_queue: CPQFCTS_REQ_QUEUE_LEN, \
this_id: -1, \
......
......@@ -21,11 +21,7 @@ static int eata2x_slave_attach(Scsi_Device *);
detect: eata2x_detect, \
release: eata2x_release, \
queuecommand: eata2x_queuecommand, \
abort: NULL, \
reset: NULL, \
eh_abort_handler: eata2x_abort, \
eh_device_reset_handler: NULL, \
eh_bus_reset_handler: NULL, \
eh_host_reset_handler: eata2x_reset, \
bios_param: eata2x_biosparam, \
slave_attach: eata2x_slave_attach, \
......
......@@ -832,7 +832,7 @@ int i;
static void in2000_intr (int irqnum, void * dev_id, struct pt_regs *ptregs)
{
struct Scsi_Host *instance;
struct Scsi_Host *instance = dev_id;
struct IN2000_hostdata *hostdata;
Scsi_Cmnd *patch, *cmd;
uchar asr, sr, phs, id, lun, *ucp, msg;
......@@ -842,14 +842,6 @@ unsigned short *sp;
unsigned short f;
unsigned long flags;
for (instance = instance_list; instance; instance = instance->next) {
if (instance->irq == irqnum)
break;
}
if (!instance) {
printk("*** Hmm... interrupts are screwed up! ***\n");
return;
}
hostdata = (struct IN2000_hostdata *)instance->hostdata;
/* Get the spin_lock and disable further ints, for SMP */
......@@ -2046,7 +2038,7 @@ char buf[32];
write1_io(0,IO_FIFO_READ); /* start fifo out in read mode */
write1_io(0,IO_INTR_MASK); /* allow all ints */
x = int_tab[(switches & (SW_INT0 | SW_INT1)) >> SW_INT_SHIFT];
if (request_irq(x, in2000_intr, SA_INTERRUPT, "in2000", NULL)) {
if (request_irq(x, in2000_intr, SA_INTERRUPT, "in2000", instance)) {
printk("in2000_detect: Unable to allocate IRQ.\n");
detect_count--;
continue;
......@@ -2215,10 +2207,7 @@ Scsi_Cmnd *cmd;
int x,i;
static int stop = 0;
for (instance=instance_list; instance; instance=instance->next) {
if (instance->host_no == hn)
break;
}
instance = scsi_host_hn_get(hn);
if (!instance) {
printk("*** Hmm... Can't find host #%d!\n",hn);
return (-ESRCH);
......
......@@ -88,23 +88,11 @@ extern int inia100_biosparam(Scsi_Disk *, struct block_device *, int *);
#define inia100_REVID "Initio INI-A100U2W SCSI device driver; Revision: 1.02d"
#define INIA100 { \
module: NULL, \
proc_name: "inia100", \
proc_info: NULL, \
name: inia100_REVID, \
detect: inia100_detect, \
release: inia100_release, \
info: NULL, \
command: NULL, \
queuecommand: inia100_queue, \
eh_strategy_handler: NULL, \
eh_abort_handler: NULL, \
eh_device_reset_handler: NULL, \
eh_bus_reset_handler: NULL, \
eh_host_reset_handler: NULL, \
abort: inia100_abort, \
reset: inia100_reset, \
slave_attach: NULL, \
bios_param: inia100_biosparam, \
can_queue: 1, \
this_id: 1, \
......
......@@ -464,23 +464,13 @@
}
#else
#define IPS { \
module : NULL, \
proc_info : NULL, \
name : NULL, \
detect : ips_detect, \
release : ips_release, \
info : ips_info, \
command : NULL, \
queuecommand : ips_queue, \
eh_strategy_handler : NULL, \
eh_abort_handler : ips_eh_abort, \
eh_device_reset_handler : NULL, \
eh_bus_reset_handler : NULL, \
eh_host_reset_handler : ips_eh_reset, \
abort : NULL, \
reset : NULL, \
slave_attach : ips_slave_attach, \
slave_detach : NULL, \
bios_param : ips_biosparam, \
can_queue : 0, \
this_id: -1, \
......
......@@ -9125,12 +9125,9 @@ static int ncr53c8xx_proc_info(char *buffer, char **start, off_t offset,
printk("ncr53c8xx_proc_info: hostno=%d, func=%d\n", hostno, func);
#endif
for (host = first_host; host; host = host->next) {
if (host->hostt == the_template && host->host_no == hostno) {
if ((host = scsi_host_hn_get(hostno)) != NULL) {
host_data = (struct host_data *) host->hostdata;
ncb = host_data->ncb;
break;
}
}
if (!ncb)
......
......@@ -76,8 +76,6 @@ int ncr53c8xx_release(struct Scsi_Host *);
info: ncr53c8xx_info, \
queuecommand: ncr53c8xx_queue_command,\
slave_attach: ncr53c8xx_slave_attach, \
abort: ncr53c8xx_abort, \
reset: ncr53c8xx_reset, \
bios_param: scsicam_bios_param, \
can_queue: SCSI_NCR_CAN_QUEUE, \
this_id: 7, \
......
......@@ -1324,25 +1324,12 @@ void qla1280_setup(char *s, int *dummy);
*/
#define QLA1280_LINUX_TEMPLATE { \
next: NULL, \
module: NULL, \
proc_dir: NULL, \
proc_info: qla1280_proc_info, \
name: "Qlogic ISP 1280/12160", \
detect: qla1280_detect, \
release: qla1280_release, \
info: qla1280_info, \
ioctl: NULL, \
command: NULL, \
queuecommand: qla1280_queuecommand, \
eh_strategy_handler: NULL, \
eh_abort_handler: NULL, \
eh_device_reset_handler: NULL, \
eh_bus_reset_handler: NULL, \
eh_host_reset_handler: NULL, \
/* use_new_eh_code: 0, */ \
abort: qla1280_abort, \
reset: qla1280_reset, \
slave_attach: qla1280_slave_attach, \
bios_param: qla1280_biosparam, \
can_queue: 255, /* max simultaneous cmds */\
......
......@@ -87,7 +87,6 @@ int isp2x00_biosparam(Disk *, struct block_device *, int[]);
info: isp2x00_info, \
queuecommand: isp2x00_queuecommand, \
eh_abort_handler: isp2x00_abort, \
reset: isp2x00_reset, \
bios_param: isp2x00_biosparam, \
can_queue: QLOGICFC_REQ_QUEUE_LEN, \
this_id: -1, \
......
......@@ -75,8 +75,6 @@ int isp1020_biosparam(Disk *, struct block_device *, int[]);
release: isp1020_release, \
info: isp1020_info, \
queuecommand: isp1020_queuecommand, \
abort: isp1020_abort, \
reset: isp1020_reset, \
bios_param: isp1020_biosparam, \
can_queue: QLOGICISP_REQ_QUEUE_LEN, \
this_id: -1, \
......
......@@ -91,8 +91,6 @@ int sym53c8xx_release(struct Scsi_Host *);
info: sym53c8xx_info, \
queuecommand: sym53c8xx_queue_command,\
slave_attach: sym53c8xx_slave_attach, \
abort: sym53c8xx_abort, \
reset: sym53c8xx_reset, \
bios_param: scsicam_bios_param, \
can_queue: SCSI_NCR_CAN_QUEUE, \
this_id: 7, \
......
......@@ -49,7 +49,6 @@ static int wd7000_biosparam(Disk *, struct block_device *, int *);
detect: wd7000_detect, \
command: wd7000_command, \
queuecommand: wd7000_queuecommand, \
abort: wd7000_abort, \
eh_bus_reset_handler: wd7000_bus_reset, \
eh_device_reset_handler:wd7000_device_reset, \
eh_host_reset_handler: wd7000_host_reset, \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment