summaryrefslogtreecommitdiffstats
path: root/sys/dev/pccbb
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2001-09-06 20:43:12 +0000
committerimp <imp@FreeBSD.org>2001-09-06 20:43:12 +0000
commit9f52d6675968adc400c6fedcb088fc6bdf7a92b9 (patch)
tree144f124a51009dd959524cb6ed2007508630aee9 /sys/dev/pccbb
parent577f5ce9db1a69484ef385fa44134e5034b2c8d9 (diff)
downloadFreeBSD-src-9f52d6675968adc400c6fedcb088fc6bdf7a92b9.zip
FreeBSD-src-9f52d6675968adc400c6fedcb088fc6bdf7a92b9.tar.gz
minor commentary
Diffstat (limited to 'sys/dev/pccbb')
-rw-r--r--sys/dev/pccbb/pccbb.c10
1 files changed, 10 insertions, 0 deletions
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);
OpenPOWER on IntegriCloud