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