I'm running Ubuntu 10.04 and I'm creating an usb device driver for a specialist device known as a motion controller.
Using a usb hardware packet sniffer I can see that the device can successfully write and read commands from the device, two main problems though.
In my read function, wait_for_completion just hangs, it never finishes. I managed to get round this using wait_for_completion_timeout which returns the correct result. What I don't understand is, if the driver is receiving a response why does program hang continually without a time-out.
Secondly, The driver only works once, ie I run my program which contains the commands and the write and read functions work fine and get a response. However if I run the program again I get no response from the device, I can write to it but not read. To get it working again I need to restart the device.
Does anyone have an idea what the problem could be?
(By the way its defiantly not a problem with the device, it already has a fully working windows driver and has undergone extensive testing).