From: Greg KH <greg@kroah.com>
To: Ben Collins <ben.collins@ubuntu.com>
Cc: Nicholas Miell <nmiell@comcast.net>, linux-kernel@vger.kernel.org
Subject: Re: [RFC] Pushing device/driver binding decisions to userspace
Date: Thu, 23 Nov 2006 02:29:28 -0800 [thread overview]
Message-ID: <20061123102928.GA22118@kroah.com> (raw)
In-Reply-To: <1163395364.5178.327.camel@gullible>
On Sun, Nov 12, 2006 at 09:22:44PM -0800, Ben Collins wrote:
> On Sun, 2006-11-12 at 17:47 -0800, Nicholas Miell wrote:
> > On Sun, 2006-11-12 at 17:24 -0800, Ben Collins wrote:
> > > On Sun, 2006-11-12 at 16:49 -0800, Nicholas Miell wrote:
> > > > On Sun, 2006-11-12 at 15:39 -0800, Ben Collins wrote:
> > > >
> > > > What's wrong with making udev or whatever unbind driver A and then bind
> > > > driver B if the driver bound by the kernel ends up being the wrong
> > > > choice? (Besides the inelegance of the kernel choosing one and then
> > > > userspace immediately choosing the other, of course.)
> > > >
> > > > I'd argue that having multiple drivers for the same hardware is a bit
> > > > strange to begin with, but that's another issue entirely.
> > >
> > > If two drivers are loaded for the same device, there's no way for udev
> > > to tell the kernel which driver to use for a device, that I know of.
> >
> > /sys/bus/*/drivers/*/{bind,unbind}
>
> "bind" does not tell the driver core to "bind this device with this
> driver", it tells it to "bind this driver to whatever devices we match
> that aren't already bound".
No it does not, it tells the driver core to "bind this device with this
driver, _if_ the driver will accept it".
> That doesn't solve my use case.
Yes it does:
echo -n BUS_ID > /sys/bus/foo_bus/drivers/foo_driver/unbind
echo -n BUS_ID > /sys/bus/foo_bus/drivers/baz_driver/bind
and you are set. That's the way other distros use this functionality :)
thanks,
greg k-h
next prev parent reply other threads:[~2006-11-23 10:38 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-12 23:39 [RFC] Pushing device/driver binding decisions to userspace Ben Collins
2006-11-13 0:49 ` Nicholas Miell
2006-11-13 1:24 ` Ben Collins
2006-11-13 1:47 ` Nicholas Miell
2006-11-13 5:22 ` Ben Collins
2006-11-13 6:45 ` Nicholas Miell
2006-11-13 7:10 ` Ben Collins
2006-11-13 9:45 ` Martin Mares
2006-11-13 10:13 ` Xavier Bestel
2006-11-23 10:29 ` Greg KH [this message]
2006-11-23 11:40 ` Kay Sievers
2006-11-24 3:59 ` Greg KH
2006-11-13 7:58 ` Arjan van de Ven
2006-11-13 18:51 ` Lee Revell
2006-11-13 20:18 ` Arjan van de Ven
2006-11-13 22:16 ` Jim Crilly
2006-11-13 22:59 ` Lee Revell
2006-11-13 23:22 ` Jim Crilly
2006-11-13 23:45 ` Lee Revell
2006-11-14 1:14 ` Jim Crilly
2006-11-14 7:32 ` Arjan van de Ven
2006-11-14 17:11 ` Jim Crilly
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=20061123102928.GA22118@kroah.com \
--to=greg@kroah.com \
--cc=ben.collins@ubuntu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nmiell@comcast.net \
/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