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

Hans Petter Selasky hselasky at FreeBSD.org
Sat Jan 11 08:16:32 UTC 2014


Author: hselasky
Date: Sat Jan 11 08:16:31 2014
New Revision: 260536
URL: http://svnweb.freebsd.org/changeset/base/260536

Log:
  Optimise interrupt logic. Technically writing a zero to the XHCI USB
  status register has no effect. Can happen when the interrupt vector is
  shared.
  
  MFC after:	1 week

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 08:10:01 2014	(r260535)
+++ head/sys/dev/usb/controller/xhci.c	Sat Jan 11 08:16:31 2014	(r260536)
@@ -1584,11 +1584,11 @@ xhci_interrupt(struct xhci_softc *sc)
 
 	status = XREAD4(sc, oper, XHCI_USBSTS);
 
-	/* acknowledge interrupts */
-
-	XWRITE4(sc, oper, XHCI_USBSTS, status);
-
-	DPRINTFN(16, "real interrupt (status=0x%08x)\n", status);
+	/* acknowledge interrupts, if any */
+	if (status != 0) {
+		XWRITE4(sc, oper, XHCI_USBSTS, status);
+		DPRINTFN(16, "real interrupt (status=0x%08x)\n", status);
+	}
 
 	temp = XREAD4(sc, runt, XHCI_IMAN(0));
 


More information about the svn-src-all mailing list