summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/if_uath.c
diff options
context:
space:
mode:
authordamien <damien@openbsd.org>2006-09-18 18:08:32 +0000
committerdamien <damien@openbsd.org>2006-09-18 18:08:32 +0000
commit2bfb63f7b00bb0a99efd75f3a98ca2cc2ddcb033 (patch)
treea0eb76e5e8b340643c72681a2a503e42d0d103eb /sys/dev/usb/if_uath.c
parentchange the example hostname.pppoe0 to match the format (diff)
downloadwireguard-openbsd-2bfb63f7b00bb0a99efd75f3a98ca2cc2ddcb033.tar.xz
wireguard-openbsd-2bfb63f7b00bb0a99efd75f3a98ca2cc2ddcb033.zip
fix my 1.7 commit.
in uath_reset(), return on error if tsleep() fails.
Diffstat (limited to 'sys/dev/usb/if_uath.c')
-rw-r--r--sys/dev/usb/if_uath.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/usb/if_uath.c b/sys/dev/usb/if_uath.c
index 7745f6148c5..7e5d9d30b75 100644
--- a/sys/dev/usb/if_uath.c
+++ b/sys/dev/usb/if_uath.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_uath.c,v 1.8 2006/09/18 16:34:23 damien Exp $ */
+/* $OpenBSD: if_uath.c,v 1.9 2006/09/18 18:08:32 damien Exp $ */
/*-
* Copyright (c) 2006
@@ -95,7 +95,8 @@ int uath_debug = 1;
*/
#define UATH_DEV(v, p, f) \
{ { USB_VENDOR_##v, USB_PRODUCT_##v##_##p }, (f) }, \
- { { USB_VENDOR_##v, USB_PRODUCT_##v##_##p##_NF }, (f) | UATH_FLAG_ABG }
+ { { USB_VENDOR_##v, USB_PRODUCT_##v##_##p##_NF }, \
+ (f) | UATH_FLAG_PRE_FIRMWARE }
#define UATH_DEV_UG(v, p) UATH_DEV(v, p, 0)
#define UATH_DEV_UX(v, p) UATH_DEV(v, p, UATH_FLAG_ABG)
static const struct uath_type {
@@ -1642,6 +1643,8 @@ uath_reset(struct uath_softc *sc)
if (error == 0)
error = tsleep(UATH_COND_INIT(sc), PCATCH, "uathinit", 5 * hz);
splx(s);
+ if (error != 0)
+ return error;
/* read PHY registers */
for (reg = 0x09; reg <= 0x24; reg++) {