On Wed, 30 Jan 2008, Salvador Eduardo Tropea wrote:

> Hello!
> 
> Here another problem I found (see the "Problem: Device RESET when
> reading hiddev" thread):
> I'm using Debian GNU/Linux 4.0 (etch) with kernel 2.6.18.
> I found a problem that looks like a bug in hiddev kernel code, but I'm
> not sure. Here is what I found:
> The problem happends when I'm reading from an hiddev device (i.e.
> /dev/usb/hiddev0). If the kernel tries to recover from an error (sending
> a RESET) and the SET_INTERFACE request fails (used to recreate the
> current interface state) then the kernel re-enumerates the device. It
> means the device have a new address. The problem is that the hiddev
> device doesn't really know about this change and it gets useless, I must
> close the device and open it again (so it gets the new address). The
> device doesn't report any kind of read error.
> 
> Is that a bug or is it something I'm doing wrong?

It's a bug for Set-Interface to fail.  Following a reset, the device 
has no reason to fail such a request.

I'm not terribly familiar with the hiddev driver, but I think it's not
a bug that it doesn't report any kind of read error when this happens.  
The situation should be exactly the same as if you had unplugged the
HID device -- reads should return an end-of-file indication rather than
an error.  However I could be wrong about this.

Alan Stern

-
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to