From owner-freebsd-usb@FreeBSD.ORG Sat Jul 9 10:00:25 2011 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A12D61065679 for ; Sat, 9 Jul 2011 10:00:25 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 5A7EF8FC15 for ; Sat, 9 Jul 2011 10:00:23 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p69A0NXV034858 for ; Sat, 9 Jul 2011 10:00:23 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p69A0N4i034855; Sat, 9 Jul 2011 10:00:23 GMT (envelope-from gnats) Date: Sat, 9 Jul 2011 10:00:23 GMT Message-Id: <201107091000.p69A0N4i034855@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Hans Petter Selasky Cc: Subject: Re: usb/156596: [ehci] Extremely high interrupt rate on ehci/uhci IRQ16 80% cpu utilization on CPU0 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Hans Petter Selasky List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jul 2011 10:00:25 -0000 The following reply was made to PR usb/156596; it has been noted by GNATS. From: Hans Petter Selasky To: Colin Percival Cc: "bug-followup@FreeBSD.org" Subject: Re: usb/156596: [ehci] Extremely high interrupt rate on ehci/uhci IRQ16 80% cpu utilization on CPU0 Date: Sat, 9 Jul 2011 11:48:29 +0200 --Boundary-00=_tPCGOkni6SDJGZL Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit On Friday 08 July 2011 22:37:45 Colin Percival wrote: > Hi, > > I'm seeing this ehci interrupt storm with 8.2-RELEASE on my Dell E5420 > laptop; vmstat -i reports 187300 interrupts per second from ehci. > > I've attached my /var/log/messages showing the boot messages and 1 seconds > worth of hw.usb.ehci.debug=15 output as suggested. Hopefully it means > more to you than it does to me... Try the attached patch and report back. The EHCI should never generate more than 8000 IRQ/s second, so this clearly indicates a Hardware Problem. --HPS --Boundary-00=_tPCGOkni6SDJGZL Content-Type: text/x-patch; charset="iso-8859-15"; name="ehci_fix_terminate.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ehci_fix_terminate.patch" === ehci.c ================================================================== --- ehci.c (revision 223868) +++ ehci.c (local) @@ -354,12 +354,9 @@ htohc32(sc, EHCI_QH_SET_MULT(1)); qh->qh_curqtd = 0; - qh->qh_qtd.qtd_next = - htohc32(sc, EHCI_LINK_TERMINATE); - qh->qh_qtd.qtd_altnext = - htohc32(sc, EHCI_LINK_TERMINATE); - qh->qh_qtd.qtd_status = - htohc32(sc, EHCI_QTD_HALTED); + qh->qh_qtd.qtd_next = sc->sc_terminate_self; + qh->qh_qtd.qtd_altnext = sc->sc_terminate_self; + qh->qh_qtd.qtd_status = htohc32(sc, EHCI_QTD_HALTED); } /* @@ -394,7 +391,7 @@ qh = sc->sc_intr_p_last[0]; /* the last (1ms) QH terminates */ - qh->qh_link = htohc32(sc, EHCI_LINK_TERMINATE); + qh->qh_link = sc->sc_terminate_self; } for (i = 0; i < EHCI_VIRTUAL_FRAMELIST_COUNT; i++) { ehci_sitd_t *sitd; @@ -497,8 +494,8 @@ qh->qh_curqtd = 0; /* fill the overlay qTD */ - qh->qh_qtd.qtd_next = htohc32(sc, EHCI_LINK_TERMINATE); - qh->qh_qtd.qtd_altnext = htohc32(sc, EHCI_LINK_TERMINATE); + qh->qh_qtd.qtd_next = sc->sc_terminate_self; + qh->qh_qtd.qtd_altnext = sc->sc_terminate_self; qh->qh_qtd.qtd_status = htohc32(sc, EHCI_QTD_HALTED); } /* flush all cache into memory */ --Boundary-00=_tPCGOkni6SDJGZL--