Commit b4bd7d59451960d4e1d994c01581b31b08fe3720

Authored by Wim Van Sebroeck
Committed by Linus Torvalds
1 parent 13050d8901

SMBIOS/DMI: add type 41 = Onboard Devices Extended Information

From version 2.6 of the SMBIOS standard, type 10 (On Board Devices
Information) becomes obsolete.  The reason for this is that no further
fields can be added to this structure without adversely affecting existing
software's ability to properly parse the data.

Therefore type 41 (Onboard Devices Extended Information) was added.
The structure is as follows:

struct smbios_type_41 {
	u8 type;
	u8 length;
	u16 handle;
	u8 reference_designation_string;
	u8 device_type;		/* same device type as in type 10 */
	u8 device_type_instance;
	u16 segment_group_number;
	u8 bus_number;
	u8 device_function_number;
};

For more info: http://www.dmtf.org/standards/smbios

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Len Brown <lenb@kernel.org>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Tejun Heo <htejun@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 2 changed files with 29 additions and 1 deletions Side-by-side Diff

drivers/firmware/dmi_scan.c
... ... @@ -250,6 +250,28 @@
250 250 list_add(&dev->list, &dmi_devices);
251 251 }
252 252  
  253 +static void __init dmi_save_extended_devices(const struct dmi_header *dm)
  254 +{
  255 + const u8 *d = (u8*) dm + 5;
  256 + struct dmi_device *dev;
  257 +
  258 + /* Skip disabled device */
  259 + if ((*d & 0x80) == 0)
  260 + return;
  261 +
  262 + dev = dmi_alloc(sizeof(*dev));
  263 + if (!dev) {
  264 + printk(KERN_ERR "dmi_save_extended_devices: out of memory.\n");
  265 + return;
  266 + }
  267 +
  268 + dev->type = *d-- & 0x7f;
  269 + dev->name = dmi_string(dm, *d);
  270 + dev->device_data = NULL;
  271 +
  272 + list_add(&dev->list, &dmi_devices);
  273 +}
  274 +
253 275 /*
254 276 * Process a DMI table entry. Right now all we care about are the BIOS
255 277 * and machine entries. For 2.5 we should pull the smbus controller info
... ... @@ -292,6 +314,9 @@
292 314 break;
293 315 case 38: /* IPMI Device Information */
294 316 dmi_save_ipmi_device(dm);
  317 + break;
  318 + case 41: /* Onboard Devices Extended Information */
  319 + dmi_save_extended_devices(dm);
295 320 }
296 321 }
297 322  
... ... @@ -35,8 +35,11 @@
35 35 DMI_DEV_TYPE_ETHERNET,
36 36 DMI_DEV_TYPE_TOKENRING,
37 37 DMI_DEV_TYPE_SOUND,
  38 + DMI_DEV_TYPE_PATA,
  39 + DMI_DEV_TYPE_SATA,
  40 + DMI_DEV_TYPE_SAS,
38 41 DMI_DEV_TYPE_IPMI = -1,
39   - DMI_DEV_TYPE_OEM_STRING = -2
  42 + DMI_DEV_TYPE_OEM_STRING = -2,
40 43 };
41 44  
42 45 struct dmi_header {