diff options
author | jhb <jhb@FreeBSD.org> | 2003-11-04 19:04:54 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2003-11-04 19:04:54 +0000 |
commit | c84c9e3246255267eb25e585d45bd78de59b2194 (patch) | |
tree | 29a203dde51e91fd842b3cbcb134f31325d51b49 /sys/i386/isa | |
parent | 373abd94036be0e5643f5134aa9fb8bb694d1624 (diff) | |
download | FreeBSD-src-c84c9e3246255267eb25e585d45bd78de59b2194.zip FreeBSD-src-c84c9e3246255267eb25e585d45bd78de59b2194.tar.gz |
Use a wrapper around the driver interrupt handler. The wrapper accepts the
isa_device pointer as its argument and uses that to call the driver's
interrupt handler passing the unit number as its argument. This should
fix COMPAT_OLDISA devices with a unit number of 0.
Reviewed by: peter
Reported by: bde
Diffstat (limited to 'sys/i386/isa')
-rw-r--r-- | sys/i386/isa/isa_compat.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sys/i386/isa/isa_compat.c b/sys/i386/isa/isa_compat.c index 571eccb..d5caced 100644 --- a/sys/i386/isa/isa_compat.c +++ b/sys/i386/isa/isa_compat.c @@ -238,6 +238,15 @@ isa_compat_probe(device_t dev) return ENXIO; } +static void +isa_compat_intr(void *arg) +{ + struct isa_device *dvp; + + dvp = (struct isa_device *)arg; + dvp->id_ointr(dvp->id_unit); +} + static int isa_compat_attach(device_t dev) { @@ -254,9 +263,7 @@ isa_compat_attach(device_t dev) error = BUS_SETUP_INTR(device_get_parent(dev), dev, res.irq, dvp->id_driver->intrflags, - dvp->id_intr, - (void *)(uintptr_t)dvp->id_unit, - &ih); + isa_compat_intr, dvp, &ih); if (error) printf("isa_compat_attach: failed to setup intr: %d\n", error); |