On Thu, 17 Mar 2005, Christopher Li wrote: > Hi Alan, > > Thanks for your reply.
> > Device change events have nothing to do with either sysfs or > > /proc/bus/usb/devices. Use hotplug. > > Right now VMware select() on the /proc/bus/usb/devices for the > device change event arrived. Maybe this topic belong to the > hotplug mailing list. It's worth trying the hotplug list. > > Short of rmmod'ing a driver, there is no way to prevent the kernel from > > binding it to a device. However, VMware can tell the kernel to _unbind_ a > > driver by using the USBDEVFS_DISCONNECT ioctl in usbfs. > > I add the USBDEVFS_DISCONNECT to VMware recently. But that doesn't solved all > the problems. > > Let the device bind to a kernel driver then disconnect it again will > disturb some (broken) USB devices. Some PDA syncing tend to have this problem. > I guess the firmware in the PDA has some pretty straight forward initialing > sequence in mind, anything beyond that is likely goto an untested code path. > > In that case, it would be best not to let the kernel driver touch the device > at all. I am thinking an option that kernel will aways pass the event > to hotplug and let the hotplug decide what to do next. Controlling which driver is bound to a device is a difficult problem and Linux doesn't really have any support for it now. If you need to unbind another driver, you could then reset the device. That might solve the problem of interrupted PDA syncing. > > It might be possible to change the hotplug manager so that VMware could > > tell it to ignore USB events. > > I will look into that. As I mention above, the kernel needs the ability to > the skip the binding in the first place. The hotplug approach seems best. Alan Stern ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel