Commit 436950a6 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging

Pull dmi fix from Jean Delvare.

* 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  firmware: dmi_scan: Fix UUID endianness for SMBIOS >= 2.6
parents 4054f64c ff4319dc
...@@ -521,6 +521,7 @@ static int __init dmi_present(const u8 *buf) ...@@ -521,6 +521,7 @@ static int __init dmi_present(const u8 *buf)
dmi_ver = smbios_ver; dmi_ver = smbios_ver;
else else
dmi_ver = (buf[14] & 0xF0) << 4 | (buf[14] & 0x0F); dmi_ver = (buf[14] & 0xF0) << 4 | (buf[14] & 0x0F);
dmi_ver <<= 8;
dmi_num = get_unaligned_le16(buf + 12); dmi_num = get_unaligned_le16(buf + 12);
dmi_len = get_unaligned_le16(buf + 6); dmi_len = get_unaligned_le16(buf + 6);
dmi_base = get_unaligned_le32(buf + 8); dmi_base = get_unaligned_le32(buf + 8);
...@@ -528,15 +529,14 @@ static int __init dmi_present(const u8 *buf) ...@@ -528,15 +529,14 @@ static int __init dmi_present(const u8 *buf)
if (dmi_walk_early(dmi_decode) == 0) { if (dmi_walk_early(dmi_decode) == 0) {
if (smbios_ver) { if (smbios_ver) {
pr_info("SMBIOS %d.%d present.\n", pr_info("SMBIOS %d.%d present.\n",
dmi_ver >> 8, dmi_ver & 0xFF); dmi_ver >> 16, (dmi_ver >> 8) & 0xFF);
} else { } else {
smbios_entry_point_size = 15; smbios_entry_point_size = 15;
memcpy(smbios_entry_point, buf, memcpy(smbios_entry_point, buf,
smbios_entry_point_size); smbios_entry_point_size);
pr_info("Legacy DMI %d.%d present.\n", pr_info("Legacy DMI %d.%d present.\n",
dmi_ver >> 8, dmi_ver & 0xFF); dmi_ver >> 16, (dmi_ver >> 8) & 0xFF);
} }
dmi_ver <<= 8;
dmi_format_ids(dmi_ids_string, sizeof(dmi_ids_string)); dmi_format_ids(dmi_ids_string, sizeof(dmi_ids_string));
printk(KERN_DEBUG "DMI: %s\n", dmi_ids_string); printk(KERN_DEBUG "DMI: %s\n", dmi_ids_string);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment