summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorjdolecek <jdolecek@NetBSD.org>2018-04-22 07:47:14 +0000
committerjdolecek <jdolecek@NetBSD.org>2018-04-22 07:47:14 +0000
commit64e6bf6f79d16090e87761d24e9c4bc374b43a67 (patch)
treed958e8a4ddc6405fec3351c396ae47a9c898e76d /sys/dev
parent1fe1924bdd04e9ba426661848c4b9e9825ee6789 (diff)
trigger the softint processing on that child bus which is not detached yet
fixes PR kern/53066 by Martin Husemann
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/xhci.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/sys/dev/usb/xhci.c b/sys/dev/usb/xhci.c
index 052240ce0c6..61995e4c00d 100644
--- a/sys/dev/usb/xhci.c
+++ b/sys/dev/usb/xhci.c
@@ -1,4 +1,4 @@
-/* $NetBSD: xhci.c,v 1.88 2018/04/21 15:53:24 jdolecek Exp $ */
+/* $NetBSD: xhci.c,v 1.89 2018/04/22 07:47:14 jdolecek Exp $ */
/*
* Copyright (c) 2013 Jonathan A. Kollasch
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.88 2018/04/21 15:53:24 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.89 2018/04/22 07:47:14 jdolecek Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -1236,7 +1236,16 @@ xhci_intr(void *v)
ret = xhci_intr1(sc);
if (ret) {
- usb_schedsoftintr(&sc->sc_bus);
+ KASSERT(sc->sc_child || sc->sc_child2);
+
+ /*
+ * One of child busses could be already detached. It doesn't
+ * matter on which of the two the softintr is scheduled.
+ */
+ if (sc->sc_child)
+ usb_schedsoftintr(&sc->sc_bus);
+ else
+ usb_schedsoftintr(&sc->sc_bus2);
}
done:
mutex_spin_exit(&sc->sc_intr_lock);