Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Jan 2014 08:10:01 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r260535 - head/sys/dev/usb/controller
Message-ID:  <201401110810.s0B8A1kI043150@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401110810.s0B8A1kI043150>