From 9523b9bf6dceef6b0215e90b2348cd646597f796 Mon Sep 17 00:00:00 2001 From: Alex Hung Date: Fri, 28 Oct 2016 11:54:04 -0700 Subject: ACPI / blacklist: add _REV quirks for Dell Precision 5520 and 3520 Precision 5520 and 3520 either hang at login and during suspend or reboot. It turns out that that adding them to acpi_rev_dmi_table[] helps to work around those issues. Signed-off-by: Alex Hung [ rjw: Changelog ] Signed-off-by: Rafael J. Wysocki --- drivers/acpi/blacklist.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'drivers/acpi') diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c index bdc67bad61a7..4f87fd748303 100644 --- a/drivers/acpi/blacklist.c +++ b/drivers/acpi/blacklist.c @@ -160,6 +160,22 @@ static struct dmi_system_id acpi_rev_dmi_table[] __initdata = { DMI_MATCH(DMI_PRODUCT_NAME, "XPS 13 9343"), }, }, + { + .callback = dmi_enable_rev_override, + .ident = "DELL Precision 5520", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "Precision 5520"), + }, + }, + { + .callback = dmi_enable_rev_override, + .ident = "DELL Precision 3520", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "Precision 3520"), + }, + }, #endif {} }; -- cgit v1.2.3 From 708f5dcc21ae9b35f395865fc154b0105baf4de4 Mon Sep 17 00:00:00 2001 From: Michael Pobega Date: Fri, 11 Nov 2016 22:29:14 -0500 Subject: ACPI / blacklist: Make Dell Latitude 3350 ethernet work The Dell Latitude 3350's ethernet card attempts to use a reserved IRQ (18), resulting in ACPI being unable to enable the ethernet. Adding it to acpi_rev_dmi_table[] helps to work around this problem. Signed-off-by: Michael Pobega [ rjw: Changelog ] Signed-off-by: Rafael J. Wysocki --- drivers/acpi/blacklist.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'drivers/acpi') diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c index 4f87fd748303..4421f7c9981c 100644 --- a/drivers/acpi/blacklist.c +++ b/drivers/acpi/blacklist.c @@ -176,6 +176,18 @@ static struct dmi_system_id acpi_rev_dmi_table[] __initdata = { DMI_MATCH(DMI_PRODUCT_NAME, "Precision 3520"), }, }, + /* + * Resolves a quirk with the Dell Latitude 3350 that + * causes the ethernet adapter to not function. + */ + { + .callback = dmi_enable_rev_override, + .ident = "DELL Latitude 3350", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "Latitude 3350"), + }, + }, #endif {} }; -- cgit v1.2.3 From 5dcb9ca8403c31f4a9a6e21b0057be3bdefb7414 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Fri, 2 Dec 2016 19:42:46 +0200 Subject: ACPI / osl: Propagate actual error code for kstrtoul() There is no need to override the error code returned by kstrtoul(). Propagate it directly to the caller. Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki --- drivers/acpi/osl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/acpi') diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 416953a42510..d47df72990dd 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -181,9 +181,7 @@ void acpi_os_vprintf(const char *fmt, va_list args) static unsigned long acpi_rsdp; static int __init setup_acpi_rsdp(char *arg) { - if (kstrtoul(arg, 16, &acpi_rsdp)) - return -EINVAL; - return 0; + return kstrtoul(arg, 16, &acpi_rsdp); } early_param("acpi_rsdp", setup_acpi_rsdp); #endif -- cgit v1.2.3 From 2fb65f09c2c6eaba5fcf848aa615f4837d540576 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Fri, 2 Dec 2016 19:42:47 +0200 Subject: ACPI / osl: Refactor acpi_os_get_root_pointer() to drop 'else':s There are few 'else' keywords which are redundant in acpi_os_get_root_pointer(). Refactor function to get rid of them. While here, switch to pr_err() instead of printk(KERN_ERR ...). Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki --- drivers/acpi/osl.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'drivers/acpi') diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index d47df72990dd..9a4c6abee63e 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -188,6 +188,8 @@ early_param("acpi_rsdp", setup_acpi_rsdp); acpi_physical_address __init acpi_os_get_root_pointer(void) { + acpi_physical_address pa = 0; + #ifdef CONFIG_KEXEC if (acpi_rsdp) return acpi_rsdp; @@ -196,21 +198,14 @@ acpi_physical_address __init acpi_os_get_root_pointer(void) if (efi_enabled(EFI_CONFIG_TABLES)) { if (efi.acpi20 != EFI_INVALID_TABLE_ADDR) return efi.acpi20; - else if (efi.acpi != EFI_INVALID_TABLE_ADDR) + if (efi.acpi != EFI_INVALID_TABLE_ADDR) return efi.acpi; - else { - printk(KERN_ERR PREFIX - "System description tables not found\n"); - return 0; - } + pr_err(PREFIX "System description tables not found\n"); } else if (IS_ENABLED(CONFIG_ACPI_LEGACY_TABLES_LOOKUP)) { - acpi_physical_address pa = 0; - acpi_find_root_pointer(&pa); - return pa; } - return 0; + return pa; } /* Must be called with 'acpi_ioremap_lock' or RCU read lock held. */ -- cgit v1.2.3