Subject: kern/29731: ehci driver erroneously reports IO errors
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <dan@pod51.demon.co.uk>
List: netbsd-bugs
Date: 03/18/2005 12:22:00
>Number: 29731
>Category: kern
>Synopsis: ehci driver erroneously reports IO errors
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Mar 18 12:22:00 +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: