diff options
-rw-r--r-- | sys/dev/usb/ueagle.c | 19 | ||||
-rw-r--r-- | sys/dev/usb/ueaglereg.h | 3 |
2 files changed, 12 insertions, 10 deletions
diff --git a/sys/dev/usb/ueagle.c b/sys/dev/usb/ueagle.c index da4dcb9d8dd..0d9218961fb 100644 --- a/sys/dev/usb/ueagle.c +++ b/sys/dev/usb/ueagle.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ueagle.c,v 1.1 2005/04/16 14:55:10 damien Exp $ */ +/* $OpenBSD: ueagle.c,v 1.2 2005/04/19 08:21:46 damien Exp $ */ /*- * Copyright (c) 2003-2005 @@ -665,17 +665,18 @@ ueagle_cmv_intr(struct ueagle_softc *sc, struct ueagle_cmv *cmv) /* synchronize our current CMV index with the modem */ sc->index = UGETW(cmv->wIndex) + 1; - /* handle spontaneous CMVs */ - if (cmv->bFunction == UEAGLE_MODEMREADY) { + switch (cmv->bFunction) { + case UEAGLE_MODEMREADY: wakeup(UEAGLE_COND_READY(sc)); - return; - } + break; - /* if it is the ack of a previous CR, save the data field */ - if (cmv->bFunction == UEAGLE_CR_ACK) + case UEAGLE_CR_ACK: sc->data = UGETDATA(cmv->dwData); - - wakeup(UEAGLE_COND_CMV(sc)); + /* FALLTHROUGH */ + case UEAGLE_CW_ACK: + wakeup(UEAGLE_COND_CMV(sc)); + break; + } } Static void diff --git a/sys/dev/usb/ueaglereg.h b/sys/dev/usb/ueaglereg.h index f6e2ed8b843..50da45ce610 100644 --- a/sys/dev/usb/ueaglereg.h +++ b/sys/dev/usb/ueaglereg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ueaglereg.h,v 1.1 2005/04/16 14:55:10 damien Exp $ */ +/* $OpenBSD: ueaglereg.h,v 1.2 2005/04/19 08:21:47 damien Exp $ */ /*- * Copyright (c) 2003-2005 @@ -82,6 +82,7 @@ struct ueagle_cmv { #define UEAGLE_CR 0x10 #define UEAGLE_CW 0x11 #define UEAGLE_CR_ACK 0x12 +#define UEAGLE_CW_ACK 0x13 #define UEAGLE_MODEMREADY 0x71 uWord wIndex; |