diff options
| author | Warner Losh <imp@FreeBSD.org> | 2007-03-04 19:33:12 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2007-03-04 19:33:12 +0000 |
| commit | 8c6c85bef3498a69e0753844f29e40bb81714a7a (patch) | |
| tree | cc34f425df8aae8204ede4cb8707465c8057aa66 /sys/dev/pccbb | |
| parent | 92cb9e01dc24c72dd3621212f497470ce32e99c1 (diff) | |
Notes
Diffstat (limited to 'sys/dev/pccbb')
| -rw-r--r-- | sys/dev/pccbb/pccbb.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/dev/pccbb/pccbb.c b/sys/dev/pccbb/pccbb.c index d66e59bf0f4bb..48e17f127e854 100644 --- a/sys/dev/pccbb/pccbb.c +++ b/sys/dev/pccbb/pccbb.c @@ -486,10 +486,13 @@ cbb_event_thread(void *arg) cbb_removal(sc); } else if (status & CBB_STATE_NOT_A_CARD) { /* - * Up to 20 times, try to rescan the card when we - * see NOT_A_CARD. + * Up to 10 times, try to rescan the card when we see + * NOT_A_CARD. 10 is somehwat arbitrary. When this + * pathology hits, there's a ~40% chance each try will + * fail. 10 tries takes about 5s and results in a + * 99.99% certainty of the results. */ - if (not_a_card++ < 20) { + if (not_a_card++ < 10) { DEVPRINTF((sc->dev, "Not a card bit set, rescanning\n")); cbb_setb(sc, CBB_SOCKET_FORCE, CBB_FORCE_CV_TEST); @@ -504,12 +507,12 @@ cbb_event_thread(void *arg) mtx_unlock(&Giant); /* - * Wait until it has been 1s since the last time we + * Wait until it has been 250ms since the last time we * get an interrupt. We handle the rest of the interrupt * at the top of the loop. Although we clear the bit in the * ISR, we signal sc->cv from the detach path after we've * set the CBB_KTHREAD_DONE bit, so we can't do a simple - * 1s sleep here. + * 250ms sleep here. * * In our ISR, we turn off the card changed interrupt. Turn * them back on here before we wait for them to happen. We |
