Messages in this thread Patch in this message | | | Date | Thu, 10 Sep 1998 17:32:43 -0300 (EST) | From | Marcelo Tosatti <> | Subject | [patch] scsi driver smp fixes |
| |
this patch locks io_request_lock before scsi_done in atp870u driver
- Marcelo --- atp870u.c.orig Thu Sep 10 17:24:00 1998 +++ atp870u.c Thu Sep 10 17:30:06 1998 @@ -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_lock_irqrestore(&io_request_lock, flags); + curr_req[h][tarid]=0; workingu[h]--; if (wide_idu[h] != 0) | |