Subject: Any fixes/workarounds for USB error --> 'uhci1: host controller process error', 'host controller halted'
To: None <lennart@augustsson.net, wulf@ping.net.au>
From: None <davef1624@aol.com>
List: tech-kern
Date: 05/27/2005 15:09:32
On a heavily loaded i386 (dual-Xeon) based system,
using Intel's ICH3 I/O controller chip (which includes a 1.1 USB Host 
Controller),
I'm seeing the following uhci errors:

May 23 18:56:40 cho-525-1-d2 kernel: uhci1: host controller process 
error
May 23 18:56:40 cho-525-1-d2 kernel: uhci1: host controller halted

This occurs after several hours of load on the system.

Apparently, the USB host controller complains about an inconsistency 
when processing
one of the TD's in its Frame List.

Is there any workaround and/or fix for this issue?   (Don't want to 
reboot)
Could this be a memory corruption issue, or a timing related issue?

thanks for your help,
Dave


-----Original Message-----
From: Lennart Augustsson <lennart@augustsson.net>
To: wulf@ping.net.au
Cc: tech-kern@netbsd.org
Sent: Mon, 16 May 2005 17:34:07 +0200
Subject: Re: usb control endpoint exclusive access

  You patch is fine and you can apply it if you like.

 The control endpoint can have shared access since it
 always remains open. The other endpoints are a different matter.

 -- Lennart

 Berndt Josef Wulf wrote:
 > G'day,
  > > I'm currently working with the USRP development board that uses a 
FX2 USB-2.0 > interface. NetBSD has no problems in assigning it to the 
ugen device. The > application expects to be able to open endpoint 0, 
the designated USB
  > control endpoint, by more than one process. The applications use 
libusb to > access the USB interface.
  > > On inspection of the ugen source code it can be seen that the ugen 
device > driver only permits exclusive access to the control endpoint 
and any other > endpoint for this matter. I suspect other USB devices 
will do likewise.
  > > My current work around to this problem by using a modified version 
of the > kernel permitting multiple access to the control endpoint of 
the USB > interface. The applied patch is shown below:
 > > --- ugen.c.orig 2005-05-16 02:46:59.000000000 +0930
 > +++ ugen.c 2005-05-16 03:18:59.000000000 +0930
 > @@ -333,14 +333,14 @@
 > if (sc == NULL || sc->sc_dying)
 > return (ENXIO);
 > > - if (sc->sc_is_open[endpt])
 > - return (EBUSY);
 > -
 > if (endpt == USB_CONTROL_ENDPOINT) {
 > sc->sc_is_open[USB_CONTROL_ENDPOINT] = 1;
 > return (0);
 > }
 > > + if (sc->sc_is_open[endpt])
 > + return (EBUSY);
 > +
 > /* Make sure there are pipes for all directions. */
 > for (dir = OUT; dir <= IN; dir++) {
 > if (flag & (dir == OUT ? FWRITE : FREAD)) {
  > > > This grants shared access to the control endpoint but only 
exclusive access > rights to the other endpoints.
 > > The applications work fine with the above work around applied.
  > > What is the best and more importantly the correct way of solving 
this problem?
 > > cheerio Berndt