On Tue, 18 Dec 2007, Graeme Gill wrote: > Alan Stern wrote: > > > That's right. The semantics of USBDEVFS_DISCONNECT has changed since > > 2.6.9. It now requires that there be no drivers bound to any > > interfaces; thus you have to call usb_detach_kernel_driver_np() first. > > Right, it does make sense. The confusing part is usb_detach_kernel_driver_np() > taking the interface as an argument.
It seems logical to me. A device can have several interfaces, each with its own driver. So to detach a driver from an interface, your program should have to specify which one. > > There's also an excellent chance you don't need to call > > usb_set_configuration() at all. Your devices have got only one > > configuration, right? > > Well, I don't know. All the current devices may only have one > interface, but this is in common code that is intended to > cope with any number of currently unknown future devices, so > I am just following l ibusb recommendations, and doing a > usb_set_configuration(), to make sure they work. I suspect that it acts merely as a weak kind of reinitialization. > > It sounds like you're not getting the same USB data sent on Linux and > > on the other operating systems. Have you tried monitoring the USB > > transfers and comparing the low-level data? > > I don't have (or have access) to a USB bus analizer. I can > spy on the MSWindows stuff to a degree using snoopypro. Yes, that will work. > I'm not familiar enough with the Linux USB driver yet to know > what facilities it has in this regard. Pointers ? See the kernel source file Documentation/usb/usbmon.txt. Alternatively, for debugging a userspace driver you can do: echo 1 >/sys/module/usbcore/parameters/usbfs_snoop and get the information from the system log. usbmon is somewhat more reliable. Alan Stern - To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html