This is a note to let you know that I've just added the patch titled ACPI / Battery: Add a _BIX quirk for NEC LZ750/LS to the 3.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: acpi-battery-add-a-_bix-quirk-for-nec-lz750-ls.patch and it can be found in the queue-3.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From a90b40385735af0d3031f98e97b439e8944a31b3 Mon Sep 17 00:00:00 2001 From: Lan Tianyu <tianyu.lan@xxxxxxxxx> Date: Mon, 6 Jan 2014 22:50:37 +0800 Subject: ACPI / Battery: Add a _BIX quirk for NEC LZ750/LS From: Lan Tianyu <tianyu.lan@xxxxxxxxx> commit a90b40385735af0d3031f98e97b439e8944a31b3 upstream. The AML method _BIX of NEC LZ750/LS returns a broken package which skips the first member "Revision" (ACPI 5.0, Table 10-234). Add a quirk for this machine to skip member "Revision" during parsing the package returned by _BIX. Reference: https://bugzilla.kernel.org/show_bug.cgi?id=67351 Reported-and-tested-by: Francisco Castro <fcr@xxxxxxxxxxxxx> Signed-off-by: Lan Tianyu <tianyu.lan@xxxxxxxxx> Reviewed-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/acpi/battery.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c @@ -68,6 +68,7 @@ MODULE_AUTHOR("Alexey Starikovskiy <asta MODULE_DESCRIPTION("ACPI Battery Driver"); MODULE_LICENSE("GPL"); +static int battery_bix_broken_package; static unsigned int cache_time = 1000; module_param(cache_time, uint, 0644); MODULE_PARM_DESC(cache_time, "cache time in milliseconds"); @@ -443,7 +444,12 @@ static int acpi_battery_get_info(struct ACPI_EXCEPTION((AE_INFO, status, "Evaluating %s", name)); return -ENODEV; } - if (test_bit(ACPI_BATTERY_XINFO_PRESENT, &battery->flags)) + + if (battery_bix_broken_package) + result = extract_package(battery, buffer.pointer, + extended_info_offsets + 1, + ARRAY_SIZE(extended_info_offsets) - 1); + else if (test_bit(ACPI_BATTERY_XINFO_PRESENT, &battery->flags)) result = extract_package(battery, buffer.pointer, extended_info_offsets, ARRAY_SIZE(extended_info_offsets)); @@ -1064,6 +1070,17 @@ static int battery_notify(struct notifie return 0; } +static struct dmi_system_id bat_dmi_table[] = { + { + .ident = "NEC LZ750/LS", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "NEC"), + DMI_MATCH(DMI_PRODUCT_NAME, "PC-LZ750LS"), + }, + }, + {}, +}; + static int acpi_battery_add(struct acpi_device *device) { int result = 0; @@ -1174,6 +1191,8 @@ static void __init acpi_battery_init_asy if (!acpi_battery_dir) return; #endif + if (dmi_check_system(bat_dmi_table)) + battery_bix_broken_package = 1; if (acpi_bus_register_driver(&acpi_battery_driver) < 0) { #ifdef CONFIG_ACPI_PROCFS_POWER acpi_unlock_battery_dir(acpi_battery_dir); Patches currently in stable-queue which might be from tianyu.lan@xxxxxxxxx are queue-3.10/acpi-battery-add-a-_bix-quirk-for-nec-lz750-ls.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html