Module Name:    src
Committed By:   skrll
Date:           Fri Apr  8 09:48:15 UTC 2016

Modified Files:
        src/sys/dev/usb [nick-nhusb]: xhci.c

Log Message:
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)


To generate a diff of this commit:
cvs rdiff -u -r1.28.2.54 -r1.28.2.55 src/sys/dev/usb/xhci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/usb/xhci.c
diff -u src/sys/dev/usb/xhci.c:1.28.2.54 src/sys/dev/usb/xhci.c:1.28.2.55
--- src/sys/dev/usb/xhci.c:1.28.2.54	Sat Mar 19 11:30:21 2016
+++ src/sys/dev/usb/xhci.c	Fri Apr  8 09:48:14 2016
@@ -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 @@ xhci_intr1(struct xhci_softc * const sc)
 
 	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);

Reply via email to