From: Greg KH <greg@kroah.com>
To: Tejun Heo <tj@home-tj.org>
Cc: rusty@rustcorp.com.au, mochel@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2.6.10-rc1 0/4] driver-model: manual device attach
Date: Thu, 4 Nov 2004 09:53:19 -0800 [thread overview]
Message-ID: <20041104175318.GH16389@kroah.com> (raw)
In-Reply-To: <20041104074330.GG25567@home-tj.org>
On Thu, Nov 04, 2004 at 04:43:30PM +0900, Tejun Heo wrote:
> Hello, again. :-)
>
> These are the manual device attach patches I was talking about in the
> previous posting. These patches need devparam patches to be applied
> first. It's composed of two parts.
>
> 1. sysctl node dev.autoattach
>
> dev.autoattach is read/write integer sysctl node which controls
> driver-model's behavior regarding device - driver association.
Ick, no new sysctls please. Make this a per-bus attribute that gets
written to in sysfs. Much nicer and much finer control then.
> 0: autoattach disabled. devices are not associated with drivers
> automatically. i.e. insmod'ing e100.ko won't cause it to attach to the
> actual e100 devices.
> 1: autoattach enabled. The default value. This is the same as the
> current driver model behavior. Driver model automatically associates
> devices to drivers.
> 2: rescan command. If this value is written, bus_rescan_devices() is
> invoked for all the registered bus types; thus attaching all
> devices to available drivers. After rescan is complete, the
> autoattach value is set to 1.
Make this a different sysfs file. "rescan" would be good.
Look at how pci can handle adding new devices to their drivers from
sysfs. If we can move that kind of functionality to the driver core, so
that all busses get it (it will require a new per-bus callback though,
se the other patches recently posted to lkml for an example of this),
that would be what I would like to see happen.
> 2. per-device attach and detach sysfs node.
>
> Two files named attach and detach are created under each device's
> sysfs directory. Reading attach node shows the name of applicable
> drivers.
How does a device know what drivers could be bound to it? It's the
other way around, drivers know what kind of devices they can bind to.
Let's add the ability to add more devices to a driver through sysfs,
again, like PCI does.
> Writing a driver name attaches the device to the driver.
No, do it the other way, attach a driver to a device.
thanks,
greg k-h
next prev parent reply other threads:[~2004-11-04 17:57 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-04 7:43 [PATCH 2.6.10-rc1 0/4] driver-model: manual device attach Tejun Heo
2004-11-04 7:44 ` [PATCH 2.6.10-rc1 1/4] driver-model: sysctl node dev.autoattach Tejun Heo
2004-11-04 7:45 ` [PATCH 2.6.10-rc1 2/4] driver-model: devparam expanded to accept direct per-device parameters via @args argument Tejun Heo
2004-11-04 7:45 ` [PATCH 2.6.10-rc1 3/4] driver-model: detach_state functions renamed Tejun Heo
2004-11-04 7:46 ` [PATCH 2.6.10-rc1 4/4] driver-model: attach/detach sysfs node implemented Tejun Heo
2004-11-04 17:05 ` Dmitry Torokhov
2004-11-04 17:49 ` Greg KH
2004-11-04 10:27 ` [PATCH 2.6.10-rc1 0/4] driver-model: manual device attach Martin Waitz
2004-11-04 17:53 ` Greg KH [this message]
2004-11-05 4:50 ` Tejun Heo
2004-11-05 5:02 ` Dmitry Torokhov
2004-11-05 6:32 ` Tejun Heo
2004-11-05 14:53 ` Dmitry Torokhov
2004-11-08 7:23 ` Dmitry Torokhov
2004-11-08 7:23 ` [PATCH 1/3] Add drvctl default device attribute Dmitry Torokhov
2004-11-08 7:25 ` [PATCH 2/3] Add drvctl handler to PCI bus Dmitry Torokhov
2004-11-08 7:26 ` [PATCH 3/3] Add bind_mode default device/driver attributes 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=20041104175318.GH16389@kroah.com \
--to=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mochel@osdl.org \
--cc=rusty@rustcorp.com.au \
--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