diff options
author | imp <imp@FreeBSD.org> | 1999-12-10 07:02:41 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 1999-12-10 07:02:41 +0000 |
commit | 825b49478f778e1f312ae34d63b3917a407da0de (patch) | |
tree | e2365c168bd2ebff0ffa38a33d540cf420e1dc3f /sys/pccard | |
parent | 05b112defa6475261451632c0c709f7d9002ed41 (diff) | |
download | FreeBSD-src-825b49478f778e1f312ae34d63b3917a407da0de.zip FreeBSD-src-825b49478f778e1f312ae34d63b3917a407da0de.tar.gz |
Move the turning on of the interrupts for the card at the bridge from
the activate method to the setup_intr, and turn it off to
teardown_intr.
This makes the ed driver not enter its interrupt routine during the
probe. Apparently, an interrupt happens when you disable the
interrupts. There are other problems with ed still.
Diffstat (limited to 'sys/pccard')
-rw-r--r-- | sys/pccard/pcic.c | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/sys/pccard/pcic.c b/sys/pccard/pcic.c index f4514a5..156675d 100644 --- a/sys/pccard/pcic.c +++ b/sys/pccard/pcic.c @@ -38,23 +38,12 @@ #include <machine/clock.h> -#if 0 -#include <i386/isa/icu.h> -#include <i386/isa/isa_device.h> -#include <i386/isa/intr_machdep.h> -#endif - #include <pccard/i82365.h> - #include <pccard/cardinfo.h> #include <pccard/driver.h> #include <pccard/slot.h> #include <pccard/pcic.h> -#ifdef APIC_IO -#include <machine/smp.h> -#endif - /* * Prototypes for interrupt handler. */ @@ -775,7 +764,6 @@ pcic_activate_resource(device_t dev, device_t child, int type, int rid, break; } case SYS_RES_IRQ: - pcic_mapirq(devi->slt, rman_get_start(r)); break; case SYS_RES_MEMORY: { @@ -814,7 +802,6 @@ pcic_deactivate_resource(device_t dev, device_t child, int type, int rid, break; } case SYS_RES_IRQ: - pcic_mapirq(devi->slt, 0); break; case SYS_RES_MEMORY: { @@ -837,14 +824,26 @@ static int pcic_setup_intr(device_t dev, device_t child, struct resource *irq, int flags, driver_intr_t *intr, void *arg, void **cookiep) { - return (bus_generic_setup_intr(dev, child, irq, flags, intr, arg, - cookiep)); + struct pccard_devinfo *devi = device_get_ivars(child); + int err; + + err = bus_generic_setup_intr(dev, child, irq, flags, intr, arg, + cookiep); + if (err == 0) + pcic_mapirq(devi->slt, rman_get_start(irq)); + else + device_printf(dev, "Error %d irq %ld\n", err, + rman_get_start(irq)); + return (err); } static int pcic_teardown_intr(device_t dev, device_t child, struct resource *irq, void *cookie) { + struct pccard_devinfo *devi = device_get_ivars(child); + + pcic_mapirq(devi->slt, 0); return (bus_generic_teardown_intr(dev, child, irq, cookie)); } |