summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2019-06-13 21:03:49 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2019-06-13 21:03:49 +0000
commit7b8596831d98861ec737b167a01112e0187d57af (patch)
tree96e4b17a6ccd5eb013e461d7e73d14efe064adb7 /sys/dev/usb
parent843c7733f845c67232798002ac799699cd6acd4d (diff)
Do not consider the pipe as halted if the device is gone.
Analysed by and ok claudio@
Diffstat (limited to 'sys/dev/usb')
-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;