diff options
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0001-samsung-laptop-make-the-dmi-check-less-strict.patch')
-rw-r--r-- | recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0001-samsung-laptop-make-the-dmi-check-less-strict.patch | 306 |
1 files changed, 306 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0001-samsung-laptop-make-the-dmi-check-less-strict.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0001-samsung-laptop-make-the-dmi-check-less-strict.patch new file mode 100644 index 00000000..613acd71 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0001-samsung-laptop-make-the-dmi-check-less-strict.patch | |||
@@ -0,0 +1,306 @@ | |||
1 | From fe36d7279bb09c09b2c07b1b8bfe786a3ab12486 Mon Sep 17 00:00:00 2001 | ||
2 | From: Corentin Chary <corentincj@iksaif.net> | ||
3 | Date: Sat, 26 Nov 2011 11:00:10 +0100 | ||
4 | Subject: [PATCH 001/109] samsung-laptop: make the dmi check less strict | ||
5 | |||
6 | commit 3be324a94df0c3f032178d04549dbfbf6cccb09a upstream. | ||
7 | |||
8 | This enable the driver for everything that look like | ||
9 | a laptop and is from vendor "SAMSUNG ELECTRONICS CO., LTD.". | ||
10 | Note that laptop supported by samsung-q10 seem to have a different | ||
11 | vendor strict. | ||
12 | |||
13 | Also remove every log output until we know that we have a SABI interface | ||
14 | (except if the driver is forced to load, or debug is enabled). | ||
15 | |||
16 | Keeping a whitelist of laptop with a model granularity is something that can't | ||
17 | work without close vendor cooperation (and we don't have that). | ||
18 | |||
19 | Signed-off-by: Corentin Chary <corentincj@iksaif.net> | ||
20 | Acked-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
21 | Signed-off-by: Matthew Garrett <mjg@redhat.com> | ||
22 | [bwh: Backported to 3.2: | ||
23 | - Adjust context | ||
24 | - Drop changes relating to ACPI video] | ||
25 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
26 | --- | ||
27 | drivers/platform/x86/samsung-laptop.c | 225 ++------------------------------- | ||
28 | 1 files changed, 8 insertions(+), 217 deletions(-) | ||
29 | |||
30 | diff --git a/drivers/platform/x86/samsung-laptop.c b/drivers/platform/x86/samsung-laptop.c | ||
31 | index 09e26bf..af1e296 100644 | ||
32 | --- a/drivers/platform/x86/samsung-laptop.c | ||
33 | +++ b/drivers/platform/x86/samsung-laptop.c | ||
34 | @@ -540,245 +540,34 @@ static DEVICE_ATTR(performance_level, S_IWUSR | S_IRUGO, | ||
35 | get_performance_level, set_performance_level); | ||
36 | |||
37 | |||
38 | -static int __init dmi_check_cb(const struct dmi_system_id *id) | ||
39 | -{ | ||
40 | - pr_info("found laptop model '%s'\n", | ||
41 | - id->ident); | ||
42 | - return 1; | ||
43 | -} | ||
44 | - | ||
45 | static struct dmi_system_id __initdata samsung_dmi_table[] = { | ||
46 | { | ||
47 | - .ident = "N128", | ||
48 | - .matches = { | ||
49 | - DMI_MATCH(DMI_SYS_VENDOR, | ||
50 | - "SAMSUNG ELECTRONICS CO., LTD."), | ||
51 | - DMI_MATCH(DMI_PRODUCT_NAME, "N128"), | ||
52 | - DMI_MATCH(DMI_BOARD_NAME, "N128"), | ||
53 | - }, | ||
54 | - .callback = dmi_check_cb, | ||
55 | - }, | ||
56 | - { | ||
57 | - .ident = "N130", | ||
58 | .matches = { | ||
59 | DMI_MATCH(DMI_SYS_VENDOR, | ||
60 | "SAMSUNG ELECTRONICS CO., LTD."), | ||
61 | - DMI_MATCH(DMI_PRODUCT_NAME, "N130"), | ||
62 | - DMI_MATCH(DMI_BOARD_NAME, "N130"), | ||
63 | + DMI_MATCH(DMI_CHASSIS_TYPE, "8"), /* Portable */ | ||
64 | }, | ||
65 | - .callback = dmi_check_cb, | ||
66 | }, | ||
67 | { | ||
68 | - .ident = "N510", | ||
69 | .matches = { | ||
70 | DMI_MATCH(DMI_SYS_VENDOR, | ||
71 | "SAMSUNG ELECTRONICS CO., LTD."), | ||
72 | - DMI_MATCH(DMI_PRODUCT_NAME, "N510"), | ||
73 | - DMI_MATCH(DMI_BOARD_NAME, "N510"), | ||
74 | + DMI_MATCH(DMI_CHASSIS_TYPE, "9"), /* Laptop */ | ||
75 | }, | ||
76 | - .callback = dmi_check_cb, | ||
77 | }, | ||
78 | { | ||
79 | - .ident = "X125", | ||
80 | .matches = { | ||
81 | DMI_MATCH(DMI_SYS_VENDOR, | ||
82 | "SAMSUNG ELECTRONICS CO., LTD."), | ||
83 | - DMI_MATCH(DMI_PRODUCT_NAME, "X125"), | ||
84 | - DMI_MATCH(DMI_BOARD_NAME, "X125"), | ||
85 | + DMI_MATCH(DMI_CHASSIS_TYPE, "10"), /* Notebook */ | ||
86 | }, | ||
87 | - .callback = dmi_check_cb, | ||
88 | }, | ||
89 | { | ||
90 | - .ident = "X120/X170", | ||
91 | .matches = { | ||
92 | DMI_MATCH(DMI_SYS_VENDOR, | ||
93 | "SAMSUNG ELECTRONICS CO., LTD."), | ||
94 | - DMI_MATCH(DMI_PRODUCT_NAME, "X120/X170"), | ||
95 | - DMI_MATCH(DMI_BOARD_NAME, "X120/X170"), | ||
96 | - }, | ||
97 | - .callback = dmi_check_cb, | ||
98 | - }, | ||
99 | - { | ||
100 | - .ident = "NC10", | ||
101 | - .matches = { | ||
102 | - DMI_MATCH(DMI_SYS_VENDOR, | ||
103 | - "SAMSUNG ELECTRONICS CO., LTD."), | ||
104 | - DMI_MATCH(DMI_PRODUCT_NAME, "NC10"), | ||
105 | - DMI_MATCH(DMI_BOARD_NAME, "NC10"), | ||
106 | - }, | ||
107 | - .callback = dmi_check_cb, | ||
108 | - }, | ||
109 | - { | ||
110 | - .ident = "NP-Q45", | ||
111 | - .matches = { | ||
112 | - DMI_MATCH(DMI_SYS_VENDOR, | ||
113 | - "SAMSUNG ELECTRONICS CO., LTD."), | ||
114 | - DMI_MATCH(DMI_PRODUCT_NAME, "SQ45S70S"), | ||
115 | - DMI_MATCH(DMI_BOARD_NAME, "SQ45S70S"), | ||
116 | - }, | ||
117 | - .callback = dmi_check_cb, | ||
118 | - }, | ||
119 | - { | ||
120 | - .ident = "X360", | ||
121 | - .matches = { | ||
122 | - DMI_MATCH(DMI_SYS_VENDOR, | ||
123 | - "SAMSUNG ELECTRONICS CO., LTD."), | ||
124 | - DMI_MATCH(DMI_PRODUCT_NAME, "X360"), | ||
125 | - DMI_MATCH(DMI_BOARD_NAME, "X360"), | ||
126 | - }, | ||
127 | - .callback = dmi_check_cb, | ||
128 | - }, | ||
129 | - { | ||
130 | - .ident = "R410 Plus", | ||
131 | - .matches = { | ||
132 | - DMI_MATCH(DMI_SYS_VENDOR, | ||
133 | - "SAMSUNG ELECTRONICS CO., LTD."), | ||
134 | - DMI_MATCH(DMI_PRODUCT_NAME, "R410P"), | ||
135 | - DMI_MATCH(DMI_BOARD_NAME, "R460"), | ||
136 | - }, | ||
137 | - .callback = dmi_check_cb, | ||
138 | - }, | ||
139 | - { | ||
140 | - .ident = "R518", | ||
141 | - .matches = { | ||
142 | - DMI_MATCH(DMI_SYS_VENDOR, | ||
143 | - "SAMSUNG ELECTRONICS CO., LTD."), | ||
144 | - DMI_MATCH(DMI_PRODUCT_NAME, "R518"), | ||
145 | - DMI_MATCH(DMI_BOARD_NAME, "R518"), | ||
146 | - }, | ||
147 | - .callback = dmi_check_cb, | ||
148 | - }, | ||
149 | - { | ||
150 | - .ident = "R519/R719", | ||
151 | - .matches = { | ||
152 | - DMI_MATCH(DMI_SYS_VENDOR, | ||
153 | - "SAMSUNG ELECTRONICS CO., LTD."), | ||
154 | - DMI_MATCH(DMI_PRODUCT_NAME, "R519/R719"), | ||
155 | - DMI_MATCH(DMI_BOARD_NAME, "R519/R719"), | ||
156 | - }, | ||
157 | - .callback = dmi_check_cb, | ||
158 | - }, | ||
159 | - { | ||
160 | - .ident = "N150/N210/N220", | ||
161 | - .matches = { | ||
162 | - DMI_MATCH(DMI_SYS_VENDOR, | ||
163 | - "SAMSUNG ELECTRONICS CO., LTD."), | ||
164 | - DMI_MATCH(DMI_PRODUCT_NAME, "N150/N210/N220"), | ||
165 | - DMI_MATCH(DMI_BOARD_NAME, "N150/N210/N220"), | ||
166 | - }, | ||
167 | - .callback = dmi_check_cb, | ||
168 | - }, | ||
169 | - { | ||
170 | - .ident = "N220", | ||
171 | - .matches = { | ||
172 | - DMI_MATCH(DMI_SYS_VENDOR, | ||
173 | - "SAMSUNG ELECTRONICS CO., LTD."), | ||
174 | - DMI_MATCH(DMI_PRODUCT_NAME, "N220"), | ||
175 | - DMI_MATCH(DMI_BOARD_NAME, "N220"), | ||
176 | - }, | ||
177 | - .callback = dmi_check_cb, | ||
178 | - }, | ||
179 | - { | ||
180 | - .ident = "N150/N210/N220/N230", | ||
181 | - .matches = { | ||
182 | - DMI_MATCH(DMI_SYS_VENDOR, | ||
183 | - "SAMSUNG ELECTRONICS CO., LTD."), | ||
184 | - DMI_MATCH(DMI_PRODUCT_NAME, "N150/N210/N220/N230"), | ||
185 | - DMI_MATCH(DMI_BOARD_NAME, "N150/N210/N220/N230"), | ||
186 | - }, | ||
187 | - .callback = dmi_check_cb, | ||
188 | - }, | ||
189 | - { | ||
190 | - .ident = "N150P/N210P/N220P", | ||
191 | - .matches = { | ||
192 | - DMI_MATCH(DMI_SYS_VENDOR, | ||
193 | - "SAMSUNG ELECTRONICS CO., LTD."), | ||
194 | - DMI_MATCH(DMI_PRODUCT_NAME, "N150P/N210P/N220P"), | ||
195 | - DMI_MATCH(DMI_BOARD_NAME, "N150P/N210P/N220P"), | ||
196 | - }, | ||
197 | - .callback = dmi_check_cb, | ||
198 | - }, | ||
199 | - { | ||
200 | - .ident = "R700", | ||
201 | - .matches = { | ||
202 | - DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."), | ||
203 | - DMI_MATCH(DMI_PRODUCT_NAME, "SR700"), | ||
204 | - DMI_MATCH(DMI_BOARD_NAME, "SR700"), | ||
205 | - }, | ||
206 | - .callback = dmi_check_cb, | ||
207 | - }, | ||
208 | - { | ||
209 | - .ident = "R530/R730", | ||
210 | - .matches = { | ||
211 | - DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."), | ||
212 | - DMI_MATCH(DMI_PRODUCT_NAME, "R530/R730"), | ||
213 | - DMI_MATCH(DMI_BOARD_NAME, "R530/R730"), | ||
214 | - }, | ||
215 | - .callback = dmi_check_cb, | ||
216 | - }, | ||
217 | - { | ||
218 | - .ident = "NF110/NF210/NF310", | ||
219 | - .matches = { | ||
220 | - DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."), | ||
221 | - DMI_MATCH(DMI_PRODUCT_NAME, "NF110/NF210/NF310"), | ||
222 | - DMI_MATCH(DMI_BOARD_NAME, "NF110/NF210/NF310"), | ||
223 | - }, | ||
224 | - .callback = dmi_check_cb, | ||
225 | - }, | ||
226 | - { | ||
227 | - .ident = "N145P/N250P/N260P", | ||
228 | - .matches = { | ||
229 | - DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."), | ||
230 | - DMI_MATCH(DMI_PRODUCT_NAME, "N145P/N250P/N260P"), | ||
231 | - DMI_MATCH(DMI_BOARD_NAME, "N145P/N250P/N260P"), | ||
232 | - }, | ||
233 | - .callback = dmi_check_cb, | ||
234 | - }, | ||
235 | - { | ||
236 | - .ident = "R70/R71", | ||
237 | - .matches = { | ||
238 | - DMI_MATCH(DMI_SYS_VENDOR, | ||
239 | - "SAMSUNG ELECTRONICS CO., LTD."), | ||
240 | - DMI_MATCH(DMI_PRODUCT_NAME, "R70/R71"), | ||
241 | - DMI_MATCH(DMI_BOARD_NAME, "R70/R71"), | ||
242 | - }, | ||
243 | - .callback = dmi_check_cb, | ||
244 | - }, | ||
245 | - { | ||
246 | - .ident = "P460", | ||
247 | - .matches = { | ||
248 | - DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."), | ||
249 | - DMI_MATCH(DMI_PRODUCT_NAME, "P460"), | ||
250 | - DMI_MATCH(DMI_BOARD_NAME, "P460"), | ||
251 | - }, | ||
252 | - .callback = dmi_check_cb, | ||
253 | - }, | ||
254 | - { | ||
255 | - .ident = "R528/R728", | ||
256 | - .matches = { | ||
257 | - DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."), | ||
258 | - DMI_MATCH(DMI_PRODUCT_NAME, "R528/R728"), | ||
259 | - DMI_MATCH(DMI_BOARD_NAME, "R528/R728"), | ||
260 | - }, | ||
261 | - .callback = dmi_check_cb, | ||
262 | - }, | ||
263 | - { | ||
264 | - .ident = "NC210/NC110", | ||
265 | - .matches = { | ||
266 | - DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."), | ||
267 | - DMI_MATCH(DMI_PRODUCT_NAME, "NC210/NC110"), | ||
268 | - DMI_MATCH(DMI_BOARD_NAME, "NC210/NC110"), | ||
269 | - }, | ||
270 | - .callback = dmi_check_cb, | ||
271 | - }, | ||
272 | - { | ||
273 | - .ident = "X520", | ||
274 | - .matches = { | ||
275 | - DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."), | ||
276 | - DMI_MATCH(DMI_PRODUCT_NAME, "X520"), | ||
277 | - DMI_MATCH(DMI_BOARD_NAME, "X520"), | ||
278 | + DMI_MATCH(DMI_CHASSIS_TYPE, "14"), /* Sub-Notebook */ | ||
279 | }, | ||
280 | - .callback = dmi_check_cb, | ||
281 | }, | ||
282 | { }, | ||
283 | }; | ||
284 | @@ -819,7 +608,8 @@ static int __init samsung_init(void) | ||
285 | |||
286 | f0000_segment = ioremap_nocache(0xf0000, 0xffff); | ||
287 | if (!f0000_segment) { | ||
288 | - pr_err("Can't map the segment at 0xf0000\n"); | ||
289 | + if (debug || force) | ||
290 | + pr_err("Can't map the segment at 0xf0000\n"); | ||
291 | return -EINVAL; | ||
292 | } | ||
293 | |||
294 | @@ -832,7 +622,8 @@ static int __init samsung_init(void) | ||
295 | } | ||
296 | |||
297 | if (loca == 0xffff) { | ||
298 | - pr_err("This computer does not support SABI\n"); | ||
299 | + if (debug || force) | ||
300 | + pr_err("This computer does not support SABI\n"); | ||
301 | goto error_no_signature; | ||
302 | } | ||
303 | |||
304 | -- | ||
305 | 1.7.7.6 | ||
306 | |||