Cannot read using USB Skeleton Driver

Felix Varghese felixv1986 at
Mon Sep 19 09:21:18 EDT 2011

Oh I don't think I have customized it to the point of breaking it. I
just modified the VID and PID to those of my device. And later, when I
noticed where it was getting stuck, I changed the wait_for_completion
to wait_for_completion_interruptible (in the code snippet quoted
previously) so that I could recover with Ctrl-C instead of a reboot.
And my hardware works fine with the usbserial driver you suggested (I
can read/write to it from a simple terminal program). But, to develop
a full-fledged driver, the skeleton driver seemed like a better
starting point, which is I am still trying to get it working.

The condition which causes the code to wait for eternity (from the
line I quoted in one of my previous mails) seems to be: if
But I notice that this variable is not true even for the first read.
So the code seems to wait for the completion of something that has not
yet started. Also, I do not see this variable being explicitly set to
false either, anywhere within the driver. I may be on the wrong track,
but isn't this variable one that is used only within our driver? If
so, what exactly is it used for, considering that it is only set to 1
(never to 0) and is 0 initially?


More information about the Kernelnewbies mailing list