NetBSD Problem Report #29731
From www@netbsd.org Fri Mar 18 12:21:47 2005
Return-Path: <www@netbsd.org>
Received: by narn.netbsd.org (Postfix, from userid 31301)
id D7DB063B117; Fri, 18 Mar 2005 12:21:47 +0000 (UTC)
Message-Id: <20050318122147.D7DB063B117@narn.netbsd.org>
Date: Fri, 18 Mar 2005 12:21:47 +0000 (UTC)
From: dan@pod51.demon.co.uk
Reply-To: dan@pod51.demon.co.uk
To: gnats-bugs@netbsd.org
Subject: ehci driver erroneously reports IO errors
X-Send-Pr-Version: www-1.0
>Number: 29731
>Category: kern
>Synopsis: ehci driver erroneously reports IO errors
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Mar 18 12:22:00 +0000 2005
>Closed-Date: Sun May 01 19:25:47 +0000 2005
>Last-Modified: Sun May 01 19:28:01 +0000 2005
>Originator: Daniel Ellis
>Release: top of tree ehci.c r1.91
>Organization:
>Environment:
>Description:
ehci.c:ehci_idone will report the status of a transfer as USBD_IOERROR in the absence of a halt condition. This is incorrect. The completion status byte of an ehci transfer will have error bits set in it if any error occured during the transfer even if was recovered from. If the error couldn't be recovered from, the halted bit is set (see table 3-16 of the EHCI spec).
A suitable fix would be to alter line 833 (of revision 1.91) to say:
if (status & EHCI_QTD_HALTED) {
i.e. only fault the transfer if the halted bit is set.
This misbehaviour leads to the USB recovery mechanism being inoperative, and the bus being much more fragile than it should be.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
From: Lennart Augustsson <lennart@augustsson.net>
To: gnats-bugs@netbsd.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org
Subject: Re: kern/29731: ehci driver erroneously reports IO errors
Date: Fri, 18 Mar 2005 14:41:08 +0100
dan@pod51.demon.co.uk wrote:
> A suitable fix would be to alter line 833 (of revision 1.91) to say:
>
> if (status & EHCI_QTD_HALTED) {
This fix seems wrong given that the HALTED bit can be masked
away on line 801.
I'm curious, what are the errors that you have observed that
the host controller recovers from?
-- Lennart
From: Dan Ellis <dellis@conexant.com>
To: gnats-bugs@netbsd.org
Cc: kern-bug-people@netbsd.org, netbsd-bugs@netbsd.org,
gnats-admin@netbsd.org
Subject: Re: kern/29731: ehci driver erroneously reports IO errors
Date: Mon, 18 Apr 2005 10:45:50 +0100
dan@pod51.demon.co.uk wrote:
> A suitable fix would be to alter line 833 (of revision 1.91) to say:
>
> if (status & EHCI_QTD_HALTED) {
This fix seems wrong given that the HALTED bit can be masked
away on line 801.
I'm curious, what are the errors that you have observed that
the host controller recovers from?
Line 801 only masks HALTED if it's the last one and complete, not for
intermediate transfers or short reads.
The host controller can recover from up to 3 errors on a given
transaction. We are developing some hardware which was causing a lot of
XACTER and BUFERR errors, but they were getting through with the
hardware retries.
I suspect the error rate in normal operation is not absolutely zero -
there is quite possibly the odd transaction which has an error and has
to get retried, but halting the pipe just because there was a retry
could be a bit terminal.
If a transfer is not marked as NORMAL_COMPLETION when it has only
suffered retries,. then further up the stack, it doesn't complete
properly, especially if it is marked as IOERROR.
--
Daniel Ellis Conexant Systems Ltd
Senior Software Engineer Unit 230 Cambridge Science Park
http://www.conexant.com Milton Road
Phone: +44 1223 707318 Cambridge CB4 0WB
Fax: +44 1223 707447 UK
********************** Legal Disclaimer ****************************
"This email may contain confidential and privileged material for the sole use of the intended recipient. Any unauthorized review, use or distribution by others is strictly prohibited. If you have received the message in error, please advise the sender by reply email and delete the message. Thank you."
**********************************************************************
State-Changed-From-To: open->closed
State-Changed-By: augustss@netbsd.org
State-Changed-When: Sun, 01 May 2005 19:25:47 +0000
State-Changed-Why:
Fixed.
From: Lennart Augustsson <lennart@augustsson.net>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: kern/29731: ehci driver erroneously reports IO errors
Date: Sun, 01 May 2005 21:27:09 +0200
Well, you were absolutly right. I've seen it with my own
eyes. :) I've also fixed the problem (I think).
Thanks for spotting this!!
-- Lennart
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.