Commit f8c4e50d authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[PATCH] small scsi compile fixes

This is stuff like next: pointers that are not present rather than
anything bigger
parent ee29d109
...@@ -468,7 +468,6 @@ void tw_unmask_command_interrupt(TW_Device_Extension *tw_dev); ...@@ -468,7 +468,6 @@ void tw_unmask_command_interrupt(TW_Device_Extension *tw_dev);
/* Scsi_Host_Template Initializer */ /* Scsi_Host_Template Initializer */
#define TWXXXX { \ #define TWXXXX { \
next : NULL, \
module : NULL, \ module : NULL, \
proc_name : "3w-xxxx", \ proc_name : "3w-xxxx", \
proc_info : tw_scsi_proc_info, \ proc_info : tw_scsi_proc_info, \
......
...@@ -37,18 +37,13 @@ extern const char *atp870u_info(struct Scsi_Host *); ...@@ -37,18 +37,13 @@ extern const char *atp870u_info(struct Scsi_Host *);
extern int atp870u_proc_info(char *, char **, off_t, int, int, int); extern int atp870u_proc_info(char *, char **, off_t, int, int, int);
#define ATP870U { \ #define ATP870U { \
next: NULL, \
module: NULL, \
proc_info: atp870u_proc_info, \ proc_info: atp870u_proc_info, \
name: NULL, \
detect: atp870u_detect, \ detect: atp870u_detect, \
release: atp870u_release, \ release: atp870u_release, \
info: atp870u_info, \ info: atp870u_info, \
command: atp870u_command, \ command: atp870u_command, \
queuecommand: atp870u_queuecommand, \ queuecommand: atp870u_queuecommand, \
eh_strategy_handler: NULL, \
eh_abort_handler: atp870u_abort, \ eh_abort_handler: atp870u_abort, \
slave_attach: NULL, \
bios_param: atp870u_biosparam, \ bios_param: atp870u_biosparam, \
can_queue: qcnt, /* max simultaneous cmds */\ can_queue: qcnt, /* max simultaneous cmds */\
this_id: 7, /* scsi id of host adapter */\ this_id: 7, /* scsi id of host adapter */\
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
#include <linux/stat.h> #include <linux/stat.h>
#include <linux/mca.h> #include <linux/mca.h>
#include <linux/string.h>
#include <asm/system.h> #include <asm/system.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <asm/io.h> #include <asm/io.h>
...@@ -504,15 +505,16 @@ static void interrupt_handler (int irq, void *dev_id, struct pt_regs *regs) ...@@ -504,15 +505,16 @@ static void interrupt_handler (int irq, void *dev_id, struct pt_regs *regs)
unsigned long flags; unsigned long flags;
Scsi_Cmnd *cmd; Scsi_Cmnd *cmd;
int lastSCSI; int lastSCSI;
struct Scsi_Host *dev = dev_id;
IBMLOCK(dev_id) IBMLOCK(dev)
/* search for one adapter-response on shared interrupt */ /* search for one adapter-response on shared interrupt */
for (host_index=0; for (host_index=0;
hosts[host_index] && !(inb(IM_STAT_REG(host_index)) & IM_INTR_REQUEST); hosts[host_index] && !(inb(IM_STAT_REG(host_index)) & IM_INTR_REQUEST);
host_index++); host_index++);
/* return if some other device on this IRQ caused the interrupt */ /* return if some other device on this IRQ caused the interrupt */
if (!hosts[host_index]) { if (!hosts[host_index]) {
IBMUNLOCK(dev_id) IBMUNLOCK(dev)
return; return;
} }
...@@ -521,15 +523,16 @@ static void interrupt_handler (int irq, void *dev_id, struct pt_regs *regs) ...@@ -521,15 +523,16 @@ static void interrupt_handler (int irq, void *dev_id, struct pt_regs *regs)
if ((reset_status(host_index) == IM_RESET_NOT_IN_PROGRESS_NO_INT)|| if ((reset_status(host_index) == IM_RESET_NOT_IN_PROGRESS_NO_INT)||
(reset_status(host_index) == IM_RESET_FINISHED_OK_NO_INT)) { (reset_status(host_index) == IM_RESET_FINISHED_OK_NO_INT)) {
reset_status(host_index) = IM_RESET_NOT_IN_PROGRESS; reset_status(host_index) = IM_RESET_NOT_IN_PROGRESS;
IBMUNLOCK(dev_id) IBMUNLOCK(dev)
return; return;
} }
/*must wait for attention reg not busy, then send EOI to subsystem */ /*must wait for attention reg not busy, then send EOI to subsystem */
while (1) { while (1) {
if (!(inb (IM_STAT_REG(host_index)) & IM_BUSY)) break; if (!(inb (IM_STAT_REG(host_index)) & IM_BUSY)) break;
IBMUNLOCK(dev_id) /* cycle interrupt */ IBMUNLOCK(dev) /* cycle interrupt */
IBMLOCK(dev_id) cpu_relax();
IBMLOCK(dev)
} }
ihost_index=host_index; ihost_index=host_index;
/*get command result and logical device */ /*get command result and logical device */
...@@ -539,7 +542,7 @@ static void interrupt_handler (int irq, void *dev_id, struct pt_regs *regs) ...@@ -539,7 +542,7 @@ static void interrupt_handler (int irq, void *dev_id, struct pt_regs *regs)
/* get the last_scsi_command here */ /* get the last_scsi_command here */
lastSCSI = last_scsi_command(ihost_index)[ldn]; lastSCSI = last_scsi_command(ihost_index)[ldn];
outb (IM_EOI | ldn, IM_ATTN_REG(ihost_index)); outb (IM_EOI | ldn, IM_ATTN_REG(ihost_index));
IBMUNLOCK(dev_id) IBMUNLOCK(dev)
/*these should never happen (hw fails, or a local programming bug) */ /*these should never happen (hw fails, or a local programming bug) */
if (!global_command_error_excuse) { if (!global_command_error_excuse) {
switch (cmd_result) { switch (cmd_result) {
...@@ -1435,12 +1438,13 @@ void internal_ibmmca_scsi_setup (char *str, int *ints) ...@@ -1435,12 +1438,13 @@ void internal_ibmmca_scsi_setup (char *str, int *ints)
return; return;
} }
static int ibmmca_getinfo (char *buf, int slot, void *dev) static int ibmmca_getinfo (char *buf, int slot, void *dev_id)
{ {
struct Scsi_Host *shpnt; struct Scsi_Host *shpnt;
int len, speciale, connectore, k; int len, speciale, connectore, k;
unsigned int pos[8]; unsigned int pos[8];
unsigned long flags; unsigned long flags;
struct Scsi_Host *dev = dev_id;
IBMLOCK(dev) IBMLOCK(dev)
shpnt = dev; /* assign host-structure to local pointer */ shpnt = dev; /* assign host-structure to local pointer */
......
...@@ -199,6 +199,8 @@ int imm_detect(Scsi_Host_Template * host) ...@@ -199,6 +199,8 @@ int imm_detect(Scsi_Host_Template * host)
continue; continue;
} }
INIT_WORK(&imm_hosts[i].imm_tq, imm_interrupt, &imm_hosts[i]);
host->can_queue = IMM_CAN_QUEUE; host->can_queue = IMM_CAN_QUEUE;
host->sg_tablesize = imm_sg; host->sg_tablesize = imm_sg;
hreg = scsi_register(host, 0); hreg = scsi_register(host, 0);
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#include <linux/blk.h> #include <linux/blk.h>
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
#include <linux/stat.h> #include <linux/stat.h>
#include <linux/tqueue.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/reboot.h> #include <linux/reboot.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
......
...@@ -201,6 +201,8 @@ int ppa_detect(Scsi_Host_Template * host) ...@@ -201,6 +201,8 @@ int ppa_detect(Scsi_Host_Template * host)
default: /* Never gets here */ default: /* Never gets here */
continue; continue;
} }
INIT_WORK(&ppa_hosts[i].ppa_tq, ppa_interrupt, &ppa_hosts[i]);
host->can_queue = PPA_CAN_QUEUE; host->can_queue = PPA_CAN_QUEUE;
host->sg_tablesize = ppa_sg; host->sg_tablesize = ppa_sg;
......
...@@ -1324,22 +1324,12 @@ void qla1280_setup(char *s, int *dummy); ...@@ -1324,22 +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, */ \ /* use_new_eh_code: 0, */ \
abort: qla1280_abort, \ abort: qla1280_abort, \
reset: qla1280_reset, \ reset: qla1280_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