summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2019-06-13 21:03:48 +0000
committermpi <mpi@openbsd.org>2019-06-13 21:03:48 +0000
commit5619e8523eae4ee23c75aefef8d2ed7c15b51b6f (patch)
treea1553b9d9055c1ed4f531717f0b2c6d2f5a0c81c /sys
parentWhen tcp_close() is running in parallel with fill_file(), the kernel (diff)
downloadwireguard-openbsd-5619e8523eae4ee23c75aefef8d2ed7c15b51b6f.tar.xz
wireguard-openbsd-5619e8523eae4ee23c75aefef8d2ed7c15b51b6f.zip
Do not consider the pipe as halted if the device is gone.
Analysed by and ok claudio@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/xhci.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/usb/xhci.c b/sys/dev/usb/xhci.c
index 375625096ab..761ca42c6ea 100644
--- a/sys/dev/usb/xhci.c
+++ b/sys/dev/usb/xhci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xhci.c,v 1.104 2019/05/21 09:20:40 stsp Exp $ */
+/* $OpenBSD: xhci.c,v 1.105 2019/06/13 21:03:48 mpi Exp $ */
/*
* Copyright (c) 2014-2015 Martin Pieuchot
@@ -2192,6 +2192,8 @@ xhci_abort_xfer(struct usbd_xfer *xfer, usbd_status status)
if (xhci_cmd_stop_ep(sc, xp->slot, xp->dci)) {
DPRINTF(("%s: error stopping endpoint\n", DEVNAME(sc)));
/* Assume the device is gone. */
+ xp->halted = 0;
+ xp->aborted_xfer = NULL;
xfer->status = status;
usb_transfer_complete(xfer);
return;