From: "Alexander E. Patrakov" <patrakov@ums.usu.ru>
To: linux-hotplug@vger.kernel.org
Subject: Re: [patch] pnp rc
Date: Sat, 09 Oct 2004 08:51:35 +0000 [thread overview]
Message-ID: <4167A697.6000300@ums.usu.ru> (raw)
In-Reply-To: <416695D2.2050405@free.fr>
Alexander E. Patrakov wrote:
> 1) I have to coordinate my actions with Marco d'Itri (from Debian). I
> remember his words about the idea with aliases being modern, progressive
> and right. The question is whether it is possible and good to apply this
> idea to pci.rc also. I think it is, but I want to know his opinion.
(in fact what I try to do here is to test this approach on a
well-supported PCI bus and, in the case of success, drop pnp.rc in
favour of isapnp.rc maintained at Debian).
Found a problem with this approach. If this idea with aliases is applied
to the PCI case, let's see what happens to a user with an Intel
EtherExpress 100 network card and some sort of a blg bloated modular
"distribution" kernel.
There are two official drivers for this sort of card, e100 and eepro100.
In order to choose one, the user currently has to blacklist the other
by adding a line to /etc/hotplug/blacklist. Then the first
non-blacklisted driver gets loaded.
With the approach based on the aliases (and blacklisting based on
modprobe output, as currently done in Debian in isapnp.rc), it is
difficult to implement. First, Debian-like solution:
# Generate $ALIAS from the PCI ID
MODULE=$(modprobe --show-depends -q $ALIAS | sed -e
'$!d;s/.*\/\(.*\)\.ko .*/\1/')
[ "$MODULE" ] || continue
# and now check the module against the blacklist
This fails because modprobe will resolve only one of the candidate
modules. E.g., suppose that it would (unwantedly) pick e100. I blacklist
e100. $MODULE will still be e100, and as a result nothing will be loaded.
So we have either to ask Rusty Russel to add an option to modprobe to
print all possible resolutions of an alias (BTW which list should this
go to?), or implement that by grepping the output of "modprobe -c", like
this:
# obtain $VENDOR and $DEVICE
MODULES=$(modprobe -c | grep "alias pci:v0000${VENDOR}d0000${DEVICE}" |
grep -o '[^ ]*$')
# check against the blacklist
(yes, I know that I have to check subvendor and subdevice too).
Does this grepping sound like a good idea?
--
Alexander E. Patrakov
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
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
next prev parent reply other threads:[~2004-10-09 8:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-08 13:27 [patch] pnp rc matthieu castet
2004-10-08 22:10 ` Greg KH
2004-10-09 5:36 ` Alexander E. Patrakov
2004-10-09 8:51 ` Alexander E. Patrakov [this message]
2004-10-10 20:38 ` matthieu castet
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=4167A697.6000300@ums.usu.ru \
--to=patrakov@ums.usu.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).