diff options
author | gerhard <gerhard@openbsd.org> | 2017-10-23 15:23:13 +0000 |
---|---|---|
committer | gerhard <gerhard@openbsd.org> | 2017-10-23 15:23:13 +0000 |
commit | 80fba7d9e05052727008d9ae1addde39d65b6ec7 (patch) | |
tree | c63ab56ab744f5a60d1bfaef0add6b9126d60065 /sys/dev/usb/if_umb.c | |
parent | ifelse is special, fix argv parsing to avoid segfault (diff) | |
download | wireguard-openbsd-80fba7d9e05052727008d9ae1addde39d65b6ec7.tar.xz wireguard-openbsd-80fba7d9e05052727008d9ae1addde39d65b6ec7.zip |
Even if a USB transfer fails, call umb_start() so that processing
of the if_snd queue doesn't stall.
ok stsp@
Diffstat (limited to 'sys/dev/usb/if_umb.c')
-rw-r--r-- | sys/dev/usb/if_umb.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/dev/usb/if_umb.c b/sys/dev/usb/if_umb.c index b9d69d9699e..b2571c969df 100644 --- a/sys/dev/usb/if_umb.c +++ b/sys/dev/usb/if_umb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_umb.c,v 1.16 2017/10/20 09:35:09 mpi Exp $ */ +/* $OpenBSD: if_umb.c,v 1.17 2017/10/23 15:23:13 gerhard Exp $ */ /* * Copyright (c) 2016 genua mbH @@ -896,7 +896,7 @@ umb_watchdog(struct ifnet *ifp) ifp->if_oerrors++; printf("%s: watchdog timeout\n", DEVNAM(sc)); - /* XXX FIXME: re-initialize device */ + usbd_abort_pipe(sc->sc_tx_pipe); return; } @@ -1845,10 +1845,9 @@ umb_txeof(struct usbd_xfer *xfer, void *priv, usbd_status status) if (status == USBD_STALLED) usbd_clear_endpoint_stall_async(sc->sc_tx_pipe); } - } else { - if (IFQ_IS_EMPTY(&ifp->if_snd) == 0) - umb_start(ifp); } + if (IFQ_IS_EMPTY(&ifp->if_snd) == 0) + umb_start(ifp); splx(s); } |