From owner-freebsd-current@FreeBSD.ORG Thu Oct 14 22:52:58 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4FD4C106564A for ; Thu, 14 Oct 2010 22:52:58 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe03.swip.net [212.247.154.65]) by mx1.freebsd.org (Postfix) with ESMTP id D234E8FC15 for ; Thu, 14 Oct 2010 22:52:57 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=iBCGAMPDYtSF9sDXX85uHY3wcnYctfVT8vFpe3qPflY= c=1 sm=1 a=8SiqrvMBkfUA:10 a=8nJEP1OIZ-IA:10 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=6I5d2MoRAAAA:8 a=VFscrPYYAHwoIx1wxuoA:9 a=jQ8FpJV9uD_-oXBsf3MA:7 a=t-Uzwxh79TugGd3J4L4KgGuwT7oA:4 a=wPNLvfGTeEIA:10 a=i9M/sDlu2rpZ9XS819oYzg==:117 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe03.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 35460854 for freebsd-current@freebsd.org; Fri, 15 Oct 2010 00:52:56 +0200 To: freebsd-current@freebsd.org From: Hans Petter Selasky X-Face: +~\`s("[*|O,="7?X@L.elg*F"OA\I/3%^p8g?ab%RN'( =?iso-8859-1?q?=3B=5FIjlA=3A=0A=09hGE=2E=2EEw?=, =?iso-8859-1?q?XAQ*o=23=5C/M=7ESC=3DS1-f9=7BEzRfT=27=7CHhll5Q=5Dha5Bt-s=7Co?= =?iso-8859-1?q?TlKMusi=3A1e=5BwJl=7Dkd=7DGR=0A=09Z0adGx-x=5F0zGbZj=27e?=(Y[(UNle~)8CQWXW@:DX+9)_YlB[tIccCPN$7/L' Date: Fri, 15 Oct 2010 00:54:14 +0200 MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201010150054.14448.hselasky@c2i.net> Subject: Possible solution for USB EHCI IRQ problems X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Oct 2010 22:52:58 -0000 Hi, Anyone out there experiencing so-called EHCI-hangs, can try applying the following patch by hand: http://p4web.freebsd.org/@@184749?ac=10 ==== //depot/projects/usb/src/sys/dev/usb/controller/ehci.c#62 (text+ko) ==== @@ -1589,6 +1589,10 @@ usb_callout_reset(&sc->sc_tmo_pcd, hz, (void *)&ehci_pcd_enable, sc); } + /* if there was a doorbell, clear the doorbell busy flag */ + if (status & EHCI_STS_IAA) + sc->sc_flags &= ~EHCI_SCFLG_IAADBUSY; + status &= ~(EHCI_STS_INT | EHCI_STS_ERRINT | EHCI_STS_PCD | EHCI_STS_IAA); if (status != 0) { @@ -2313,7 +2317,7 @@ * XXX Certain nVidia chipsets choke when using the IAAD * feature too frequently. */ - if (sc->sc_flags & EHCI_SCFLG_IAADBUG) + if (sc->sc_flags & (EHCI_SCFLG_IAADBUG | EHCI_SCFLG_IAADBUSY)) return; /* XXX Performance quirk: Some Host Controllers have a too low @@ -2321,8 +2325,10 @@ * Controller after queueing the BULK transfer. */ temp = EOREAD4(sc, EHCI_USBCMD); - if (!(temp & EHCI_CMD_IAAD)) + if (!(temp & EHCI_CMD_IAAD)) { EOWRITE4(sc, EHCI_USBCMD, temp | EHCI_CMD_IAAD); + sc->sc_flags |= EHCI_SCFLG_IAADBUSY; + } } struct usb_pipe_methods ehci_device_bulk_methods = ==== //depot/projects/usb/src/sys/dev/usb/controller/ehci.h#20 (text+ko) ==== @@ -347,6 +347,7 @@ #define EHCI_SCFLG_TT 0x0020 /* transaction translator present */ #define EHCI_SCFLG_LOSTINTRBUG 0x0040 /* workaround for VIA / ATI chipsets */ #define EHCI_SCFLG_IAADBUG 0x0080 /* workaround for nVidia chipsets */ +#define EHCI_SCFLG_IAADBUSY 0x0100 /* doorbell is busy */ uint8_t sc_offs; /* offset to operational registers */ uint8_t sc_doorbell_disable; /* set on doorbell failure */ --HPS