svn commit: r260535 - head/sys/dev/usb/controller

Hans Petter Selasky hselasky at FreeBSD.org
Sat Jan 11 08:10:01 UTC 2014


Author: hselasky
Date: Sat Jan 11 08:10:01 2014
New Revision: 260535
URL: http://svnweb.freebsd.org/changeset/base/260535

Log:
  Force clearing of event ring interrupts. The "Intel Lynx Point" XHCI
  controller found in the MBP2013 has been observed to not work properly
  unless this operation is performed.
  
  MFC after:	1 week
  Tested by:	Huang Wen Hui <huanghwh at gmail.com>

Modified:
  head/sys/dev/usb/controller/xhci.c

Modified: head/sys/dev/usb/controller/xhci.c
==============================================================================
--- head/sys/dev/usb/controller/xhci.c	Sat Jan 11 07:53:03 2014	(r260534)
+++ head/sys/dev/usb/controller/xhci.c	Sat Jan 11 08:10:01 2014	(r260535)
@@ -1578,6 +1578,7 @@ void
 xhci_interrupt(struct xhci_softc *sc)
 {
 	uint32_t status;
+	uint32_t temp;
 
 	USB_BUS_LOCK(&sc->sc_bus);
 
@@ -1588,6 +1589,12 @@ xhci_interrupt(struct xhci_softc *sc)
 	XWRITE4(sc, oper, XHCI_USBSTS, status);
 
 	DPRINTFN(16, "real interrupt (status=0x%08x)\n", status);
+
+	temp = XREAD4(sc, runt, XHCI_IMAN(0));
+
+	/* force clearing of pending interrupts */
+	if (temp & XHCI_IMAN_INTR_PEND)
+		XWRITE4(sc, runt, XHCI_IMAN(0), temp);
  
 	/* check for event(s) */
 	xhci_interrupt_poll(sc);


More information about the svn-src-head mailing list