From owner-freebsd-bugs@FreeBSD.ORG Tue Jun 1 09:40:17 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CBBB516A4CE for ; Tue, 1 Jun 2004 09:40:17 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id A3E4043D2F for ; Tue, 1 Jun 2004 09:40:17 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i51GeHmJ075676 for ; Tue, 1 Jun 2004 09:40:17 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i51GeHZI075675; Tue, 1 Jun 2004 09:40:17 -0700 (PDT) (envelope-from gnats) Resent-Date: Tue, 1 Jun 2004 09:40:17 -0700 (PDT) Resent-Message-Id: <200406011640.i51GeHZI075675@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Rajesh Mittal Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 33F6116A4CE for ; Tue, 1 Jun 2004 09:39:32 -0700 (PDT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 286A443D49 for ; Tue, 1 Jun 2004 09:39:32 -0700 (PDT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.11/8.12.11) with ESMTP id i51GdSI5010125 for ; Tue, 1 Jun 2004 09:39:28 -0700 (PDT) (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.11/8.12.11/Submit) id i51GdSVI010124; Tue, 1 Jun 2004 09:39:28 -0700 (PDT) (envelope-from nobody) Message-Id: <200406011639.i51GdSVI010124@www.freebsd.org> Date: Tue, 1 Jun 2004 09:39:28 -0700 (PDT) From: Rajesh Mittal To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: kern/67455: EHCI controller is being programmed with incorrect address during ehci_open ( ehci.c) X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jun 2004 16:40:18 -0000 >Number: 67455 >Category: kern >Synopsis: EHCI controller is being programmed with incorrect address during ehci_open ( ehci.c) >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Jun 01 09:40:17 PDT 2004 >Closed-Date: >Last-Modified: >Originator: Rajesh Mittal >Release: FreeBSD 5.2.1-RELEASE >Organization: >Environment: >Description: EHCI controller QH endp field can take only 4 bit wide address address ( Refer EHCI specs). The address value being supplied in ehci_open() (ehci.c code) is 8 bits. This is bug as the highest bit in this 8 bit field is the direction of endpoint ( UE_DIR_IN/UE_DIR_OUT) not part of the real endpoint address. This bit needs to be stripped off from the addr value while programming the QH endp field. Currently This bug results in to EHCI_QH_HRECL incorrectly getting set in the Queue head when the endpoint is an IN endpoint. According to EHCI specs ( EHCI revision 0.96 page 74) "Software must ensure that there is at most one queue head with H-bit set to one". Please note that it is not just a non-compliance issue with the specs. As this bit is used by EHCI controller to decide when to terminate the async schedule , incorrect assignment of this bit will result in to occassional async transfer timeouts. >How-To-Repeat: I ran in to this issue while using the DIAGNOSTIC version of FreeBsd build on my custom hadware setup. As this is a bug affecting the ehci schedule it is a must fix issue for all hw platforms. >Fix: Here is a patch in ehci.c. 1253c1253 < EHCI_QH_SET_ADDR(addr) | --- > EHCI_QH_SET_ADDR(UE_GET_ADDR(addr)) | >Release-Note: >Audit-Trail: >Unformatted: