From 9f52d6675968adc400c6fedcb088fc6bdf7a92b9 Mon Sep 17 00:00:00 2001 From: imp Date: Thu, 6 Sep 2001 20:43:12 +0000 Subject: minor commentary --- sys/dev/pccbb/pccbb.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'sys') diff --git a/sys/dev/pccbb/pccbb.c b/sys/dev/pccbb/pccbb.c index 4173c41..e790072 100644 --- a/sys/dev/pccbb/pccbb.c +++ b/sys/dev/pccbb/pccbb.c @@ -950,6 +950,13 @@ pccbb_power(device_t brdev, int volts) sc->sc_socketreg->socket_control = sock_ctrl; status = sc->sc_socketreg->socket_state; + /* + * XXX This busy wait is bogus. We should wait for a power + * interrupt and then whine if the status is bad. If we're + * worried about the card not coming up, then we should also + * schedule a timeout which we can cacel in the power interrupt. + */ + { int timeout = 20; u_int32_t sockevent; @@ -959,6 +966,7 @@ pccbb_power(device_t brdev, int volts) } while (!(sockevent & PCCBB_SOCKET_EVENT_POWER) && --timeout > 0); /* reset event status */ + /* XXX should only reset EVENT_POWER */ sc->sc_socketreg->socket_event = sockevent; if (timeout < 0) { printf ("VCC supply failed.\n"); @@ -968,6 +976,8 @@ pccbb_power(device_t brdev, int volts) /* XXX * delay 400 ms: thgough the standard defines that the Vcc set-up time * is 20 ms, some PC-Card bridge requires longer duration. + * XXX Note: We should check the stutus AFTER the delay to give time + * for things to stabilize. */ DELAY(400*1000); -- cgit v1.1