All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kay Sievers <kay.sievers@vrfy.org>
To: Dmitry Torokhov <dtor@insightbb.com>
Cc: Greg KH <greg@kroah.com>,
	Stephen Hemminger <shemminger@linux-foundation.org>,
	Jeff Garzik <jeff@garzik.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	netdev <netdev@vger.kernel.org>
Subject: Re: Network: convert network devices to use struct device instead of class_device
Date: Fri, 09 Feb 2007 09:22:02 +0100	[thread overview]
Message-ID: <1171009322.10605.39.camel@pim.off.vrfy.org> (raw)
In-Reply-To: <200702082259.47685.dtor@insightbb.com>

On Thu, 2007-02-08 at 22:59 -0500, Dmitry Torokhov wrote:
> On Thursday 08 February 2007 19:56, Greg KH wrote:
> > On Thu, Feb 08, 2007 at 12:29:12PM -0500, Dmitry Torokhov wrote:
> > > On 2/8/07, Stephen Hemminger <shemminger@linux-foundation.org> wrote:
> > > >On Thu, 08 Feb 2007 07:43:18 -0500

> > > >> >     Network: convert network devices to use struct device instead of 
> > > >class_device
> > > >> >
> > > >> >     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.
> > 
> > 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.
> >
> 
> 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.

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


  reply	other threads:[~2007-02-09  8:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200702080400.l1840lFd002314@hera.kernel.org>
2007-02-08 12:43 ` Network: convert network devices to use struct device instead of class_device Jeff Garzik
2007-02-08 15:41   ` Stephen Hemminger
2007-02-08 17:29     ` Dmitry Torokhov
2007-02-09  0:56       ` Greg KH
2007-02-09  3:59         ` Dmitry Torokhov
2007-02-09  8:22           ` Kay Sievers [this message]
2007-02-09 15:28             ` Dmitry Torokhov
2007-02-09 16:48           ` Greg KH
2007-02-20 15:15         ` Dmitry Torokhov
2007-02-09  0:52     ` Greg KH
2007-02-09  0:51   ` 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=1171009322.10605.39.camel@pim.off.vrfy.org \
    --to=kay.sievers@vrfy.org \
    --cc=dtor@insightbb.com \
    --cc=greg@kroah.com \
    --cc=jeff@garzik.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.