From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Date: Tue, 28 Feb 2006 16:48:39 +0000 Subject: Re: Is it possible for hotplug not to take control over a device? Message-Id: <20060228164839.GB27725@kroah.com> List-Id: References: <4402B5E3.6020202@coit.es> In-Reply-To: <4402B5E3.6020202@coit.es> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Tue, Feb 28, 2006 at 08:44:05AM +0100, Jose Juan Iglesias Rebollo wrote: > El Lunes, 27 de Febrero de 2006 18:26, Greg KH escribi?: > > On Mon, Feb 27, 2006 at 09:18:43AM +0100, Jose Juan Iglesias Rebollo wrote: > > > Hi all! > > > > > > Recently I purchased a Canon multifunction printer. Its scanner is not > > > supported by linux yet, so I've got one idea: use it through VMware. But > > > VMware cannot take control over it because hotplug already did. > > > > "hotplug" des not take over devices, usb drivers take over them. > > > > > So my question is: Is it possible to configure hotplug so that it > > > ignores a specific device? If so, how can I do it, where should I look > > > for information? > > > > I think the latest version of vmware can disconnect the device from the > > Linux driver it is bound to, but if not, you can do it by hand by either > > unloading the module, or by writing to a sysfs file called "disconnect" > > in the driver's directory. > > > > Hope this helps, > > > > greg k-h > > Hi Greg, thanks for yor answer! > > You are right, at last it is the usb driver (kernel module) who controls the > device. But doesn't hotplug decide which driver controls a device? I say this > because there's no "usbcanon" module but usbstorage instead. My > multifunction's got three "If" under the same device id: > > Sub - Driver = none (scanner, I supose) > Sub - Driver = usblp (I can unload this module: I've got no other printer) > Sub - Driver = usbstorage (I use a flash usb memory) > > If there was a unique "usbcanon or so" module I'd have no problem in unloading > it, but, as you can see, the multifunction is taken over by modules that can > control many other devices. No, you need to realize that you have 3 different USB "devices" here for your 1 "real" device. The Linux kernel wants to bind drivers to two of these individual devices, and doesn't care about the third (the scanner one.) If vmware can't handle this and disconnect just the parts you need, then you should take it up with vmware, as this isn't something that the core utilities can do anything about :) > I've red that hotplug makes use of several map files that tell hotplug about > devices. Isn't there any file where you can configure vendor and device ids > of this multifunction so that hotplug does nothing about it? No, that information is deep within the drivers themselves now (the map files are generated by the information in the drivers.) As you don't want to delete your usb-storage driver, and these devices are "class" devices and not vendor-specific types, there isn't any "generic" way to do this. > Isn't there a more elegant way? Contact vmware and tell them to fix their code, as they can individually unbind devices from drivers quite easily if they wish to :) good luck, greg k-h ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel