patch-2.1.95 linux/drivers/scsi/BusLogic.c

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

diff -u --recursive --new-file v2.1.94/linux/drivers/scsi/BusLogic.c linux/drivers/scsi/BusLogic.c
@@ -42,6 +42,9 @@
 #include <linux/stat.h>
 #include <linux/pci.h>
 #include <linux/bios32.h>
+
+#include <linux/blk.h>
+
 #include <asm/dma.h>
 #include <asm/io.h>
 #include <asm/irq.h>
@@ -3267,8 +3270,7 @@
   BusLogic_InterruptHandler handles hardware interrupts from BusLogic Host
   Adapters.
 */
-
-static void BusLogic_InterruptHandler(int IRQ_Channel,
+static void do_BusLogic_InterruptHandler(int IRQ_Channel,
 				      void *DeviceIdentifier,
 				      Registers_T *InterruptRegisters)
 {
@@ -3375,6 +3377,22 @@
 	}
 }
 
+/*
+ * This is the low-level interrupt handler:
+ * we get the io request lock here to guarantee
+ * that all of this is atomic wrt the setup
+ * functions.
+ */
+static void BusLogic_InterruptHandler(int IRQ_Channel,
+				      void *DeviceIdentifier,
+				      Registers_T *InterruptRegisters)
+{
+	unsigned long flags;
+
+	spin_lock_irqsave(&io_request_lock, flags);
+	do_BusLogic_InterruptHandler(IRQ_Channel, DeviceIdentifier, InterruptRegisters);
+	spin_unlock_irqrestore(&io_request_lock, flags);
+}
 
 /*
   BusLogic_WriteOutgoingMailbox places CCB and Action Code into an Outgoing

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