[lkml]   [2004]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: module.viomap support for ppc64
     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.


    cd /sys/bus/pci/devices || exit 1
    for i in *
    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

    USB is for mice, FireWire is for men!

    sUse lINUX ag, nÜRNBERG
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 14:05    [W:0.021 / U:8.044 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site