Hi Alexander, On 10/26/2011 06:00 PM, Alexander Gordeev wrote: > I think this is not necessarily USB problem. I've got a couple of times > in the same situation when libusb returned something strange. Both > times it was a bug in uClibc. :) > I'll be happy to help with this issue. So now, I got another o2 prepaid surfstick and changed the hotplug script so it calls strace $usb_modeswitch, see modeswitch fails (1st try) http://pastebin.com/a0V4KC3D vs. modeswitch succeeds (2nd try) http://pastebin.com/nbC0Ndfi
the first significant difference between the two logs seems to be that on the first try, usb-storage didn't claim the endpoint yet. After claiming the interface with libusb, some calls to USBDEVFS_SUBMITURB go out, interestingly 2 times in the first case (fails) and 3 times in the 2nd case (succeeds)... Then there seems to be some active waiting for the reply in both cases, just the on the first try usb_modeswitch gives up waiting after a long time and on the retry it receives a reply a few moments after the message was sent. My first thought was to try just waiting a bit longer before calling usb_modeswitch, so a added a sleep 60 in the hotplug script before calling usb_modeswitch. Now, usb-storage does claim the interface but usb_modeswitch still fails, eventhough usb-storage was loaded and the boot has fully completed at the time usb_modeswitch was called then. See modeswitch still fails when sleeping 60 seconds before the 1st try http://pastebin.com/0uQVWDx1 Any ideas? Cheers Daniel _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel