From a671ca852c4931f8a9fd2b476ff706b03f29f3ca Mon Sep 17 00:00:00 2001 From: Wim Van Sebroeck Date: Fri, 8 Feb 2008 04:20:58 -0800 Subject: [PATCH] --- yaml --- r: 84759 b: refs/heads/master c: b4bd7d59451960d4e1d994c01581b31b08fe3720 h: refs/heads/master i: 84757: dcc99230f8543ce92ce748eaf1c47c75acb8fbfa 84755: a563d552c770c91916cebbf9d177f640ef621952 84751: b1ccacce19b7565bd5dc697dafb362abe24a061f v: v3 --- [refs] | 2 +- trunk/drivers/firmware/dmi_scan.c | 25 +++++++++++++++++++++++++ trunk/include/linux/dmi.h | 5 ++++- 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 0f3c212841b7..ea772ba8a786 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 13050d89019a4127178c0945733fb23649f9f3fe +refs/heads/master: b4bd7d59451960d4e1d994c01581b31b08fe3720 diff --git a/trunk/drivers/firmware/dmi_scan.c b/trunk/drivers/firmware/dmi_scan.c index 1412d7bcdbd1..653265a40b7f 100644 --- a/trunk/drivers/firmware/dmi_scan.c +++ b/trunk/drivers/firmware/dmi_scan.c @@ -250,6 +250,28 @@ static void __init dmi_save_ipmi_device(const struct dmi_header *dm) list_add(&dev->list, &dmi_devices); } +static void __init dmi_save_extended_devices(const struct dmi_header *dm) +{ + const u8 *d = (u8*) dm + 5; + struct dmi_device *dev; + + /* Skip disabled device */ + if ((*d & 0x80) == 0) + return; + + dev = dmi_alloc(sizeof(*dev)); + if (!dev) { + printk(KERN_ERR "dmi_save_extended_devices: out of memory.\n"); + return; + } + + dev->type = *d-- & 0x7f; + dev->name = dmi_string(dm, *d); + dev->device_data = NULL; + + list_add(&dev->list, &dmi_devices); +} + /* * Process a DMI table entry. Right now all we care about are the BIOS * and machine entries. For 2.5 we should pull the smbus controller info @@ -292,6 +314,9 @@ static void __init dmi_decode(const struct dmi_header *dm) break; case 38: /* IPMI Device Information */ dmi_save_ipmi_device(dm); + break; + case 41: /* Onboard Devices Extended Information */ + dmi_save_extended_devices(dm); } } diff --git a/trunk/include/linux/dmi.h b/trunk/include/linux/dmi.h index bbc9992ec374..325acdf5c462 100644 --- a/trunk/include/linux/dmi.h +++ b/trunk/include/linux/dmi.h @@ -35,8 +35,11 @@ enum dmi_device_type { DMI_DEV_TYPE_ETHERNET, DMI_DEV_TYPE_TOKENRING, DMI_DEV_TYPE_SOUND, + DMI_DEV_TYPE_PATA, + DMI_DEV_TYPE_SATA, + DMI_DEV_TYPE_SAS, DMI_DEV_TYPE_IPMI = -1, - DMI_DEV_TYPE_OEM_STRING = -2 + DMI_DEV_TYPE_OEM_STRING = -2, }; struct dmi_header {