diff options
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pcmcia/if_malo.c | 12 | ||||
-rw-r--r-- | sys/dev/pcmcia/if_malovar.h | 3 |
2 files changed, 4 insertions, 11 deletions
diff --git a/sys/dev/pcmcia/if_malo.c b/sys/dev/pcmcia/if_malo.c index bc810b6ad4f..eb08fe4490f 100644 --- a/sys/dev/pcmcia/if_malo.c +++ b/sys/dev/pcmcia/if_malo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_malo.c,v 1.42 2007/08/06 22:51:18 mglocker Exp $ */ +/* $OpenBSD: if_malo.c,v 1.43 2007/08/07 11:44:44 mglocker Exp $ */ /* * Copyright (c) 2007 Marcus Glocker <mglocker@openbsd.org> @@ -796,7 +796,7 @@ cmalo_intr(void *arg) cmalo_rx(sc); if (intr & MALO_VAL_HOST_INTR_CMD) /* command response */ - sc->sc_cmd_running = 0; + wakeup(sc); return (1); } @@ -1840,13 +1840,7 @@ cmalo_cmd_request(struct malo_softc *sc, uint16_t psize, int no_response) return (0); /* wait for the command response */ - sc->sc_cmd_running = 1; - for (i = 0; i < 1000; i++) { - if (sc->sc_cmd_running == 0) - break; - tsleep(sc, 0, "malocmd", 1); - } - if (sc->sc_cmd_running) { + if (tsleep(sc, 0, "malocmd", 500)) { printf("%s: timeout while waiting for cmd response!\n", sc->sc_dev.dv_xname); return (EIO); diff --git a/sys/dev/pcmcia/if_malovar.h b/sys/dev/pcmcia/if_malovar.h index fc00d0c422a..2f236bc5491 100644 --- a/sys/dev/pcmcia/if_malovar.h +++ b/sys/dev/pcmcia/if_malovar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_malovar.h,v 1.21 2007/08/06 22:51:18 mglocker Exp $ */ +/* $OpenBSD: if_malovar.h,v 1.22 2007/08/07 11:44:44 mglocker Exp $ */ /* * Copyright (c) 2007 Marcus Glocker <mglocker@openbsd.org> @@ -335,7 +335,6 @@ struct malo_softc { int sc_flags; void *sc_cmd; - uint8_t sc_cmd_running; void *sc_data; uint8_t sc_curchan; int sc_net_num; |