lkml.org 
[lkml]   [2006]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [patch 2.6.19-rc6] fix hotplug for legacy platform drivers
Date
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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-12-09 07:57    [W:0.049 / U:2.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site