From: Greg KH <greg@kroah.com>
To: ambx1@neo.rr.com, Dmitry Torokhov <dtor_core@ameritech.net>,
linux-kernel@vger.kernel.org, Tejun Heo <tj@home-tj.org>,
Patrick Mochel <mochel@digitalimplant.org>
Subject: Re: [RFC] [PATCH] driver core: allow userspace to unbind drivers from devices.
Date: Tue, 16 Nov 2004 12:17:26 -0800 [thread overview]
Message-ID: <20041116201726.GA11069@kroah.com> (raw)
In-Reply-To: <20041116061315.GG29574@neo.rr.com>
On Tue, Nov 16, 2004 at 01:13:15AM -0500, Adam Belay wrote:
>
> I'm not sure what your bind_mode patch includes, but I would like to start a
> general discussion on the bind/unbind issue.
>
> I appreciate the effort, and I agree that this feature is important. However,
> I would like to discuss a few issues.
>
> 1.) I don't think we should merge a patch that supports driver "unbind"
> without also supporting driver "bind".
>
> They're really very interelated, and we don't want to break userspace by
> changing everything around when we discover a cleaner solution.
How would we break userspace, when you can't do either thing today?
Just by adding one new feature, doesn't break anything :)
Anyway, I agree, but the core needs to have it's locking reworked in
order for this to work properly. I'm working on this now.
> 2.) I don't like having an "unbind" file.
Why?
> This implies that we will have at least three seperate files controlling
> driver binding when we really need only one or two at the most. Consider
> "bind", "unbind", and the link to the driver that is bound.
No. Consider the fact that the "unbind" file will not be present if the
device is not bound to anything. Once it is bound, the unbind file will
be created, and the symlink will be created. The symlink matches other
parts of sysfs. By trying to put the name of the driver in a file, that
makes userspace work a lot harder to try to figure out exactly what
driver is bound (consider the fact that I can have both a pci and a usb
driver with the same name in sysfs, and that's legal.)
So, when a device is not bound to a driver, there will be no symlink, or
a "unbind" file, only a "bind" file. Really there is only 1 "control"
type file present at any single point in time.
Sound good?
thanks,
greg k-h
next prev parent reply other threads:[~2004-11-16 20:26 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-09 22:37 [RFC] [PATCH] driver core: allow userspace to unbind drivers from devices Greg KH
2004-11-09 23:36 ` Dmitry Torokhov
2004-11-10 0:33 ` Greg KH
2004-11-10 3:49 ` Dmitry Torokhov
2004-11-16 5:54 ` Greg KH
2004-11-16 20:43 ` Dmitry Torokhov
2004-11-16 23:08 ` Greg KH
2004-11-17 7:00 ` Dmitry Torokhov
2004-11-17 17:55 ` Greg KH
2004-11-16 6:13 ` Adam Belay
2004-11-16 6:37 ` Dmitry Torokhov
2004-11-16 7:04 ` Adam Belay
2004-11-16 20:22 ` Greg KH
2004-11-16 21:09 ` Dmitry Torokhov
2004-11-16 20:17 ` Greg KH [this message]
2004-11-17 7:07 ` Dmitry Torokhov
2004-11-17 17:53 ` Greg KH
2004-11-17 19:01 ` Dmitry Torokhov
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=20041116201726.GA11069@kroah.com \
--to=greg@kroah.com \
--cc=ambx1@neo.rr.com \
--cc=dtor_core@ameritech.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mochel@digitalimplant.org \
--cc=tj@home-tj.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