public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: Sebastian Ott <sebott@linux.vnet.ibm.com>,
	Kay Sievers <kay.sievers@vrfy.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC] bind/unbind uevent
Date: Wed, 15 Dec 2010 08:23:16 -0800	[thread overview]
Message-ID: <20101215162316.GA31141@suse.de> (raw)
In-Reply-To: <20101215142113.7d416d78@gondolin>

On Wed, Dec 15, 2010 at 02:21:13PM +0100, Cornelia Huck wrote:
> On Tue, 14 Dec 2010 11:29:52 -0800,
> Greg KH <gregkh@suse.de> wrote:
> 
> > On Tue, Dec 14, 2010 at 07:26:40PM +0100, Sebastian Ott wrote:
> > > 
> > > On Mon, 13 Dec 2010, Greg KH wrote:
> > > > On Mon, Dec 13, 2010 at 08:27:45PM +0100, Sebastian Ott wrote:
> 
> > > > Don't do that, have your _driver_ register the attributes with the bus
> > > > it is on, then when the binding happens, the attributes will
> > > > automatically get created for the device before the notification is sent
> > > > to userspace.  That is the proper proceedure here.
> > > 
> > > are you suggesting that these driver specific device attributes should be
> > > created by the bus code which registers the device?
> > 
> > Yes.
> > 
> > > at this time it is not determinable which driver will bind to the device
> > > (and therefore which attributes to create), also driver specific data may 
> > > not be initialized.
> > 
> > {sigh}
> > 
> > Please go _look_ at how the driver model handles this type of thing.  It
> > does _exactly_ what you want, as we have been doing it for _years_
> > properly.
> > 
> 
> I don't understand how this could work. All of the attribute (groups)
> registered before the uevent are driver-ignorant. If the bus wants to
> specify the attributes, it needs to know the driver the device will
> bind to (regardless of whatever tables exist that show the driver <->
> attribute relationship). But it cannot know the driver until after the
> uevent. Or else it would need to create _all_ attributes for _all_
> devices (surely you didn't mean that)? And what happens with drivers
> that are loaded later on?
> 
> Could you please elaborate on how the attributes could be created in a
> compatible way with today's driver core?

Come on people, just look at the code!  It does exactly this today just
fine with no changes needed to the driver core.

How about I turn it around for you, please show me how the driver core
does _not_ support this today?  If you can prove that this isn't working
properly, then great, I'll gladly accept patches to resolve it.

thanks,

greg k-h

  reply	other threads:[~2010-12-15 16:43 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-07 16:18 [RFC] bind/unbind uevent Sebastian Ott
2010-12-07 16:27 ` Greg KH
2010-12-07 17:29   ` Sebastian Ott
2010-12-07 18:33     ` Greg KH
2010-12-07 19:00       ` Kay Sievers
2010-12-08 10:18         ` Sebastian Ott
2010-12-08 16:02           ` Greg KH
2010-12-13 19:27             ` Sebastian Ott
2010-12-13 19:36               ` Greg KH
2010-12-14 18:26                 ` Sebastian Ott
2010-12-14 19:29                   ` Greg KH
2010-12-15 13:21                     ` Cornelia Huck
2010-12-15 16:23                       ` Greg KH [this message]
2010-12-15 17:35                         ` Cornelia Huck
2010-12-15 17:51                           ` Kay Sievers
2010-12-15 18:08                             ` Cornelia Huck
2010-12-15 18:18                               ` Greg KH
2010-12-16 10:22                                 ` Cornelia Huck
2010-12-08 10:16       ` Sebastian Ott
2010-12-08 16:01         ` 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=20101215162316.GA31141@suse.de \
    --to=gregkh@suse.de \
    --cc=cornelia.huck@de.ibm.com \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sebott@linux.vnet.ibm.com \
    /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