Cannot read using USB Skeleton Driver

Felix Varghese felixv1986 at
Fri Sep 16 07:29:08 EDT 2011

> What type of device is this you are wishing to write a driver for?  That
> will determine the type of interface you need to use, odds are it is not
> going to be a simple char device.

The device is a custom USB dongle whose firmware is also under
development. We are still in the process of deciding what it should
actually show up as on the linux side but right now, we decided to use
a character device for simplicity reasons until we have simple two-way
communication over USB up and running. Since I am writing the firmware
on the device side too, it had indeed been (and still is) my first
suspect :). But I checked the code multiple times and now I am
reasonably sure that I am in fact, doing all that is required to send
out data properly. Besides, data transfer in the other direction works
fine. I have registered only one IN and one OUT endpoint apart from
endpoint 0 and I try to send my data through the IN end-point.

I noticed that after making the wait interruptible, if I hit Ctrl-C
while we are hanging on a read, the device side shows transfer
complete. So the device, apparently, thinks the data has been sent
successfully when we have actually aborted the transfer at the other
end! Shouldn't this mean that something happens after coming out of
the wait_for_completion that really makes the transfer happen?


More information about the Kernelnewbies mailing list