David Brownell wrote: > Further testing on my system turned up more information: > > - The string fetches done during device enumeration fail sometimes too. > This leads to delays, timeouts, resubmissions ... it's not just these > cases in test #10. Do you see messages about khubd timeouts when that > gadgetfs device enumerates?
Yes: $ grep 'khubd' /var/log/syslog Jan 15 11:08:52 egypt kernel: usb 4-4: khubd timed out on ep0in len=0/255 Jan 15 11:22:38 egypt kernel: usb 4-4: khubd timed out on ep0in len=0/255 Jan 15 11:23:41 egypt kernel: usb 4-4: khubd timed out on ep0in len=0/255 Jan 15 11:24:53 egypt kernel: usb 4-4: khubd timed out on ep0in len=0/255 Jan 15 11:27:49 egypt kernel: usb 4-4: khubd timed out on ep0in len=0/255 > - In all cases, the control requests which fail don't even get up to > userspace. Tracing shows they're received by gadgetfs, and reported. > But the kernel never gets asked for those events. Do you really mean "kernel" in the last line of that paragraph? IIRC in gadgetfs some events will flush the event queue (e.g. disconnect I think). Could there be a fault in the code in this area? > As to why they don't get up to userspace, it seems to be something after > the kill_fasync() is called which doesn't work. The event loop is never > notified; sigwait() never returns, the read on ep0 is never issued. This > is outside the realm of gadgetfs infrastructure, unfortunately, so unless > a bug turns up in how those notifications are issued I'll suspect something > changed in the signal processing triggered by kill_fasync(). > > I'm thinking of trying to rewrite that userspace loop in terms of poll(), > but if that works it would just be papering over a bug elsewhere. Since > that uses a different mechanism in the kernel, it's very possible that > would work while the kill_fasync() mechanism stays broken. When I looked at that code I wondered why it needed any sort of asynchronous notification at all: can't it just do a normal blocking read until it gets the next event? Anyway, as you say, changing it would be papering over. Phil. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel