mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Adam Belay <abelay@novell.com>
Cc: Russell King <rmk+lkml@arm.linux.org.uk>,
	rml@novell.com, linux-kernel@vger.kernel.org
Subject: Re: [RFC][PATCH] add driver matching priorities
Date: Mon, 28 Feb 2005 23:58:32 -0800	[thread overview]
Message-ID: <20050301075832.GB3890@kroah.com> (raw)
In-Reply-To: <1109635555.28403.117.camel@localhost.localdomain>

On Mon, Feb 28, 2005 at 07:05:54PM -0500, Adam Belay wrote:
> On Fri, 2005-02-25 at 15:41 -0800, Greg KH wrote:
> > On Thu, Feb 10, 2005 at 04:37:03PM -0500, Adam Belay wrote:
> > > On Thu, 2005-02-10 at 18:45 +0000, Russell King wrote:
> > > > On Thu, Feb 10, 2005 at 12:18:37PM -0500, Adam Belay wrote:
> > > > > > I think the issue that Al raises about drivers grabbing devices, and
> > > > > > then trying to unbind them might be a real problem.
> > > > > 
> > > > > I agree.  Do you think registering every in-kernel driver before probing
> > > > > hardware would solve this problem?
> > > > 
> > > > In which case, consider whether we should be tainting the kernel if
> > > > someone loads a device driver, it binds to a device, and then they
> > > > unload that driver.
> > > > 
> > > > It's precisely the same situation, and precisely the same mechanics
> > > > as what I've suggested should be going on here.  If one scenario is
> > > > inherently buggy, so is the other.
> > > > 
> > > 
> > > I think it would depend on whether the user makes the device busy before
> > > the driver is unloaded.  Different device classes may have different
> > > requirements for when and how a device can be removed.  Are there other
> > > issues as well?  Maybe there are ways to improve driver start and stop
> > > mechanics.
> > 
> > We never fail a device unbind from a driver, so this isn't as big a deal
> > as I originally thought.  Yes, userspace can get messy, but as userspace
> > was the one that loaded the new driver to bind, it's acceptable.
> > 
> > So, care to resubmit your patch?
> > 
> 
> Would you like me to include the portion that adds "*match" to "struct
> device_driver"?  After some more thought, I began considering having
> driver priority be a static quality of a device driver.  The question is
> whether we want a device driver to be able to return a variable priority
> based on bind device.  Also, "*match" could be used to split some
> detection and validation out of "*probe".  What are your reactions to
> this?

Busses really need to be the ones doing this kind of priority logic,
right?  So shouldn't that code be in the individul bus specific driver
structures, not in "struct driver" itself?

> Finally, should every in-kernel driver be registered before devices are
> detected?

That's up to the bus.  Let's leave it as-is for now, and see what falls
apart :)

thanks,

greg k-h

      reply	other threads:[~2005-03-01  8:20 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-28 22:30 Adam Belay
2005-01-28 23:23 ` Dmitry Torokhov
2005-01-28 23:33   ` Adam Belay
2005-01-28 23:51     ` Dmitry Torokhov
2005-01-29  0:05       ` Adam Belay
2005-01-29  0:11   ` Al Viro
2005-01-29  2:45     ` Dmitry Torokhov
2005-02-10  8:41 ` Greg KH
2005-02-10 17:18   ` Adam Belay
2005-02-10 18:08     ` Dmitry Torokhov
2005-02-10 18:12     ` Greg KH
2005-02-10 21:26       ` Adam Belay
2005-02-10 18:33     ` Greg KH
2005-02-10 18:46       ` Dmitry Torokhov
2005-02-10 21:32         ` Adam Belay
2005-02-10 18:45     ` Russell King
2005-02-10 21:37       ` Adam Belay
2005-02-25 23:41         ` Greg KH
2005-03-01  0:05           ` Adam Belay
2005-03-01  7:58             ` Greg KH [this message]

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=20050301075832.GB3890@kroah.com \
    --to=greg@kroah.com \
    --cc=abelay@novell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk+lkml@arm.linux.org.uk \
    --cc=rml@novell.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

Powered by JetHome