Date: Mon, 7 Jan 2013 16:38:13 +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: r245132 - head/sys/dev/usb/controller Message-ID: <201301071638.r07GcDga020351@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Mon Jan 7 16:38:13 2013 New Revision: 245132 URL: http://svnweb.freebsd.org/changeset/base/245132 Log: Optimise the XHCI interrupt handling. This patch will save CPU time when the XHCI interrupt is shared with other devices. Only check event rings when interrupt bits are set. Otherwise would indicate hiding possible hardware fault(s). Tested by: sos @ Submitted by: sos @ 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 Mon Jan 7 15:46:10 2013 (r245131) +++ head/sys/dev/usb/controller/xhci.c Mon Jan 7 16:38:13 2013 (r245132) @@ -1459,7 +1459,9 @@ xhci_interrupt(struct xhci_softc *sc) DPRINTFN(16, "real interrupt (sts=0x%08x, " "iman=0x%08x)\n", status, temp); - if (status != 0) { + if (status & (XHCI_STS_PCD | XHCI_STS_HCH | + XHCI_STS_HSE | XHCI_STS_HCE)) { + if (status & XHCI_STS_PCD) { xhci_root_intr(sc); } @@ -1480,7 +1482,9 @@ xhci_interrupt(struct xhci_softc *sc) } } - xhci_interrupt_poll(sc); + /* check if we need to check the event rings */ + if ((status != 0) || (temp & XHCI_IMAN_INTR_PEND)) + xhci_interrupt_poll(sc); USB_BUS_UNLOCK(&sc->sc_bus); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201301071638.r07GcDga020351>