Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 84759
b: refs/heads/master
c: b4bd7d5
h: refs/heads/master
i:
  84757: dcc9923
  84755: a563d55
  84751: b1ccacc
v: v3
  • Loading branch information
Wim Van Sebroeck authored and Linus Torvalds committed Feb 8, 2008
1 parent 3006f8d commit a671ca8
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 13050d89019a4127178c0945733fb23649f9f3fe
refs/heads/master: b4bd7d59451960d4e1d994c01581b31b08fe3720
25 changes: 25 additions & 0 deletions trunk/drivers/firmware/dmi_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
}
}

Expand Down
5 changes: 4 additions & 1 deletion trunk/include/linux/dmi.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit a671ca8

Please sign in to comment.