public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: "Marco d'Itri" <md@Linux.IT>
Cc: Greg KH <gregkh@suse.de>, Kay Sievers <kay.sievers@vrfy.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [patch 2.6.19-rc6] fix hotplug for legacy platform drivers
Date: Fri, 8 Dec 2006 22:03:37 -0800	[thread overview]
Message-ID: <200612082203.38799.david-b@pacbell.net> (raw)
In-Reply-To: <20061206235621.GB25272@bongo.bofh.it>

On Wednesday 06 December 2006 3:56 pm, Marco d'Itri wrote:
> On Dec 06, David Brownell <david-b@pacbell.net> wrote:
> 
> > > Please explain in more details how hotplugging would be broken, possibly
> > > with examples.
> >
> > First, for reference, I refer to hotplugging using the trivial ASH scripts
> > from [1], updated by removing no-longer-needed special cases for platform_bus
> > (that original logic didn't work sometimes) and pcmcia.  See the (short)
>
> I.e. a quick hack which has never been used by any distribution.

Not a "quick hack" at all; boiling down hotplug + coldplug to something
that tight got a fair degree of thought back then.  It takes work to get
things to be small enough to use on very small Linux-based systems.

As for "never been used" ... you can't know that, given that embedded
distros are normally custom built.  I'm certain that I submitted it to
buildroot back then.  So a lot of folk building custom distros have had
access to that, and I'd be surprised if it was "never" used.


> And anyway some kernel component is supposed to provide the aliases
> pointing from the $MODALIAS values to the drivers, so modprobe $MODALIAS
> would still work.

A driver named "foo" is usually named "foo.ko"; aliases not needed, or
even desirable.  The kernel source tree has done that for years.


> > Second, note that you're asking me to construct a straw man for you and
> > then break it down, since nobody arguing with the $SUBJECT patch has ever
> > provided a complete counter-proposal (much less respond to the points
> > I've made about legacy driver bugginess -- which is suggestive).
>
> I am asking what is the point for a module to provide its own name in
> $MODALIAS.

As I pointed out previously, more than once:  it's providing a driver
identifier there, all it needs is to be understood by "modprobe".


> $MODALIAS is available only *after* the module has been loaded by
> something else.

You seem like you're being intentionally dense here ... that's rarely
true, which is what makes hotplug-driven driver loading work.

The $MODALIAS thing is passed to userspace after creation of driver
model device nodes.  (Contrary to what you said above.  It's related
to add_device calls, not module loading.)

Normal driver modules do not create those nodes ... and $MODALIAS is used
as a driver identifier so that /sbin/hotplug can "modprobe $MODALIAS" to
load the right driver module.

But *legacy* driver modules are not well behaved; they create those nodes
themselves, rather than letting bus infrastructure do so.  Which is why
they are not hotpluggable.  The $SUBJECT patch just turns off $MODALIAS
based hotplugging for those ill-mannered drivers.

- Dave


      reply	other threads:[~2006-12-09  6:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20061122135948.GA7888@bongo.bofh.it>
     [not found] ` <1164623293.3702.4.camel@pim.off.vrfy.org>
     [not found]   ` <20061127190315.GA28107@suse.de>
2006-11-29 22:50     ` [patch 2.6.19-rc6] fix hotplug for legacy platform drivers David Brownell
2006-11-29 23:02       ` Greg KH
2006-11-30  1:27         ` [Bulk] " David Brownell
2006-12-01  7:04           ` Greg KH
2006-12-05  2:28             ` David Brownell
2006-12-05 10:01               ` Marco d'Itri
2006-12-06  0:03                 ` David Brownell
2006-12-06  6:08                   ` Greg KH
2006-12-07  0:25                     ` [Bulk] " David Brownell
2006-12-06 23:56                   ` Marco d'Itri
2006-12-09  6:03                     ` David Brownell [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=200612082203.38799.david-b@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=gregkh@suse.de \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=md@Linux.IT \
    /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