diff options
author | 2015-07-09 13:48:54 +0000 | |
---|---|---|
committer | 2015-07-09 13:48:54 +0000 | |
commit | 0405edc99ced56dfb0c7a3cdf48e80a55af78b9b (patch) | |
tree | b7251d5519a23901099a3f4d094d99efe0091e8a | |
parent | Prevent possible interrupt recursion before unwinding the stack. (diff) | |
download | wireguard-openbsd-0405edc99ced56dfb0c7a3cdf48e80a55af78b9b.tar.xz wireguard-openbsd-0405edc99ced56dfb0c7a3cdf48e80a55af78b9b.zip |
Allow more time for USB athn(4) firmware boot. It seems people on daemonforums
are running into the previous 1 second timeout on some machines, which the
driver will treat as fatal. Not sure if this will really fix the issue but
it won't hurt. Also reported in NetBSD land which inherited our driver:
http://mail-index.netbsd.org/current-users/2014/05/06/msg024793.html
ok mpi@
-rw-r--r-- | sys/dev/usb/if_athn_usb.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/usb/if_athn_usb.c b/sys/dev/usb/if_athn_usb.c index 4f473a62e44..ba3991496c9 100644 --- a/sys/dev/usb/if_athn_usb.c +++ b/sys/dev/usb/if_athn_usb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_athn_usb.c,v 1.34 2015/06/12 15:47:31 mpi Exp $ */ +/* $OpenBSD: if_athn_usb.c,v 1.35 2015/07/09 13:48:54 stsp Exp $ */ /*- * Copyright (c) 2011 Damien Bergamini <damien.bergamini@free.fr> @@ -302,7 +302,8 @@ athn_usb_attachhook(void *xsc) /* Load firmware. */ error = athn_usb_load_firmware(usc); if (error != 0) { - printf("%s: could not load firmware\n", sc->sc_dev.dv_xname); + printf("%s: could not load firmware (error %d)\n", + sc->sc_dev.dv_xname, error); return; } @@ -679,9 +680,9 @@ athn_usb_load_firmware(struct athn_usb_softc *usc) s = splusb(); usc->wait_msg_id = AR_HTC_MSG_READY; error = usbd_do_request(usc->sc_udev, &req, NULL); - /* Wait at most 1 second for firmware to boot. */ + /* Wait at most 2 seconds for firmware to boot. */ if (error == 0 && usc->wait_msg_id != 0) - error = tsleep(&usc->wait_msg_id, 0, "athnfw", hz); + error = tsleep(&usc->wait_msg_id, 0, "athnfw", 2 * hz); usc->wait_msg_id = 0; splx(s); return (error); |