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).
This commit is contained in:
parent
33d7325a5f
commit
ca29e6e128
@ -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);
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
|
Loading…
x
Reference in New Issue
Block a user