patch-2.3.10 linux/drivers/scsi/atp870u.c

Next file: linux/drivers/scsi/constants.c
Previous file: linux/drivers/scsi/aic7xxx_reg.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.9/linux/drivers/scsi/atp870u.c linux/drivers/scsi/atp870u.c
@@ -3,7 +3,9 @@
  *
  *  Copyright (C) 1997	Wu Ching Chen
  *  2.1.x update (C) 1998  Krzysztof G. Baranowski
- *
+ *   
+ * Marcelo Tosatti <marcelo@conectiva.com.br> : SMP fixes 
+ * 
  */
 
 #include <linux/module.h>
@@ -17,6 +19,7 @@
 #include <linux/proc_fs.h>
 #include <asm/system.h>
 #include <asm/io.h>
+#include <asm/spinlock.h>
 #include <linux/pci.h>
 #include <linux/blk.h>
 #include "scsi.h"
@@ -60,6 +63,7 @@
 
 static void atp870u_intr_handle(int irq, void *dev_id, struct pt_regs *regs)
 {
+	 unsigned long flags;
     unsigned short int	tmpcip,id;
     unsigned char	i,j,h,tarid,lun;
     unsigned char  *prd;
@@ -364,7 +368,10 @@
 	     outb(0x80,tmport);
 	  }   */
 go_42:
+	  spin_lock_irqsave(&io_request_lock, flags);
 	  (*workrequ->scsi_done)(workrequ);
+	  spin_unlock_irqrestore(&io_request_lock, flags);
+
 	  curr_req[h][tarid]=0;
 	  workingu[h]--;
 	  if (wide_idu[h] != 0)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)