Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb trigger the softint processing on t...



details:   https://anonhg.NetBSD.org/src/rev/da3037470c78
branches:  trunk
changeset: 318415:da3037470c78
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Sun Apr 22 07:47:14 2018 +0000
description:
trigger the softint processing on that child bus which is not detached yet

fixes PR kern/53066 by Martin Husemann

diffstat:

 sys/dev/usb/xhci.c |  15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diffs (36 lines):

diff -r 51e58bd5c012 -r da3037470c78 sys/dev/usb/xhci.c
--- a/sys/dev/usb/xhci.c        Sat Apr 21 23:25:01 2018 +0000
+++ b/sys/dev/usb/xhci.c        Sun Apr 22 07:47:14 2018 +0000
@@ -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 @@
 
        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);



Home | Main Index | Thread Index | Old Index