From ca29e6e128e77248c094de3458d61e7807b4e711 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Fri, 16 Feb 2007 05:36:59 +0000 Subject: Two changes: (1) change debounce period from 1s to 250ms. This appears to be fine and speeds things up a little. (2) In the middle of cbb_pcic_power_disable_socket we write 0 to the EXCA_INTR register to put the card into reset. However, this turns off CSC interrupts for TI bridges (and maybe others). So no further card insertion events would be noticed. To compensate, after we've gone through the entire power down sequence, turn on EXCA_INTR_ENABLE so that CSC events happen. #2 should fix the 'dead slot' problem that has been reported after card ejection (but only 16-bit cards). --- sys/dev/pccbb/pccbb.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/dev/pccbb/pccbb.c b/sys/dev/pccbb/pccbb.c index 45a8954d89e9..fd1167886c29 100644 --- a/sys/dev/pccbb/pccbb.c +++ b/sys/dev/pccbb/pccbb.c @@ -522,7 +522,7 @@ cbb_event_thread(void *arg) err = 0; while (err != EWOULDBLOCK && (sc->flags & CBB_KTHREAD_DONE) == 0) - err = cv_timedwait(&sc->cv, &sc->mtx, 1 * hz); + err = cv_timedwait(&sc->cv, &sc->mtx, hz / 4); mtx_unlock(&sc->mtx); } DEVPRINTF((sc->dev, "Thread terminating\n")); @@ -1232,6 +1232,9 @@ cbb_pcic_power_disable_socket(device_t brdev, device_t child) /* wait 300ms until power fails (Tpf). */ tsleep(sc, PZERO, "cbbP1", hz * 300 / 1000); + + /* enable CSC interrupts */ + exca_putb(&sc->exca[0], EXCA_INTR, EXCA_INTR_ENABLE); } /************************************************************************/ -- cgit v1.3