diff options
author | imp <imp@FreeBSD.org> | 2007-02-16 05:36:59 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2007-02-16 05:36:59 +0000 |
commit | b910d10c4661ff816ad34b2246eb242163b43812 (patch) | |
tree | f337b727014b8811c6d4c33bfb7f8ed53c04084f /sys/dev | |
parent | 614ec41758eabef36c22b53ba3b1272308204984 (diff) | |
download | FreeBSD-src-b910d10c4661ff816ad34b2246eb242163b43812.zip FreeBSD-src-b910d10c4661ff816ad34b2246eb242163b43812.tar.gz |
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).
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pccbb/pccbb.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/pccbb/pccbb.c b/sys/dev/pccbb/pccbb.c index 45a8954..fd11678 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); } /************************************************************************/ |