From 65290832bdbb7ca162529a3ed3c3c8b2aeea2d8f Mon Sep 17 00:00:00 2001 From: Hidetoshi Shimokawa Date: Sat, 25 Oct 2003 15:05:59 +0000 Subject: [PATCH] Fix fwmem_strategy() race in 4-stable. --- sys/dev/firewire/fwohci_pci.c | 6 +++++- sys/dev/firewire/fwohcivar.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/dev/firewire/fwohci_pci.c b/sys/dev/firewire/fwohci_pci.c index ac2a3288a0b..795aade86b7 100644 --- a/sys/dev/firewire/fwohci_pci.c +++ b/sys/dev/firewire/fwohci_pci.c @@ -288,6 +288,9 @@ fwohci_pci_attach(device_t self) /* XXX splcam() should mask this irq for sbp.c*/ err = bus_setup_intr(self, sc->irq_res, INTR_TYPE_CAM, (driver_intr_t *) fwohci_dummy_intr, sc, &sc->ih_cam); + /* XXX splbio() should mask this irq for physio()/fwmem_strategy() */ + err = bus_setup_intr(self, sc->irq_res, INTR_TYPE_BIO, + (driver_intr_t *) fwohci_dummy_intr, sc, &sc->ih_bio); #endif if (err) { device_printf(self, "Could not setup irq, %d\n", err); @@ -372,7 +375,8 @@ fwohci_pci_detach(device_t self) device_printf(self, "Could not tear down irq, %d\n", err); #if __FreeBSD_version < 500000 - err = bus_teardown_intr(self, sc->irq_res, sc->ih_cam); + bus_teardown_intr(self, sc->irq_res, sc->ih_cam); + bus_teardown_intr(self, sc->irq_res, sc->ih_bio); #endif sc->ih = NULL; } diff --git a/sys/dev/firewire/fwohcivar.h b/sys/dev/firewire/fwohcivar.h index 92b679bbe3f..9a9fbd891e7 100644 --- a/sys/dev/firewire/fwohcivar.h +++ b/sys/dev/firewire/fwohcivar.h @@ -51,6 +51,7 @@ typedef struct fwohci_softc { void *ih; #if __FreeBSD_version < 500000 void *ih_cam; + void *ih_bio; #endif struct resource *bsr; struct resource *irq_res;