linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: Is it possible for hotplug not to take control over a device?
Date: Tue, 28 Feb 2006 16:48:39 +0000	[thread overview]
Message-ID: <20060228164839.GB27725@kroah.com> (raw)
In-Reply-To: <4402B5E3.6020202@coit.es>

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\0 - Driver = none (scanner, I supose)
> Sub\x01 - Driver = usblp (I can unload this module: I've got no other printer)
> Sub\x06 - 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&kid\x110944&bid$1720&dat\x121642
_______________________________________________
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

      parent reply	other threads:[~2006-02-28 16:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-27  8:18 Is it possible for hotplug not to take control over a device? Jose Juan Iglesias Rebollo
2006-02-27 17:26 ` Greg KH
2006-02-28  7:44 ` Jose Juan Iglesias Rebollo
2006-02-28 16:48 ` Greg KH [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060228164839.GB27725@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).