patch-2.1.96 linux/drivers/scsi/aha1542.c
Next file: linux/drivers/scsi/aic7xxx/aic7xxx.reg
Previous file: linux/drivers/scsi/advansys.c
Back to the patch index
Back to the overall index
- Lines: 43
- Date:
Sat Apr 11 11:13:25 1998
- Orig file:
v2.1.95/linux/drivers/scsi/aha1542.c
- Orig date:
Sun Jan 4 10:55:09 1998
diff -u --recursive --new-file v2.1.95/linux/drivers/scsi/aha1542.c linux/drivers/scsi/aha1542.c
@@ -30,6 +30,7 @@
#include <linux/proc_fs.h>
#include <asm/dma.h>
#include <asm/system.h>
+#include <asm/spinlock.h>
#include <asm/io.h>
#include <linux/blk.h>
#include "scsi.h"
@@ -129,6 +130,8 @@
static void setup_mailboxes(int base_io, struct Scsi_Host * shpnt);
static int aha1542_restart(struct Scsi_Host * shost);
+static void aha1542_intr_handle(int irq, void *dev_id, struct pt_regs *regs);
+static void do_aha1542_intr_handle(int irq, void *dev_id, struct pt_regs *regs);
#define aha1542_intr_reset(base) outb(IRST, CONTROL(base))
@@ -363,6 +366,16 @@
return 0; /* 0 = not ok */
}
+/* A quick wrapper for do_aha1542_intr_handle to grab the spin lock */
+static void do_aha1542_intr_handle(int irq, void *dev_id, struct pt_regs *regs)
+{
+ unsigned long flags;
+
+ spin_lock_irqsave(&io_request_lock, flags);
+ aha1542_intr_handle(irq, dev_id, regs);
+ spin_unlock_irqrestore(&io_request_lock, flags);
+}
+
/* A "high" level interrupt handler */
static void aha1542_intr_handle(int irq, void *dev_id, struct pt_regs *regs)
{
@@ -1013,7 +1026,7 @@
DEB(printk("aha1542_detect: enable interrupt channel %d\n", irq_level));
save_flags(flags);
cli();
- if (request_irq(irq_level,aha1542_intr_handle, 0, "aha1542", NULL)) {
+ if (request_irq(irq_level,do_aha1542_intr_handle, 0, "aha1542", NULL)) {
printk("Unable to allocate IRQ for adaptec controller.\n");
restore_flags(flags);
goto unregister;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov