From owner-svn-src-all@FreeBSD.ORG Sat Jan 11 08:16:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7428768C; Sat, 11 Jan 2014 08:16:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5F18F1D10; Sat, 11 Jan 2014 08:16:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0B8GW29046726; Sat, 11 Jan 2014 08:16:32 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0B8GWNU046725; Sat, 11 Jan 2014 08:16:32 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201401110816.s0B8GWNU046725@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 11 Jan 2014 08:16:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260536 - head/sys/dev/usb/controller X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jan 2014 08:16:32 -0000 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));