Source-Changes-HG archive

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

[src/nick-nhusb]: src/sys/dev/usb Don't rely on XHCI_IMAN_INTR_PEND. Instead...



details:   https://anonhg.NetBSD.org/src/rev/15b3c1b2e46f
branches:  nick-nhusb
changeset: 334473:15b3c1b2e46f
user:      skrll <skrll%NetBSD.org@localhost>
date:      Fri Apr 08 09:48:14 2016 +0000

description:
Don't rely on XHCI_IMAN_INTR_PEND.  Instead do as others do and simply
clear the bit and handle any pending events.

usb 3 now works on my toshiba laptop (and probably elsewhere)

diffstat:

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

diffs (34 lines):

diff -r a8b200c6f44a -r 15b3c1b2e46f sys/dev/usb/xhci.c
--- a/sys/dev/usb/xhci.c        Wed Apr 06 22:00:02 2016 +0000
+++ b/sys/dev/usb/xhci.c        Fri Apr 08 09:48:14 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xhci.c,v 1.28.2.54 2016/03/19 11:30:21 skrll Exp $     */
+/*     $NetBSD: xhci.c,v 1.28.2.55 2016/04/08 09:48:14 skrll Exp $     */
 
 /*
  * Copyright (c) 2013 Jonathan A. Kollasch
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.28.2.54 2016/03/19 11:30:21 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.28.2.55 2016/04/08 09:48:14 skrll Exp $");
 
 #include "opt_usb.h"
 
@@ -1022,14 +1022,7 @@
 
        iman = xhci_rt_read_4(sc, XHCI_IMAN(0));
        DPRINTFN(16, "IMAN0 %08x", iman, 0, 0, 0);
-
-       /* XXX 4.17.5 IP may be 0 if MSI/MSI-X is used */
-       if (!(sc->sc_quirks & XHCI_QUIRK_FORCE_INTR)) {
-               if ((iman & XHCI_IMAN_INTR_PEND) == 0) {
-                       return 0;
-               }
-       }
-
+       iman |= XHCI_IMAN_INTR_PEND;
        xhci_rt_write_4(sc, XHCI_IMAN(0), iman);
        iman = xhci_rt_read_4(sc, XHCI_IMAN(0));
        DPRINTFN(16, "IMAN0 %08x", iman, 0, 0, 0);



Home | Main Index | Thread Index | Old Index