From: Greg KH <greg@kroah.com>
To: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: [RFC] change netdevice to use struct device instead of struct class_device
Date: Mon, 3 Jul 2006 15:47:19 -0700 [thread overview]
Message-ID: <20060703224719.GA14176@kroah.com> (raw)
I have a patch here that converts the network device structure to use
the struct device instead of struct class_device structure. It's a bit
too big to post here, so it's at:
http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/network-class_device-to-device.patch
I can split it out, but then it will not build for the intermediate
steps, which 'git bisect' users might not appreciate. If you all want
me to break it up to make it easier to review, please let me know and
I'll be glad to do it.
With this patch applied, sysfs now looks like:
$ tree /sys/class/net/
/sys/class/net/
|-- eth0 -> ../../devices/pci0000:00/0000:00:02.0/0000:01:00.2/0000:03:0e.0/eth0
|-- gerg -> ../../devices/pci0000:00/0000:00:02.0/0000:01:00.2/0000:03:0c.0/gerg
`-- lo -> ../../devices/lo
Instead of the different directories being in /sys/class/net.
What this buys us is now the different network devices can be called by
the core when the system is shutting down or restoring, with the
suspend/resume changes that Linus has written (and are now in -mm).
This can be used by the network core to stop the queue, or whatever else
it desires.
Other good things happen with this, as the network devices are now real
devices, instead of the second-class citizens that "class_device" was.
(which is one reason why I'm getting rid of class_device entirely).
The patch needs some other changes to the driver core that are also in
my git tree, and included in the -mm release. Specifically these
patches are needed:
http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/driver/device-groups.patch
http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/driver/device-class-parent.patch
http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/driver/device-class-attr.patch
http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/driver/device_rename.patch
And if you are curious, the suspend stuff from Linus is at:
http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/driver/suspend-infrastructure-cleanup-and-extension.patch
I can gladly keep this in my tree (due to the previously mentioned
requirements) and eventually merge it with Linus after 2.6.18 is out, if
no one objects to it.
thanks,
greg k-h
p.s. That bonding code! WTF is going on with poking around in the
internals of krefs? And why are you returning more than one value
from a sysfs file? I thought I asked that this stuff be fixed up a
long time ago?
next reply other threads:[~2006-07-03 22:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-03 22:47 Greg KH [this message]
2006-07-03 23:07 ` [RFC] change netdevice to use struct device instead of struct class_device Jeff Garzik
2006-07-03 23:16 ` Greg KH
2006-07-04 1:57 ` David Miller
2006-07-04 22:31 ` Greg KH
2006-07-05 18:29 ` David Miller
2006-07-05 14:29 ` Marcel Holtmann
2006-07-07 0:02 ` Greg KH
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=20060703224719.GA14176@kroah.com \
--to=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@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).