diff options
author | nsayer <nsayer@FreeBSD.org> | 2001-08-24 02:14:26 +0000 |
---|---|---|
committer | nsayer <nsayer@FreeBSD.org> | 2001-08-24 02:14:26 +0000 |
commit | ff3f45d379ac701d236defc45b6140538e5bc62f (patch) | |
tree | fb4538e1bed2eaf23df04331b167e8b8acf6ffc4 /sys/dev/wi/if_wi.c | |
parent | e640f9f9795b9140d086d7c2719b3822326d8f49 (diff) | |
download | FreeBSD-src-ff3f45d379ac701d236defc45b6140538e5bc62f.zip FreeBSD-src-ff3f45d379ac701d236defc45b6140538e5bc62f.tar.gz |
In order for the MA301 to pass interrupts from the PCCard, you must
go into the PLX 9052's interrupt control register and turn on the magic
interrupt enable bit.
Partial thanks are due to OpenBSD for pointing out that the chip is a
PLX 9052 and pointing me to the datasheet PDF.
Diffstat (limited to 'sys/dev/wi/if_wi.c')
-rw-r--r-- | sys/dev/wi/if_wi.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/dev/wi/if_wi.c b/sys/dev/wi/if_wi.c index 4c10c10..f741a8b 100644 --- a/sys/dev/wi/if_wi.c +++ b/sys/dev/wi/if_wi.c @@ -381,6 +381,20 @@ wi_pci_attach(device_t dev) CSR_WRITE_2(sc, WI_INT_EN, 0); CSR_WRITE_2(sc, WI_EVENT_ACK, 0xFFFF); + /* We have to do a magic PLX poke to enable interrupts */ + sc->local_rid = WI_PCI_LOCALRES; + sc->local = bus_alloc_resource(dev, SYS_RES_IOPORT, + &sc->local_rid, 0, ~0, 1, RF_ACTIVE); + sc->wi_localtag = rman_get_bustag(sc->local); + sc->wi_localhandle = rman_get_bushandle(sc->local); + command = bus_space_read_4(sc->wi_localtag, sc->wi_localhandle, + WI_LOCAL_INTCSR); + command |= WI_LOCAL_INTEN; + bus_space_write_4(sc->wi_localtag, sc->wi_localhandle, + WI_LOCAL_INTCSR, command); + bus_release_resource(dev, SYS_RES_IOPORT, sc->local_rid, sc->local); + sc->local = NULL; + sc->mem_rid = WI_PCI_MEMRES; sc->mem = bus_alloc_resource(dev, SYS_RES_MEMORY, &sc->mem_rid, 0, ~0, 1, RF_ACTIVE); |