12 Jul, 2007

1 commit

  • The patch below adds DMI/SMBIOS based module autoloading to the Linux
    kernel. The idea is to load laptop drivers automatically (and other
    drivers which cannot be autoloaded otherwise), based on the DMI system
    identification information of the BIOS.

    Right now most distros manually try to load all available laptop
    drivers on bootup in the hope that at least one of them loads
    successfully. This patch does away with all that, and uses udev to
    automatically load matching drivers on the right machines.

    Basically the patch just exports the DMI information that has been
    parsed by the kernel anyway to userspace via a sysfs device
    /sys/class/dmi/id and makes sure that proper modalias attributes are
    available. Besides adding the "modalias" attribute it also adds
    attributes for a few other DMI fields which might be useful for
    writing udev rules.

    This patch is not an attempt to export the entire DMI/SMBIOS data to
    userspace. We already have "dmidecode" which parses the complete DMI
    info from userspace. The purpose of this patch is machine model
    identification and good udev integration.

    To take advantage of DMI based module autoloading, a driver should
    export one or more MODULE_ALIAS fields similar to these:

    MODULE_ALIAS("dmi:*:svnMICRO-STARINT'LCO.,LTD:pnMS-1013:pvr0131*:cvnMICRO-STARINT'LCO.,LTD:ct10:*");
    MODULE_ALIAS("dmi:*:svnMicro-StarInternational:pnMS-1058:pvr0581:rvnMSI:rnMS-1058:*:ct10:*");
    MODULE_ALIAS("dmi:*:svnMicro-StarInternational:pnMS-1412:*:rvnMSI:rnMS-1412:*:cvnMICRO-STARINT'LCO.,LTD:ct10:*");
    MODULE_ALIAS("dmi:*:svnNOTEBOOK:pnSAM2000:pvr0131*:cvnMICRO-STARINT'LCO.,LTD:ct10:*");

    These lines are specific to my msi-laptop.c driver. They are basically
    just a concatenation of a few carefully selected DMI fields with all
    potentially bad characters stripped.

    Besides laptop drivers, modules like "hdaps", the i2c modules
    and the hwmon modules are good candidates for "dmi:" MODULE_ALIAS
    lines.

    Besides merely exporting the DMI data via sysfs the patch adds
    support for a few more DMI fields. Especially the CHASSIS fields are
    very useful to identify different laptop modules. The patch also adds
    working MODULE_ALIAS lines to my msi-laptop.c driver.

    I'd like to thank Kay Sievers for helping me to clean up this patch
    for posting it on lkml.

    Patch is against Linus' current GIT HEAD. Should probably apply to
    older kernels as well without modification.

    Signed-off-by: Lennart Poettering
    Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Lennart Poettering
     

15 Apr, 2006

1 commit

  • dmi_scan.c is arch-independent and is used by i386, x86_64, and ia64.
    Currently all three arches compile it from arch/i386, which means that ia64
    and x86_64 depend on things in arch/i386 that they wouldn't otherwise care
    about.

    This is simply "mv arch/i386/kernel/dmi_scan.c drivers/firmware/" (removing
    trailing whitespace) and the associated Makefile changes. All three
    architectures already set CONFIG_DMI in their top-level Kconfig files.

    Signed-off-by: Bjorn Helgaas
    Cc: Andi Kleen
    Cc: "Luck, Tony"
    Cc: Andrey Panin
    Signed-off-by: Andrew Morton
    Signed-off-by: Greg Kroah-Hartman

    Bjorn Helgaas
     

08 Sep, 2005

2 commits


17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds