summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorhaya <haya@NetBSD.org>2001-10-25 10:02:12 +0000
committerhaya <haya@NetBSD.org>2001-10-25 10:02:12 +0000
commit3aee8d644fe3cdff916bf0ea52a48050bbce4fd3 (patch)
treef90622115dd1c667114f3eb975c165d55d5dec79 /sys
parent55026d5454c15a9711da85c8efae3ed53ebd1c74 (diff)
Prevent hang-up when a CardBus card is removed during the card is working.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ic/elinkxlvar.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/dev/ic/elinkxlvar.h b/sys/dev/ic/elinkxlvar.h
index faa2cdc6e87..d64fcb2d702 100644
--- a/sys/dev/ic/elinkxlvar.h
+++ b/sys/dev/ic/elinkxlvar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: elinkxlvar.h,v 1.10 2001/01/30 19:27:40 thorpej Exp $ */
+/* $NetBSD: elinkxlvar.h,v 1.11 2001/10/25 10:02:12 haya Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -137,8 +137,13 @@ struct ex_softc {
};
#define ex_waitcmd(sc) \
- while (bus_space_read_2((sc)->sc_iot, (sc)->sc_ioh, ELINK_STATUS) \
- & S_COMMAND_IN_PROGRESS);
+ do { \
+ int stat; \
+ do { \
+ stat = bus_space_read_2((sc)->sc_iot, (sc)->sc_ioh, \
+ ELINK_STATUS); \
+ } while ((stat & S_COMMAND_IN_PROGRESS) && (stat != 0xffff)); \
+ } while (0)\
u_int16_t exreadeeprom __P((bus_space_tag_t, bus_space_handle_t, int));
void ex_config __P((struct ex_softc *));