diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-01-27 04:44:21 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-01-27 04:44:21 +0000 |
commit | 3c7b4c90f16918cee171cdce87a4fd2caba5078b (patch) | |
tree | aee48b36ad2d39e890057f7aace6d026a182bff4 /sys/dev/pci/pccbb.c | |
parent | 2793071e8cf9cfd86f01f167108102d1a4e50825 (diff) |
introduce and use a flag indicating that interrupts are
enabled for this cbb. essentially this means that cbb
driver has completed it's initialization and is
ready to treat interrupts. this was exposed by
ccb's sharing their interrupt and pccbbintr() being called
for cbb which has not completed attachment due
to interrupt sharing.
Diffstat (limited to 'sys/dev/pci/pccbb.c')
-rw-r--r-- | sys/dev/pci/pccbb.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/pci/pccbb.c b/sys/dev/pci/pccbb.c index c1ab80640d0..de05bbe2de4 100644 --- a/sys/dev/pci/pccbb.c +++ b/sys/dev/pci/pccbb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pccbb.c,v 1.15 2001/01/22 18:53:57 deraadt Exp $ */ +/* $OpenBSD: pccbb.c,v 1.16 2001/01/27 04:44:20 mickey Exp $ */ /* $NetBSD: pccbb.c,v 1.42 2000/06/16 23:41:35 cgd Exp $ */ /* @@ -665,6 +665,8 @@ pccbb_pci_callback(self) sc->sc_csc = csc; } + sc->sc_ints_on = 1; + /* CSC Interrupt: Card detect interrupt on */ maskreg = bus_space_read_4(base_memt, base_memh, CB_SOCKET_MASK); maskreg |= CB_SOCKET_MASK_CD; /* Card detect intr is turned on. */ @@ -899,6 +901,9 @@ pccbbintr(arg) bus_space_handle_t memh = sc->sc_base_memh; struct pcic_handle *ph = &sc->sc_pcmcia_h; + if (!sc->sc_ints_on) + return 0; + sockevent = bus_space_read_4(memt, memh, CB_SOCKET_EVENT); bus_space_write_4(memt, memh, CB_SOCKET_EVENT, sockevent); Pcic_read(ph, PCIC_CSC); |