Network: convert network devices to use struct device instead of class_device
Subsystems (2)
Quoted 31 lines · Linux Kernel Mailing List
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=43cb76d91ee85f579a69d42bc8efc08bac560278 Commit: 43cb76d91ee85f579a69d42bc8efc08bac560278 Parent: 2943ecf2ed32632473c06f1975db47a7aa98c10f Author: Greg Kroah-Hartman <[email protected]> AuthorDate: Tue Apr 9 12:14:34 2002 -0700 Committer: Greg Kroah-Hartman <[email protected]> CommitDate: Wed Feb 7 10:37:11 2007 -0800Network: convert network devices to use struct device instead of
class_deviceThis lets the network core have the ability to handle suspend/resume issues, if it wants to.
Thanks to Frederik Deweerdt <[email protected]> for the arm driver fixes.
Signed-off-by Greg Kroah-Hartman <[email protected]>--- drivers/infiniband/ulp/ipoib/ipoib_main.c | 33 ++-- drivers/infiniband/ulp/ipoib/ipoib_vlan.c | 11 +- drivers/net/arm/at91_ether.c | 2 +- drivers/net/arm/etherh.c | 2 +- drivers/net/bonding/bond_sysfs.c | 287 +++++++++++++++++----------- drivers/net/iseries_veth.c | 2 +- drivers/net/macb.c | 36 ++-- drivers/net/smc911x.c | 2 +- drivers/net/smc91x.c | 2 +- drivers/net/wireless/hostap/hostap_main.c | 2 +- drivers/net/wireless/orinoco.c | 4 +- drivers/net/wireless/orinoco_cs.c | 2 +- drivers/net/wireless/spectrum_cs.c | 2 +-
Quoted 8 lines
include/linux/netdevice.h | 5 +- net/bridge/br_if.c | 2 +- net/bridge/br_sysfs_br.c | 234 +++++++++++++----------- net/bridge/br_sysfs_if.c | 2 +- net/core/dev.c | 6 +- net/core/net-sysfs.c | 175 ++++++++++-------- net/core/skbuff.c | 2 +- 20 files changed, 451 insertions(+), 362 deletions(-)
It's highly disappointing that this was never discussed on [email protected], or even CC'd to me.
Jeff
Quoted 9 lines · On Thu, 08 Feb 2007 07:43:18 -0500 Jeff Garzik <[email protected]> wrote:
Quoted 8 lines · Linux Kernel Mailing List
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=43cb76d91ee85f579a69d42bc8efc08bac560278 Commit: 43cb76d91ee85f579a69d42bc8efc08bac560278 Parent: 2943ecf2ed32632473c06f1975db47a7aa98c10f Author: Greg Kroah-Hartman <[email protected]> AuthorDate: Tue Apr 9 12:14:34 2002 -0700 Committer: Greg Kroah-Hartman <[email protected]> CommitDate: Wed Feb 7 10:37:11 2007 -0800
Quoted 4 lines
Quoted 4 lines
Network: convert network devices to use struct device instead of
class_deviceThis lets the network core have the ability to handle suspend/resume issues, if it wants to.
It fixes a non-problem. I would like to see the network core suspend/resume proposal as well. Last time I examined doing network core suspend help, the problem was that the physical device suspend was called before the class device. It is not clear how this change would help.
Quoted 14 lines · Stephen Hemminger
Quoted 11 lines · On Thu, 08 Feb 2007 07:43:18 -0500 Jeff Garzik <[email protected]> wrote:
Quoted 10 lines · Linux Kernel Mailing List
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=43cb76d91ee85f579a69d42bc8efc08bac560278 Commit: 43cb76d91ee85f579a69d42bc8efc08bac560278 Parent: 2943ecf2ed32632473c06f1975db47a7aa98c10f Author: Greg Kroah-Hartman <[email protected]> AuthorDate: Tue Apr 9 12:14:34 2002 -0700 Committer: Greg Kroah-Hartman <[email protected]> CommitDate: Wed Feb 7 10:37:11 2007 -0800Network: convert network devices to use struct device instead of
class_device
Quoted 7 lines
Quoted 2 lines
Quoted 2 lines
This lets the network core have the ability to handle suspend/resume issues, if it wants to.
It fixes a non-problem. I would like to see the network core suspend/resume proposal as well. Last time I examined doing network core suspend help, the problem was that the physical device suspend was called before the class device. It is not clear how this change would help.
If physical devices are registered before class devices then when suspending class devices are naturally suspended first. It is still not clear to me why we need to convert everythign to struct device, I believe I've shown (with patches) that it is possible to integrate struct class_device into PM framework and avoid reshuffling half of the kernel code.
Signature · 1 line
Dmitry
Quoted 44 lines · Jeff Garzik
Quoted 34 lines · Linux Kernel Mailing List
Commit: 43cb76d91ee85f579a69d42bc8efc08bac560278 Parent: 2943ecf2ed32632473c06f1975db47a7aa98c10f Author: Greg Kroah-Hartman <[email protected]> AuthorDate: Tue Apr 9 12:14:34 2002 -0700 Committer: Greg Kroah-Hartman <[email protected]> CommitDate: Wed Feb 7 10:37:11 2007 -0800Network: convert network devices to use struct device instead of
class_deviceThis lets the network core have the ability to handle suspend/resume issues, if it wants to.
Thanks to Frederik Deweerdt <[email protected]> for the arm driver fixes.
Signed-off-by Greg Kroah-Hartman <[email protected]>---
drivers/infiniband/ulp/ipoib/ipoib_main.c | 33 ++-- drivers/infiniband/ulp/ipoib/ipoib_vlan.c | 11 +- drivers/net/arm/at91_ether.c | 2 +- drivers/net/arm/etherh.c | 2 +- drivers/net/bonding/bond_sysfs.c | 287 +++++++++++++++++----------- drivers/net/iseries_veth.c | 2 +- drivers/net/macb.c | 36 ++-- drivers/net/smc911x.c | 2 +- drivers/net/smc91x.c | 2 +- drivers/net/wireless/hostap/hostap_main.c | 2 +- drivers/net/wireless/orinoco.c | 4 +- drivers/net/wireless/orinoco_cs.c | 2 +- drivers/net/wireless/spectrum_cs.c | 2 +-Quoted 8 lines
include/linux/netdevice.h | 5 +- net/bridge/br_if.c | 2 +- net/bridge/br_sysfs_br.c | 234 +++++++++++++----------- net/bridge/br_sysfs_if.c | 2 +- net/core/dev.c | 6 +- net/core/net-sysfs.c | 175 ++++++++++-------- net/core/skbuff.c | 2 +- 20 files changed, 451 insertions(+), 362 deletions(-)
Quoted 2 lines
It's highly disappointing that this was never discussed on [email protected], or even CC'd to me.
It was CCed to David Miller and you and netdev a long time ago (like 8-9 months ago.) It's been in the -mm tree since then and discussed on lkml a few times too.
As I got David's ack for it, and he said to push it through my tree, I didn't think any more of it.
My apologies, I should have consulted you again before doing it.
thanks,
greg k-h
Quoted 14 lines · Stephen Hemminger
Quoted 11 lines · On Thu, 08 Feb 2007 07:43:18 -0500 Jeff Garzik <[email protected]> wrote:
Quoted 10 lines · Linux Kernel Mailing List
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=43cb76d91ee85f579a69d42bc8efc08bac560278 Commit: 43cb76d91ee85f579a69d42bc8efc08bac560278 Parent: 2943ecf2ed32632473c06f1975db47a7aa98c10f Author: Greg Kroah-Hartman <[email protected]> AuthorDate: Tue Apr 9 12:14:34 2002 -0700 Committer: Greg Kroah-Hartman <[email protected]> CommitDate: Wed Feb 7 10:37:11 2007 -0800Network: convert network devices to use struct device instead of
class_device
Quoted 7 lines
Quoted 2 lines
Quoted 2 lines
This lets the network core have the ability to handle suspend/resume issues, if it wants to.
It fixes a non-problem. I would like to see the network core suspend/resume proposal as well. Last time I examined doing network core suspend help, the problem was that the physical device suspend was called before the class device. It is not clear how this change would help.
Now the real device of the network device (ethX and such) will be called first. If not, something's wrong...
thanks,
greg k-h
Quoted 26 lines · Dmitry Torokhov
Quoted 16 lines · Stephen Hemminger
Quoted 2 lines · On Thu, 08 Feb 2007 07:43:18 -0500 Jeff Garzik <[email protected]> wrote:
Quoted 1 line · Linux Kernel Mailing List
Gitweb:
Quoted 8 lines
Quoted 8 lines
Commit: 43cb76d91ee85f579a69d42bc8efc08bac560278 Parent: 2943ecf2ed32632473c06f1975db47a7aa98c10f Author: Greg Kroah-Hartman <[email protected]> AuthorDate: Tue Apr 9 12:14:34 2002 -0700 Committer: Greg Kroah-Hartman <[email protected]> CommitDate: Wed Feb 7 10:37:11 2007 -0800Network: convert network devices to use struct device instead of
class_deviceQuoted 1 line
Quoted 1 line
Quoted 8 lines
Quoted 1 line
Quoted 1 line
This lets the network core have the ability to handle
suspend/resume
Quoted 1 line
Quoted 1 line
issues, if it wants to.
It fixes a non-problem. I would like to see the network core suspend/resume proposal as well. Last time I examined doing network core suspend help, the problem was that the physical device suspend was called before the class device. It is not clear how this change would help.
Quoted 6 lines
If physical devices are registered before class devices then when suspending class devices are naturally suspended first. It is still not clear to me why we need to convert everythign to struct device, I believe I've shown (with patches) that it is possible to integrate struct
class_deviceinto PM framework and avoid reshuffling half of the kernel code.
I don't want to have two separate device trees in the kernel (well, one big device tree and a bunch of little class_device trees.) The code duplication in the class_device code is just too much, and I get questions all the time as to what the differences are.
With these slow and gradual changes, we are getting a true, unified, device tree, and it will reduce the amount of code and complexity we need to maintain and fix in the driver core itself.
And it should also alow for proper power management functionality, using the changes that Linus put into the driver core about 8 months ago.
Don't worry, I have input patches queued up next for you Dmitry :)
thanks,
greg k-h
Quoted 34 lines · Greg KH
Quoted 26 lines · Dmitry Torokhov
Quoted 16 lines · Stephen Hemminger
Quoted 2 lines · On Thu, 08 Feb 2007 07:43:18 -0500 Jeff Garzik <[email protected]> wrote:
Quoted 1 line · Linux Kernel Mailing List
Gitweb:
Quoted 8 lines
Quoted 8 lines
Commit: 43cb76d91ee85f579a69d42bc8efc08bac560278 Parent: 2943ecf2ed32632473c06f1975db47a7aa98c10f Author: Greg Kroah-Hartman <[email protected]> AuthorDate: Tue Apr 9 12:14:34 2002 -0700 Committer: Greg Kroah-Hartman <[email protected]> CommitDate: Wed Feb 7 10:37:11 2007 -0800Network: convert network devices to use struct device instead of
class_deviceQuoted 1 line
Quoted 1 line
Quoted 8 lines
Quoted 1 line
Quoted 1 line
This lets the network core have the ability to handle
suspend/resume
Quoted 1 line
Quoted 1 line
issues, if it wants to.
It fixes a non-problem. I would like to see the network core suspend/resume proposal as well. Last time I examined doing network core suspend help, the problem was that the physical device suspend was called before the class device. It is not clear how this change would help.
Quoted 6 lines
If physical devices are registered before class devices then when suspending class devices are naturally suspended first. It is still not clear to me why we need to convert everythign to struct device, I believe I've shown (with patches) that it is possible to integrate struct
class_deviceinto PM framework and avoid reshuffling half of the kernel code.
Quoted 5 lines
I don't want to have two separate device trees in the kernel (well, one big device tree and a bunch of little
class_devicetrees.) The code duplication in theclass_devicecode is just too much, and I get questions all the time as to what the differences are.
While duplication of code is a real concern my worry is constant fattening of struct device. For example most physical devices do not interface directly with userspace but every single one of them now has dev_t. Former class_devices do not need suspend/resume early framework either. And so on, and so forth.
Quoted 9 lines
With these slow and gradual changes, we are getting a true, unified, device tree, and it will reduce the amount of code and complexity we need to maintain and fix in the driver core itself.
And it should also alow for proper power management functionality, using the changes that Linus put into the driver core about 8 months ago.
Don't worry, I have input patches queued up next for you Dmitry :)
;)
Signature · 1 line
Dmitry
Quoted 30 lines · Dmitry Torokhov
Quoted 23 lines · Greg KH
Quoted 15 lines · Dmitry Torokhov
Quoted 5 lines · Stephen Hemminger
On Thu, 08 Feb 2007 07:43:18 -0500
Quoted 1 line
Quoted 1 line
Network: convert network devices to use struct device instead of
class_deviceQuoted 1 line
Quoted 1 line
Quoted 8 lines
Quoted 1 line
Quoted 1 line
This lets the network core have the ability to handle
suspend/resume
Quoted 1 line
Quoted 1 line
issues, if it wants to.
It fixes a non-problem. I would like to see the network core suspend/resume proposal as well. Last time I examined doing network core suspend help, the problem was that the physical device suspend was called before the class device. It is not clear how this change would help.
Quoted 6 lines
If physical devices are registered before class devices then when suspending class devices are naturally suspended first. It is still not clear to me why we need to convert everythign to struct device, I believe I've shown (with patches) that it is possible to integrate struct
class_deviceinto PM framework and avoid reshuffling half of the kernel code.Quoted 5 lines
I don't want to have two separate device trees in the kernel (well, one big device tree and a bunch of little
class_devicetrees.) The code duplication in theclass_devicecode is just too much, and I get questions all the time as to what the differences are.
Quoted 5 lines
While duplication of code is a real concern my worry is constant fattening of struct device. For example most physical devices do not interface directly with userspace but every single one of them now has
dev_t. Formerclass_devicesdo not need suspend/resume early framework either. And so on, and so forth.
The dev_t is a good example for the mess we try to fix here. Not having a dev_t for "devices" lead to the creation of a lot of otherwise completely useless "class devices" which are just a total pain to interpret, and follow the events they create, from userspace.
Things like the scsi_device devices, usb_device devices, ... just exist, because only this type of devices was allowed to pass information for device nodes to userspace.
Thanks,
Kay
Quoted 37 lines · Kay Sievers
Quoted 30 lines · Dmitry Torokhov
Quoted 23 lines · Greg KH
Quoted 15 lines · Dmitry Torokhov
Quoted 5 lines · Stephen Hemminger
On Thu, 08 Feb 2007 07:43:18 -0500
Quoted 1 line
Quoted 1 line
Network: convert network devices to use struct device instead of
class_deviceQuoted 1 line
Quoted 1 line
Quoted 8 lines
Quoted 1 line
Quoted 1 line
This lets the network core have the ability to handle
suspend/resume
Quoted 1 line
Quoted 1 line
issues, if it wants to.
It fixes a non-problem. I would like to see the network core suspend/resume proposal as well. Last time I examined doing network core suspend help, the problem was that the physical device suspend was called before the class device. It is not clear how this change would help.
Quoted 6 lines
If physical devices are registered before class devices then when suspending class devices are naturally suspended first. It is still not clear to me why we need to convert everythign to struct device, I believe I've shown (with patches) that it is possible to integrate struct
class_deviceinto PM framework and avoid reshuffling half of the kernel code.Quoted 5 lines
I don't want to have two separate device trees in the kernel (well, one big device tree and a bunch of little
class_devicetrees.) The code duplication in theclass_devicecode is just too much, and I get questions all the time as to what the differences are.Quoted 5 lines
While duplication of code is a real concern my worry is constant fattening of struct device. For example most physical devices do not interface directly with userspace but every single one of them now has
dev_t. Formerclass_devicesdo not need suspend/resume early framework either. And so on, and so forth.
Quoted 9 lines
The
dev_tis a good example for the mess we try to fix here. Not having adev_tfor "devices" lead to the creation of a lot of otherwise completely useless "class devices" which are just a total pain to interpret, and follow the events they create, from userspace.Things like the
scsi_devicedevices,usb_devicedevices, ... just exist, because only this type of devices was allowed to pass information for device nodes to userspace.
I admit I do not know scsi stack but I would expect that the only things that need dev_t there would be sd, sr and sg interfaces. As such they are separate entities and "deserve" their own structures no mater what.
I can bet that number of real devices that need dev_t is smaller than number of virtual devices that do not need full power management:
PCI cards, ACPI tree, etc, etc - hardware devices interfacing with other parts of the kernel, not userspace directly.
NET, input, tty, etc - no need to suspend late/resume early
And, btw, having separate device and struct device does not prevent exporting them as a unified sysfs tree and is in fact pretty easy to do (I believe I posted patches to do that as well).
Signature · 1 line
Dmitry
Quoted 41 lines · Dmitry Torokhov
Quoted 34 lines · Greg KH
Quoted 26 lines · Dmitry Torokhov
Quoted 16 lines · Stephen Hemminger
Quoted 2 lines · On Thu, 08 Feb 2007 07:43:18 -0500 Jeff Garzik <[email protected]> wrote:
Quoted 1 line · Linux Kernel Mailing List
Gitweb:
Quoted 8 lines
Quoted 8 lines
Commit: 43cb76d91ee85f579a69d42bc8efc08bac560278 Parent: 2943ecf2ed32632473c06f1975db47a7aa98c10f Author: Greg Kroah-Hartman <[email protected]> AuthorDate: Tue Apr 9 12:14:34 2002 -0700 Committer: Greg Kroah-Hartman <[email protected]> CommitDate: Wed Feb 7 10:37:11 2007 -0800Network: convert network devices to use struct device instead of
class_deviceQuoted 1 line
Quoted 1 line
Quoted 8 lines
Quoted 1 line
Quoted 1 line
This lets the network core have the ability to handle
suspend/resume
Quoted 1 line
Quoted 1 line
issues, if it wants to.
It fixes a non-problem. I would like to see the network core suspend/resume proposal as well. Last time I examined doing network core suspend help, the problem was that the physical device suspend was called before the class device. It is not clear how this change would help.
Quoted 6 lines
If physical devices are registered before class devices then when suspending class devices are naturally suspended first. It is still not clear to me why we need to convert everythign to struct device, I believe I've shown (with patches) that it is possible to integrate struct
class_deviceinto PM framework and avoid reshuffling half of the kernel code.Quoted 5 lines
I don't want to have two separate device trees in the kernel (well, one big device tree and a bunch of little
class_devicetrees.) The code duplication in theclass_devicecode is just too much, and I get questions all the time as to what the differences are.
Quoted 5 lines
While duplication of code is a real concern my worry is constant fattening of struct device. For example most physical devices do not interface directly with userspace but every single one of them now has
dev_t. Formerclass_devicesdo not need suspend/resume early framework either. And so on, and so forth.
The memory requirements of 'struct device' is trivial in the overall system requirements.
Now this doesn't mean we need to go crazy with adding everything and the kitchen sink to the structure, but adding a dev_t is not going to make any difference to anyone.
thanks,
greg k-h
Quoted 6 lines · Greg KH
And it should also alow for proper power management functionality, using the changes that Linus put into the driver core about 8 months ago.
Don't worry, I have input patches queued up next for you Dmitry :)
Greg,
Could you please forward me these patches for input core - I am going to rearrange some code and don't want too many clashes so I'd like to apply yours to my private three and work from there...
Thanks!
Signature · 1 line
Dmitry