public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Olaf Hering <olh@suse.de>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Hollis Blanchard <hollisb@us.ibm.com>,
	Dave Boutcher <boutcher@us.ibm.com>,
	linuxppc64-dev@lists.linuxppc.org,
	lkml - Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: module.viomap support for ppc64
Date: Thu, 19 Aug 2004 23:28:24 +0200	[thread overview]
Message-ID: <20040819212824.GA13204@suse.de> (raw)
In-Reply-To: <1092404570.29604.5.camel@bach>

 On Fri, Aug 13, Rusty Russell wrote:

> On Fri, 2004-08-13 at 19:40, Olaf Hering wrote:
> >  On Fri, Aug 13, Rusty Russell wrote:
> > 
> > > 2) Please modify scripts/mod/file2alias.c in the kernel source, not the
> > > module tools.  The modules.XXXmap files are deprecated: device tables
> > > are supposed to be converted to aliases in the build process, and that
> > > is how userspace tools like hotplug are to find them.
> > 
> > I found no user of the modules.alias file. Hotplug still uses the map
> > files. Parsing one big file will not improve performance, but thats a
> > different story.
> 
> You don't use the modules.alias file.  You simply "modprobe vio:xyz^abc"
> and modprobe reads modules.alias if necessary (the user can also insert
> aliases in the modprobe.conf file, for example).  Note that fnmatch is
> used, so you can actually use ? and * in your generated aliases.

But that complicates the parser. Current the hotplug agent script reads
the simple modules.foomap and generates a list of possible drivers. Then
it looks into the blacklist file to see if one of the possible modules
should not be loaded, and skips this module.
Is there such functionality for the modules.alias file in
module-init-tools? I played around with modprobe -n, but could not
figure it out. Unfortunately, some hardware has more than one driver.
bcm5700/tg3, eepro100/e100 and maybe more.


#!/bin/bash

cd /sys/bus/pci/devices || exit 1
for i in *
do
test -d $i || continue
read pci_class            < $i/class
read pci_vendor           < $i/vendor
read pci_device           < $i/device
read pci_subsystem_vendor < $i/subsystem_vendor
read pci_subsystem_device < $i/subsystem_device
pci_baseclass=$((($pci_class >> 16) & 0xff))
pci_subclass=$((($pci_class >> 8) & 0xff))
pci_interface=$(($pci_class & 0xff))
pci_alias=`printf 'pci:v%08Xd%08Xsv%08Xsd%08Xbc%02Xsc%02Xi%02X' ${pci_vendor} ${pci_device} ${pci_subsystem_vendor} ${pci_subsystem_device} ${pci_baseclass} ${pci_subclass} ${pci_interface}`
echo $i # $pci_alias
/sbin/modprobe -nvva $pci_alias
done

-- 
USB is for mice, FireWire is for men!

sUse lINUX ag, nÜRNBERG

  parent reply	other threads:[~2004-08-19 21:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-12 17:37 module.viomap support for ppc64 Olaf Hering
2004-08-12 19:34 ` Hollis Blanchard
2004-08-12 23:43   ` Rusty Russell
2004-08-13  9:40     ` Olaf Hering
2004-08-13 13:42       ` Rusty Russell
2004-08-13 20:22         ` Marcelo Tosatti
2004-08-19 21:28         ` Olaf Hering [this message]
2004-08-20  3:47           ` Rusty Russell
2004-08-20  5:57             ` Olaf Hering
2004-08-20  7:25               ` Rusty Russell

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=20040819212824.GA13204@suse.de \
    --to=olh@suse.de \
    --cc=boutcher@us.ibm.com \
    --cc=hollisb@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc64-dev@lists.linuxppc.org \
    --cc=rusty@rustcorp.com.au \
    /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