Scott Hiles wrote:
> I have a device (PowerLinc USB) that sends and receives 8 bytes of data.
> For reading, upon receiving an event I read the report, then the field, and
> then read the usage 8 times with the usage_index incremented for each read.
> It works perfectly.
> Now, when I try to reverse that process with the following code, the system
> gives an error "usb_submit_urb(out)" and the HID system stops responding.
> This is all under kernel 2.6.0 and 2.6.1.
Keep going... you need 2.6.1-rc1.
The hid-core.c patch described here http://marc.theaimsgroup.com/?l=linux-usb-devel&m=107357664829164&w=2 is necessary.
The reason the bug causes the HID system to stop responding is described here:
http://marc.theaimsgroup.com/?l=linux-usb-devel&m=107388393607401&w=2
That bug is still there, for the moment, but no longer gets exercised.
> Have I oversimplified my assumption that writing is the reverse of reading
> using the usage calls?
The code you included is the correct way to do it. I have the same PowerLinc device working with identical code. (Except check your ioctl return values for EBUSY)
Later, Charles Lepple wrote:
> Given the large installed user base with the (somewhat broken) hiddev > kernel driver, I can see the appeal [to using hiddev], but you may want > to consider the libhid/libusb approach.
Hiddev works for me. Can you elaborate on what else might be broken and should be looked at?
John Cheevers
------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
