linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrey Borzenkov <arvidjaar@mail.ru>
To: linux-hotplug@vger.kernel.org
Subject: Re: How to check if driver is in-built or module?
Date: Wed, 08 Mar 2006 09:38:44 +0000	[thread overview]
Message-ID: <200603081238.45791.arvidjaar@mail.ru> (raw)
In-Reply-To: <1141418150.4408a8a625721@cs1.alpha12.l-secure.net>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 07 March 2006 02:45, juuso.alasuutari@tamperelainen.org wrote:
> Quoting Marco d'Itri <md@Linux.IT>:
> > These modules are not being loaded automatically because they lack the
> > needed aliases. I added these to the debian package:
> >
> > alias pnp:dPNP0510 irtty-sir
> > alias pnp:dPNP0511 irtty-sir
> > alias pnp:dPNP0700 floppy
> > alias pnp:dPNP0800 pcspkr
> > alias pnp:dPNP0b00 rtc
> > alias pnp:dPNP0303 atkbd
> > alias pnp:dPNP0f13 psmouse
> > alias pnp:dPNPb02f analog
> >
> > And then I use this rule:
> >
> > SUBSYSTEM="pnp",       ENV{MODALIAS}!="?*",    RUN+="/bin/sh -c 'while
> > read id; do /sbin/modprobe pnp:d$$id; done < /sys$devpath/id'"
> >
> > It's still not perfect, drivers which have card PNP aliases do not
> > export them to sysfs.
>
> Where do those "alias ..." lines go exactly?
>

/etc/modprobe.conf I assume

> How did hotplug manage to load these modules without them having aliases,
> by the way? 

It could have some built-in list of modules. 

> And are there any tools for finding out what modules lack this 
> necessary info, except hands-on experimentation?
>

I doubt it. If you know that device has PNP id and know its driver, check for 
existence of MODULE_DEVICE_TABLE(pnp,...). If it is missing, driver does not 
export PNP IDs it supports and no module aliases are created.

> What would it take to make these kind of special arrangements unnecessary?
> On what level would the changes have to happen? In udev, or in the kernel
> perhaps? In whose court is the ball on this matter?
>

This is kernel issue. And adding ID table is not enough because PNP subsystem 
does not support modalias (at least here, 2.6.15.6, it is missing). So you 
still need the above hack even if module properly defines aliases.

- -andrey
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (GNU/Linux)

iD8DBQFEDqYlR6LMutpd94wRAmGtAJwOZ8pUaeKvOOYotAoearVIKHsRSwCfTO+I
lZ8gkVdgM5hN8H3NCpUXu60=Sa0X
-----END PGP SIGNATURE-----


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x110944&bid$1720&dat\x121642
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

  parent reply	other threads:[~2006-03-08  9:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-03 20:35 How to check if driver is in-built or module? juuso.alasuutari
2006-03-03 21:01 ` Marco d'Itri
2006-03-04  0:12 ` Scott James Remnant
2006-03-04  0:51 ` Greg KH
2006-03-04  2:49 ` juuso.alasuutari
2006-03-04  5:42 ` Greg KH
2006-03-04 12:07 ` juuso.alasuutari
2006-03-04 12:10 ` Marco d'Itri
2006-03-06 23:45 ` juuso.alasuutari
2006-03-08  9:38 ` Andrey Borzenkov [this message]
2006-03-31 20:52 ` juuso.alasuutari
2006-04-01  1:05 ` 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=200603081238.45791.arvidjaar@mail.ru \
    --to=arvidjaar@mail.ru \
    --cc=linux-hotplug@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).