djpohly / piuio

Custom PIUIO module for Linux
GNU General Public License v2.0
29 stars 13 forks source link

Sporadically fails to start USB requests #3

Closed djpohly closed 10 years ago

djpohly commented 10 years ago

Occasionally when the device is being opened, the driver somehow fails to start or complete the USB requests for output and input. piuio_open appears to complete successfully, with neither of the calls to usb_submit_urb failing, but the completion handler is never run.

Perhaps some state in the URB is messed up such that it will submit but not return? How much needs to be reinitialized after closing the device?

Any insight from anyone?

racerxdl commented 10 years ago

On my PIUIO Clone Hardware I force disconnect before trying to connect to device to avoid these issues. But I'm on oposite side (a.k.a. hardware side). Maybe it will work also on kernel driver?

djpohly commented 10 years ago

Interesting... but it looks like that's more something that happens on connect, where the problem here is something that happens on open. The device is already connected, and it's been working properly. Then we stop polling (because StepMania or the X server has closed) and start it again, and it doesn't go.

racerxdl commented 10 years ago

Maybe when stop polling we should close the device and then open when start pooling again?

djpohly commented 10 years ago

I'm going to guess this was just a hardwark quirk that was fixed by 172dadd. We closed and reopened the input device a number of times in quick succession after that commit, and we didn't see the problem again (when previously it happened about half of the time).

We'll reopen if this still happens.