diff options
author | 2015-01-21 14:02:33 +0000 | |
---|---|---|
committer | 2015-01-21 14:02:33 +0000 | |
commit | 7ff307ae954db12cebe37bdf6861a1cc9696014e (patch) | |
tree | a72a0b1c02d8eefff5c815e97058ef2bf8e8871c | |
parent | Ubreak the tree by using "struct ifreq" instead of "struct linux_ifreq". (diff) | |
download | wireguard-openbsd-7ff307ae954db12cebe37bdf6861a1cc9696014e.tar.xz wireguard-openbsd-7ff307ae954db12cebe37bdf6861a1cc9696014e.zip |
Do not try to stop and reset endpoints if USB transfers are aborted
because the HC has been shut down (during suspend/hibernate) or
removed (PCIe card).
In both cases the hardware wont complete the commands, resulting in
timeouts. Instead just do the software part of the abort process.
Unbreak suspend/resume with USB a device connected to xhci(4) as
reported by Fabian Raetz on bugs@.
-rw-r--r-- | sys/dev/usb/xhci.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/usb/xhci.c b/sys/dev/usb/xhci.c index d0e725097fc..774bd87b759 100644 --- a/sys/dev/usb/xhci.c +++ b/sys/dev/usb/xhci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xhci.c,v 1.57 2015/01/18 20:35:11 mpi Exp $ */ +/* $OpenBSD: xhci.c,v 1.58 2015/01/21 14:02:33 mpi Exp $ */ /* * Copyright (c) 2014-2015 Martin Pieuchot @@ -1912,8 +1912,10 @@ xhci_abort_xfer(struct usbd_xfer *xfer, usbd_status status) xfer->actlen, xfer->length, ((struct xhci_xfer *)xfer)->index)); /* XXX The stack should not call abort() in this case. */ - if (xfer->status == USBD_NOT_STARTED) { + if (sc->sc_bus.dying || xfer->status == USBD_NOT_STARTED) { xfer->status = status; + timeout_del(&xfer->timeout_handle); + usb_rem_task(xfer->device, &xfer->abort_task); usb_transfer_complete(xfer); return; } |