Hello! My name is Salvador and I'm designing a hardware implementation of an USB HID device. My current target is an FPGA and I'm using Linux to test my device. 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: During initialization the kernel sends a SET_IDLE to the device indicating the idle rate as 0. It means: never send a report unless something changed. It means the device will NAK until it have something really useful to report. That's ok, the problem is when my device is mapped to an hiddev (i.e. /dev/usb/hiddev0) and I do a read, i.e.
$ cat /dev/usb/hiddev0 After aprox. 10 seconds the kernel sends a RESET to my device! It looks quite wrong. Looking at the sources I see the NAK is interpreted as ETIMEOUT by hid-core making a call to hid_error and scheduling a RESET from there. But these NAKs aren't any error, they are the normal behavior of a device that configured with SET_IDLE(0). If I force my device to reply a change every second this problem goes away. Note that this only happends when I read from the hiddev device, if nobody reads from there the kernel doesn't send any RESET. Is that a bug or is it something I'm doing wrong? Regards, SET -- _______________________________________________________________ Ing. Salvador Eduardo Tropea http://utic.inti.gov.ar/ INTI-Electrónica e Informática Tel: (+54 11) 4724 6315 Colectora de Av. General Paz 5445 San Martín - B1650KNA Casilla de Correo 157 FAX: (+54 11) 4754 5194 Buenos Aires * Argentina http://www.inti.gov.ar/ - 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