diff options
Diffstat (limited to 'drivers/acpi/blacklist.c')
-rw-r--r-- | drivers/acpi/blacklist.c | 122 |
1 files changed, 66 insertions, 56 deletions
diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c index 4c010e7f11b8..9824f679a910 100644 --- a/drivers/acpi/blacklist.c +++ b/drivers/acpi/blacklist.c | |||
@@ -26,7 +26,6 @@ | |||
26 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 26 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
27 | */ | 27 | */ |
28 | 28 | ||
29 | |||
30 | #include <linux/kernel.h> | 29 | #include <linux/kernel.h> |
31 | #include <linux/module.h> | 30 | #include <linux/module.h> |
32 | #include <linux/init.h> | 31 | #include <linux/init.h> |
@@ -34,49 +33,49 @@ | |||
34 | #include <acpi/acpi_bus.h> | 33 | #include <acpi/acpi_bus.h> |
35 | #include <linux/dmi.h> | 34 | #include <linux/dmi.h> |
36 | 35 | ||
37 | enum acpi_blacklist_predicates | 36 | enum acpi_blacklist_predicates { |
38 | { | 37 | all_versions, |
39 | all_versions, | 38 | less_than_or_equal, |
40 | less_than_or_equal, | 39 | equal, |
41 | equal, | 40 | greater_than_or_equal, |
42 | greater_than_or_equal, | ||
43 | }; | 41 | }; |
44 | 42 | ||
45 | struct acpi_blacklist_item | 43 | struct acpi_blacklist_item { |
46 | { | 44 | char oem_id[7]; |
47 | char oem_id[7]; | 45 | char oem_table_id[9]; |
48 | char oem_table_id[9]; | 46 | u32 oem_revision; |
49 | u32 oem_revision; | 47 | acpi_table_type table; |
50 | acpi_table_type table; | 48 | enum acpi_blacklist_predicates oem_revision_predicate; |
51 | enum acpi_blacklist_predicates oem_revision_predicate; | 49 | char *reason; |
52 | char *reason; | 50 | u32 is_critical_error; |
53 | u32 is_critical_error; | ||
54 | }; | 51 | }; |
55 | 52 | ||
56 | /* | 53 | /* |
57 | * POLICY: If *anything* doesn't work, put it on the blacklist. | 54 | * POLICY: If *anything* doesn't work, put it on the blacklist. |
58 | * If they are critical errors, mark it critical, and abort driver load. | 55 | * If they are critical errors, mark it critical, and abort driver load. |
59 | */ | 56 | */ |
60 | static struct acpi_blacklist_item acpi_blacklist[] __initdata = | 57 | static struct acpi_blacklist_item acpi_blacklist[] __initdata = { |
61 | { | ||
62 | /* Compaq Presario 1700 */ | 58 | /* Compaq Presario 1700 */ |
63 | {"PTLTD ", " DSDT ", 0x06040000, ACPI_DSDT, less_than_or_equal, "Multiple problems", 1}, | 59 | {"PTLTD ", " DSDT ", 0x06040000, ACPI_DSDT, less_than_or_equal, |
60 | "Multiple problems", 1}, | ||
64 | /* Sony FX120, FX140, FX150? */ | 61 | /* Sony FX120, FX140, FX150? */ |
65 | {"SONY ", "U0 ", 0x20010313, ACPI_DSDT, less_than_or_equal, "ACPI driver problem", 1}, | 62 | {"SONY ", "U0 ", 0x20010313, ACPI_DSDT, less_than_or_equal, |
63 | "ACPI driver problem", 1}, | ||
66 | /* Compaq Presario 800, Insyde BIOS */ | 64 | /* Compaq Presario 800, Insyde BIOS */ |
67 | {"INT440", "SYSFexxx", 0x00001001, ACPI_DSDT, less_than_or_equal, "Does not use _REG to protect EC OpRegions", 1}, | 65 | {"INT440", "SYSFexxx", 0x00001001, ACPI_DSDT, less_than_or_equal, |
66 | "Does not use _REG to protect EC OpRegions", 1}, | ||
68 | /* IBM 600E - _ADR should return 7, but it returns 1 */ | 67 | /* IBM 600E - _ADR should return 7, but it returns 1 */ |
69 | {"IBM ", "TP600E ", 0x00000105, ACPI_DSDT, less_than_or_equal, "Incorrect _ADR", 1}, | 68 | {"IBM ", "TP600E ", 0x00000105, ACPI_DSDT, less_than_or_equal, |
70 | {"ASUS\0\0", "P2B-S ", 0, ACPI_DSDT, all_versions, "Bogus PCI routing", 1}, | 69 | "Incorrect _ADR", 1}, |
70 | {"ASUS\0\0", "P2B-S ", 0, ACPI_DSDT, all_versions, | ||
71 | "Bogus PCI routing", 1}, | ||
71 | 72 | ||
72 | {""} | 73 | {""} |
73 | }; | 74 | }; |
74 | 75 | ||
75 | |||
76 | #if CONFIG_ACPI_BLACKLIST_YEAR | 76 | #if CONFIG_ACPI_BLACKLIST_YEAR |
77 | 77 | ||
78 | static int __init | 78 | static int __init blacklist_by_year(void) |
79 | blacklist_by_year(void) | ||
80 | { | 79 | { |
81 | int year; | 80 | int year; |
82 | char *s = dmi_get_system_info(DMI_BIOS_DATE); | 81 | char *s = dmi_get_system_info(DMI_BIOS_DATE); |
@@ -92,36 +91,38 @@ blacklist_by_year(void) | |||
92 | 91 | ||
93 | s += 1; | 92 | s += 1; |
94 | 93 | ||
95 | year = simple_strtoul(s,NULL,0); | 94 | year = simple_strtoul(s, NULL, 0); |
96 | 95 | ||
97 | if (year < 100) { /* 2-digit year */ | 96 | if (year < 100) { /* 2-digit year */ |
98 | year += 1900; | 97 | year += 1900; |
99 | if (year < 1996) /* no dates < spec 1.0 */ | 98 | if (year < 1996) /* no dates < spec 1.0 */ |
100 | year += 100; | 99 | year += 100; |
101 | } | 100 | } |
102 | 101 | ||
103 | if (year < CONFIG_ACPI_BLACKLIST_YEAR) { | 102 | if (year < CONFIG_ACPI_BLACKLIST_YEAR) { |
104 | printk(KERN_ERR PREFIX "BIOS age (%d) fails cutoff (%d), " | 103 | printk(KERN_ERR PREFIX "BIOS age (%d) fails cutoff (%d), " |
105 | "acpi=force is required to enable ACPI\n", | 104 | "acpi=force is required to enable ACPI\n", |
106 | year, CONFIG_ACPI_BLACKLIST_YEAR); | 105 | year, CONFIG_ACPI_BLACKLIST_YEAR); |
107 | return 1; | 106 | return 1; |
108 | } | 107 | } |
109 | return 0; | 108 | return 0; |
110 | } | 109 | } |
111 | #else | 110 | #else |
112 | static inline int blacklist_by_year(void) { return 0; } | 111 | static inline int blacklist_by_year(void) |
112 | { | ||
113 | return 0; | ||
114 | } | ||
113 | #endif | 115 | #endif |
114 | 116 | ||
115 | int __init | 117 | int __init acpi_blacklisted(void) |
116 | acpi_blacklisted(void) | ||
117 | { | 118 | { |
118 | int i = 0; | 119 | int i = 0; |
119 | int blacklisted = 0; | 120 | int blacklisted = 0; |
120 | struct acpi_table_header *table_header; | 121 | struct acpi_table_header *table_header; |
121 | 122 | ||
122 | while (acpi_blacklist[i].oem_id[0] != '\0') | 123 | while (acpi_blacklist[i].oem_id[0] != '\0') { |
123 | { | 124 | if (acpi_get_table_header_early |
124 | if (acpi_get_table_header_early(acpi_blacklist[i].table, &table_header)) { | 125 | (acpi_blacklist[i].table, &table_header)) { |
125 | i++; | 126 | i++; |
126 | continue; | 127 | continue; |
127 | } | 128 | } |
@@ -131,33 +132,43 @@ acpi_blacklisted(void) | |||
131 | continue; | 132 | continue; |
132 | } | 133 | } |
133 | 134 | ||
134 | if (strncmp(acpi_blacklist[i].oem_table_id, table_header->oem_table_id, 8)) { | 135 | if (strncmp |
136 | (acpi_blacklist[i].oem_table_id, table_header->oem_table_id, | ||
137 | 8)) { | ||
135 | i++; | 138 | i++; |
136 | continue; | 139 | continue; |
137 | } | 140 | } |
138 | 141 | ||
139 | if ((acpi_blacklist[i].oem_revision_predicate == all_versions) | 142 | if ((acpi_blacklist[i].oem_revision_predicate == all_versions) |
140 | || (acpi_blacklist[i].oem_revision_predicate == less_than_or_equal | 143 | || (acpi_blacklist[i].oem_revision_predicate == |
141 | && table_header->oem_revision <= acpi_blacklist[i].oem_revision) | 144 | less_than_or_equal |
142 | || (acpi_blacklist[i].oem_revision_predicate == greater_than_or_equal | 145 | && table_header->oem_revision <= |
143 | && table_header->oem_revision >= acpi_blacklist[i].oem_revision) | 146 | acpi_blacklist[i].oem_revision) |
147 | || (acpi_blacklist[i].oem_revision_predicate == | ||
148 | greater_than_or_equal | ||
149 | && table_header->oem_revision >= | ||
150 | acpi_blacklist[i].oem_revision) | ||
144 | || (acpi_blacklist[i].oem_revision_predicate == equal | 151 | || (acpi_blacklist[i].oem_revision_predicate == equal |
145 | && table_header->oem_revision == acpi_blacklist[i].oem_revision)) { | 152 | && table_header->oem_revision == |
146 | 153 | acpi_blacklist[i].oem_revision)) { | |
147 | printk(KERN_ERR PREFIX "Vendor \"%6.6s\" System \"%8.8s\" " | 154 | |
148 | "Revision 0x%x has a known ACPI BIOS problem.\n", | 155 | printk(KERN_ERR PREFIX |
149 | acpi_blacklist[i].oem_id, | 156 | "Vendor \"%6.6s\" System \"%8.8s\" " |
150 | acpi_blacklist[i].oem_table_id, | 157 | "Revision 0x%x has a known ACPI BIOS problem.\n", |
151 | acpi_blacklist[i].oem_revision); | 158 | acpi_blacklist[i].oem_id, |
152 | 159 | acpi_blacklist[i].oem_table_id, | |
153 | printk(KERN_ERR PREFIX "Reason: %s. This is a %s error\n", | 160 | acpi_blacklist[i].oem_revision); |
154 | acpi_blacklist[i].reason, | 161 | |
155 | (acpi_blacklist[i].is_critical_error ? "non-recoverable" : "recoverable")); | 162 | printk(KERN_ERR PREFIX |
163 | "Reason: %s. This is a %s error\n", | ||
164 | acpi_blacklist[i].reason, | ||
165 | (acpi_blacklist[i]. | ||
166 | is_critical_error ? "non-recoverable" : | ||
167 | "recoverable")); | ||
156 | 168 | ||
157 | blacklisted = acpi_blacklist[i].is_critical_error; | 169 | blacklisted = acpi_blacklist[i].is_critical_error; |
158 | break; | 170 | break; |
159 | } | 171 | } else { |
160 | else { | ||
161 | i++; | 172 | i++; |
162 | } | 173 | } |
163 | } | 174 | } |
@@ -166,4 +177,3 @@ acpi_blacklisted(void) | |||
166 | 177 | ||
167 | return blacklisted; | 178 | return blacklisted; |
168 | } | 179 | } |
169 | |||