I'm a developer at VMware, Inc. working on usb support for our product under Linux and am having a problem I hope you guys can shed some light on.
Some background: We access devices via usbdevfs. We have the potential to operate any USB device, but choose to do so only if a Linux driver has not claimed the interface. We attempt to claim the interface ourselves and if successful we drive the device. We do this under two situations: 1) User interaction 2) Under certain circumstances when a new device is plugged in to Linux (we get select() callback on /proc/bus/usb/devices fd) The problem (seen under 2.4.7 kernel and UP system): In the 2nd case, when the device is a Mass-storage device and /etc/hotplug is set to load the mass-storage device what happens sometimes (most of the time) is as follows: - New device is detected - call_policy fires and loads usb-storage driver - usb-storage driver begins execution of probe() callback - usb-storage driver spawns a thread - vmware wakes up and via usbdevfs calls claim_interface() for the device - usbdevfs claims interface as usb-storage has not yet done so since its probe() callback hasn't finished - usb-storage driver finally finishes probe() callback and usb.c claims the interface for usb-storage driver (forcibly removing control from usbdevfs) This causes problems as both drivers think they control the device. My question is basically, where is the true problem? a) usb subsystem for allowing usb-storage to claim an already claimed interface b) usb subsystem for allowing usbdevfs to claim an interface while probing is going on c) usb-storage for not claiming interface once its committed to driving the device d) usbdevfs for not detecting that it no longer has the interface e) vmware for not following the correct procedure for claiming a device (if so what is the correct procedure) f) no problem at all. this is as designed _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel