From 8964ebb8c35533f4084cc667079a0ce620356104 Mon Sep 17 00:00:00 2001 From: Len Brown Date: Fri, 25 Jan 2008 15:39:50 -0500 Subject: ACPI: remove redundant Acer blacklist entry dmi_check_system() does sub-string matching using strstr(), rather than exact string compares with !strcmp(). So delete the longer of the Acer blacklist entries, as its function is just a redundant console message. Spotted-by: Carlos Corbacho Signed-off-by: Len Brown diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c index 8809654..9ace219 100644 --- a/drivers/acpi/blacklist.c +++ b/drivers/acpi/blacklist.c @@ -214,13 +214,11 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { * _OSI(Linux) effect unknown: * DMI_MATCH(DMI_PRODUCT_NAME, "Ferrari 5000"), */ - { - .callback = dmi_disable_osi_linux, - .ident = "Acer, inc.", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Acer, inc."), - }, - }, + /* + * note that dmi_check_system() uses strstr() + * to match sub-strings rather than !strcmp(), + * so "Acer" below matches "Acer, inc." above. + */ /* * Disable OSI(Linux) warnings on all "Acer" * -- cgit v0.10.2 From e6298c6d60838495978cdbe5555dc290785bb961 Mon Sep 17 00:00:00 2001 From: Len Brown Date: Fri, 25 Jan 2008 15:40:02 -0500 Subject: DMI: remove duplicate helper routine Use existing dmi_get_system_info(), Delete duplicate dmi_get_slot() Spotted-by: Wim Van Sebroeck Signed-off-by: Len Brown diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index e53fb51..347cda2 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -1220,17 +1220,17 @@ int acpi_dmi_dump(void) return -1; printk(KERN_NOTICE PREFIX "DMI System Vendor: %s\n", - dmi_get_slot(DMI_SYS_VENDOR)); + dmi_get_system_info(DMI_SYS_VENDOR)); printk(KERN_NOTICE PREFIX "DMI Product Name: %s\n", - dmi_get_slot(DMI_PRODUCT_NAME)); + dmi_get_system_info(DMI_PRODUCT_NAME)); printk(KERN_NOTICE PREFIX "DMI Product Version: %s\n", - dmi_get_slot(DMI_PRODUCT_VERSION)); + dmi_get_system_info(DMI_PRODUCT_VERSION)); printk(KERN_NOTICE PREFIX "DMI Board Name: %s\n", - dmi_get_slot(DMI_BOARD_NAME)); + dmi_get_system_info(DMI_BOARD_NAME)); printk(KERN_NOTICE PREFIX "DMI BIOS Vendor: %s\n", - dmi_get_slot(DMI_BIOS_VENDOR)); + dmi_get_system_info(DMI_BIOS_VENDOR)); printk(KERN_NOTICE PREFIX "DMI BIOS Date: %s\n", - dmi_get_slot(DMI_BIOS_DATE)); + dmi_get_system_info(DMI_BIOS_DATE)); return 0; } diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c index 9008ed5..e0bade7 100644 --- a/drivers/firmware/dmi_scan.c +++ b/drivers/firmware/dmi_scan.c @@ -489,12 +489,3 @@ int dmi_get_year(int field) return year; } - -/** - * dmi_get_slot - return dmi_ident[slot] - * @slot: index into dmi_ident[] - */ -char *dmi_get_slot(int slot) -{ - return(dmi_ident[slot]); -} diff --git a/include/linux/dmi.h b/include/linux/dmi.h index 5b42a65..b1251b2 100644 --- a/include/linux/dmi.h +++ b/include/linux/dmi.h @@ -79,7 +79,6 @@ extern void dmi_scan_machine(void); extern int dmi_get_year(int field); extern int dmi_name_in_vendors(const char *str); extern int dmi_available; -extern char *dmi_get_slot(int slot); #else @@ -90,7 +89,6 @@ static inline const struct dmi_device * dmi_find_device(int type, const char *na static inline int dmi_get_year(int year) { return 0; } static inline int dmi_name_in_vendors(const char *s) { return 0; } #define dmi_available 0 -static inline char *dmi_get_slot(int slot) { return NULL; } #endif -- cgit v0.10.2 From d0280a02f7412f3fdd45fbd2f51f59d7d8a03fe8 Mon Sep 17 00:00:00 2001 From: Len Brown Date: Sun, 3 Feb 2008 17:32:31 -0500 Subject: ACPI: update blacklist comments ...based on additional feedback -- no code change. Signed-off-by: Len Brown diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c index 9ace219..bd12c8e 100644 --- a/drivers/acpi/blacklist.c +++ b/drivers/acpi/blacklist.c @@ -208,7 +208,9 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { * Disable OSI(Linux) warnings on all "Acer, inc." * * _OSI(Linux) disables the latest Windows BIOS code: + * DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 3100"), * DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5050"), + * DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5100"), * DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5580"), * DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 3010"), * _OSI(Linux) effect unknown: @@ -223,7 +225,7 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { * Disable OSI(Linux) warnings on all "Acer" * * _OSI(Linux) effect unknown: - * DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5100"), + * DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5315"), * DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5610"), * DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 7720Z"), * DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 5520"), @@ -298,7 +300,7 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { DMI_MATCH(DMI_BIOS_VENDOR, "COMPAL"), }, }, - { /* OSI(Linux) touches USB, breaks suspend to disk */ + { /* OSI(Linux) touches USB, unknown side-effect */ .callback = dmi_disable_osi_linux, .ident = "Dell Dimension 5150", .matches = { @@ -472,6 +474,11 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { * * _OSI(Linux) confirmed to be a NOP: * DMI_MATCH(DMI_PRODUCT_NAME, "P1-J150B"), + * with DMI_MATCH(DMI_BOARD_NAME, "ROCKY"), + * + * unknown: + * DMI_MATCH(DMI_PRODUCT_NAME, "S1-MDGDG"), + * with DMI_MATCH(DMI_BOARD_NAME, "ROCKY"), */ { .callback = dmi_disable_osi_linux, -- cgit v0.10.2 From 12d3931c1007a7ad47364a4884e5a6c6e25aa5e1 Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Tue, 29 Jan 2008 00:10:12 +0200 Subject: ACPI: make acpi_dmi_dump() static Signed-off-by: Adrian Bunk Signed-off-by: Len Brown diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 347cda2..71b0c32 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -1213,7 +1213,7 @@ acpi_status acpi_os_release_object(acpi_cache_t * cache, void *object) * * Returns 0 on success */ -int acpi_dmi_dump(void) +static int acpi_dmi_dump(void) { if (!dmi_available) -- cgit v0.10.2 From 1d15d84e8b443971cafd885d18f091814ba32cb7 Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Tue, 29 Jan 2008 00:10:15 +0200 Subject: ACPI: make struct osi_linux static Signed-off-by: Adrian Bunk Signed-off-by: Len Brown diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 71b0c32..fde7ac8 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -120,7 +120,7 @@ static char osi_additional_string[OSI_STRING_LENGTH_MAX]; */ #define OSI_LINUX_ENABLE 0 -struct osi_linux { +static struct osi_linux { unsigned int enable:1; unsigned int dmi:1; unsigned int cmdline:1; -- cgit v0.10.2 From a64217b922e5a06f328e3962ff903ce829aff3d6 Mon Sep 17 00:00:00 2001 From: Len Brown Date: Mon, 4 Feb 2008 00:57:33 -0500 Subject: ACPI: blacklist update move some OSI(Linux) to "disable" from "unknown" to reduce dmesg lines that we don't really need. update Acer 5315 comment update Dell entries, add R200 entry update Apple entries Signed-off-by: Len Brown diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c index bd12c8e..6dbaa2d 100644 --- a/drivers/acpi/blacklist.c +++ b/drivers/acpi/blacklist.c @@ -70,8 +70,6 @@ static struct acpi_blacklist_item acpi_blacklist[] __initdata = { /* IBM 600E - _ADR should return 7, but it returns 1 */ {"IBM ", "TP600E ", 0x00000105, ACPI_SIG_DSDT, less_than_or_equal, "Incorrect _ADR", 1}, - {"ASUS\0\0", "P2B-S ", 0, ACPI_SIG_DSDT, all_versions, - "Bogus PCI routing", 1}, {""} }; @@ -225,16 +223,18 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { * Disable OSI(Linux) warnings on all "Acer" * * _OSI(Linux) effect unknown: - * DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5315"), * DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5610"), * DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 7720Z"), * DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 5520"), * DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 6460"), * DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 7510"), * DMI_MATCH(DMI_PRODUCT_NAME, "Extensa 5220"), + * + * _OSI(Linux) is a NOP: + * DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5315"), */ { - .callback = dmi_unknown_osi_linux, + .callback = dmi_disable_osi_linux, .ident = "Acer", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "Acer"), @@ -242,21 +242,22 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { }, /* * Disable OSI(Linux) warnings on all "Apple Computer, Inc." + * Disable OSI(Linux) warnings on all "Apple Inc." * * _OSI(Linux) confirmed to be a NOP: * DMI_MATCH(DMI_PRODUCT_NAME, "MacBook1,1"), * DMI_MATCH(DMI_PRODUCT_NAME, "MacBook2,1"), * DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro2,2"), + * DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro3,1"), * _OSI(Linux) effect unknown: * DMI_MATCH(DMI_PRODUCT_NAME, "MacPro2,1"), * DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro1,1"), - * DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro3,1"), */ { .callback = dmi_disable_osi_linux, .ident = "Apple", .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Apple Computer, Inc."), + DMI_MATCH(DMI_SYS_VENDOR, "Apple"), }, }, /* @@ -294,7 +295,7 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { * DMI_MATCH(DMI_BOARD_NAME, "IFL91"), */ { - .callback = dmi_unknown_osi_linux, + .callback = dmi_disable_osi_linux, .ident = "Compal", .matches = { DMI_MATCH(DMI_BIOS_VENDOR, "COMPAL"), @@ -310,7 +311,7 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { }, { /* OSI(Linux) is a NOP */ .callback = dmi_disable_osi_linux, - .ident = "Dell", + .ident = "Dell i1501", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 1501"), @@ -318,7 +319,7 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { }, { /* OSI(Linux) effect unknown */ .callback = dmi_unknown_osi_linux, - .ident = "Dell", + .ident = "Dell Latitude D830", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), DMI_MATCH(DMI_PRODUCT_NAME, "Latitude D830"), @@ -326,7 +327,7 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { }, { /* OSI(Linux) effect unknown */ .callback = dmi_unknown_osi_linux, - .ident = "Dell", + .ident = "Dell OP GX620", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex GX620"), @@ -334,15 +335,23 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { }, { /* OSI(Linux) effect unknown */ .callback = dmi_unknown_osi_linux, - .ident = "Dell", + .ident = "Dell PE 1900", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 1900"), }, }, + { /* OSI(Linux) is a NOP */ + .callback = dmi_disable_osi_linux, + .ident = "Dell PE R200", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge R200"), + }, + }, { /* OSI(Linux) touches USB */ .callback = dmi_disable_osi_linux, - .ident = "Dell", + .ident = "Dell PR 390", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), DMI_MATCH(DMI_PRODUCT_NAME, "Precision WorkStation 390"), @@ -358,7 +367,7 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { }, { /* OSI(Linux) effect unknown */ .callback = dmi_unknown_osi_linux, - .ident = "Dell", + .ident = "Dell PE SC440", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge SC440"), @@ -521,7 +530,7 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { * DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FZ11M"), */ { - .callback = dmi_unknown_osi_linux, + .callback = dmi_disable_osi_linux, .ident = "Sony", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"), -- cgit v0.10.2