patch-2.1.96 linux/drivers/scsi/qlogicfas.c

Next file: linux/drivers/scsi/qlogicisp.c
Previous file: linux/drivers/scsi/psi240i.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.95/linux/drivers/scsi/qlogicfas.c linux/drivers/scsi/qlogicfas.c
@@ -125,6 +125,7 @@
 #include <linux/unistd.h>
 #include <asm/io.h>
 #include <asm/irq.h>
+#include <asm/spinlock.h>
 #include "sd.h"
 #include "hosts.h"
 #include "qlogicfas.h"
@@ -446,7 +447,7 @@
 #if QL_USE_IRQ
 /*----------------------------------------------------------------*/
 /* interrupt handler */
-static void	       ql_ihandl(int irq, void *dev_id, struct pt_regs * regs)
+static void	    ql_ihandl(int irq, void *dev_id, struct pt_regs * regs)
 {
 Scsi_Cmnd	   *icmd;
 	REG0;
@@ -464,6 +465,15 @@
 /* if result is CHECK CONDITION done calls qcommand to request sense */
 	(icmd->scsi_done) (icmd);
 }
+
+static void	    do_ql_ihandl(int irq, void *dev_id, struct pt_regs * regs)
+{
+	unsigned long flags;
+
+	spin_lock_irqsave(&io_request_lock, flags);
+	ql_ihandl(irq, dev_id, regs);
+	spin_unlock_irqrestore(&io_request_lock, flags);
+}
 #endif
 
 /*----------------------------------------------------------------*/
@@ -609,7 +619,7 @@
 	else
 		printk( "Ql: Using preset IRQ %d\n", qlirq );
 
-	if (qlirq >= 0 && !request_irq(qlirq, ql_ihandl, 0, "qlogicfas", NULL))
+	if (qlirq >= 0 && !request_irq(qlirq, do_ql_ihandl, 0, "qlogicfas", NULL))
 		host->can_queue = 1;
 #endif
 	request_region( qbase , 0x10 ,"qlogicfas");

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov