Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Jan 2014 08:16:32 +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: r260536 - head/sys/dev/usb/controller
Message-ID:  <201401110816.s0B8GWNU046725@svn.freebsd.org>

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



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