Hej Linus! Linus Walleij wrote: > - some devices bug out on libusb_open()
Please send me a debug log from when this happens. Exact steps are at http://libusb.org/wiki/debug > I have added code like below to libmtp to instead inspect sysfs > *before* starting any libusb-based business. .. > - Is this a good idea? It's a horrible hack and I don't think it's a very good idea. I understand that you have some real broken devices to deal with, but let's just make libusb work for you instead. Also, look into scanf() and friends, they are highly underrated! :) > - What is the scary business that libusb_open() does that makes > a lot of substandard USB devices totally freak out? I can only confirm that opening does not talk to the device. Enumeration can. But really, I need to see the debug log, and usbmon output from when this happens would certainly also be nice. Linus Walleij wrote: > you cannot open a session to an MTP device in say a udev script, > then close it and open another session later Maybe don't do that. Open the session in the udev-driven program, and do not close it. Find a way to tell libmtp that a session is already open, and only OpenSession when one isn't. It isn't pretty, but.. //Peter -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html