1 |
Author: mpagano |
2 |
Date: 2008-03-25 23:51:16 +0000 (Tue, 25 Mar 2008) |
3 |
New Revision: 1274 |
4 |
|
5 |
Added: |
6 |
genpatches-2.6/trunk/2.6.24/2510_ricoh-handle-susp-resum-disab.patch |
7 |
genpatches-2.6/trunk/2.6.24/2515_ricoh-mmc-RL5c476.patch |
8 |
Modified: |
9 |
genpatches-2.6/trunk/2.6.24/0000_README |
10 |
Log: |
11 |
Adding Ricoh 5 in 1 memory reader patches |
12 |
|
13 |
Modified: genpatches-2.6/trunk/2.6.24/0000_README |
14 |
=================================================================== |
15 |
--- genpatches-2.6/trunk/2.6.24/0000_README 2008-03-25 00:00:00 UTC (rev 1273) |
16 |
+++ genpatches-2.6/trunk/2.6.24/0000_README 2008-03-25 23:51:16 UTC (rev 1274) |
17 |
@@ -79,6 +79,14 @@ |
18 |
From: http://bugs.gentoo.org/212729 |
19 |
Desc: Fix usb-storage access to Motorola ROKR phone |
20 |
|
21 |
+Patch: 2510_ricoh-handle-susp-resum-disab.patch |
22 |
+From: http://bugs.gentoo.org/185581 |
23 |
+Desc: Handle suspend/resume in Ricoh MMC disabler |
24 |
+ |
25 |
+Patch: 2515_ricoh-mmc-RL5c476.patch |
26 |
+From: http://bugs.gentoo.org/185581 |
27 |
+Desc: Extend ricoh_mmc to support Ricoh RL5c476 |
28 |
+ |
29 |
Patch: 2700_alsa-hda-lifebook-e8410.patch |
30 |
From: Tony Vroon <chainsaw@g.o> |
31 |
Desc: Fix mixer controls for Fujitsu Lifebook E8410 sound chip |
32 |
|
33 |
Added: genpatches-2.6/trunk/2.6.24/2510_ricoh-handle-susp-resum-disab.patch |
34 |
=================================================================== |
35 |
--- genpatches-2.6/trunk/2.6.24/2510_ricoh-handle-susp-resum-disab.patch (rev 0) |
36 |
+++ genpatches-2.6/trunk/2.6.24/2510_ricoh-handle-susp-resum-disab.patch 2008-03-25 23:51:16 UTC (rev 1274) |
37 |
@@ -0,0 +1,159 @@ |
38 |
+From: Philip Langdale <philipl@×××××.org> |
39 |
+Date: Sat, 29 Dec 2007 08:11:42 +0000 (-0800) |
40 |
+Subject: mmc: Handle suspend/resume in Ricoh MMC disabler |
41 |
+X-Git-Tag: v2.6.25-rc1~19^2~5 |
42 |
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=1f090bf5245115e404103d35e7f5597bfe653aac |
43 |
+ |
44 |
+mmc: Handle suspend/resume in Ricoh MMC disabler |
45 |
+ |
46 |
+As pci config space is reinitialised on a suspend/resume cycle, the |
47 |
+disabler needs to work its magic at resume time. For symmetry this |
48 |
+change also explicitly enables the controller at suspend time but |
49 |
+it's not strictly necessary. |
50 |
+ |
51 |
+Signed-off-by: Philipl Langdale <philipl@×××××.org> |
52 |
+Signed-off-by: Pierre Ossman <drzeus@××××××.cx> |
53 |
+--- |
54 |
+ |
55 |
+diff --git a/drivers/mmc/host/ricoh_mmc.c b/drivers/mmc/host/ricoh_mmc.c |
56 |
+index 1e87045..898e799 100644 |
57 |
+--- a/drivers/mmc/host/ricoh_mmc.c |
58 |
++++ b/drivers/mmc/host/ricoh_mmc.c |
59 |
+@@ -41,6 +41,46 @@ static const struct pci_device_id pci_ids[] __devinitdata = { |
60 |
+ |
61 |
+ MODULE_DEVICE_TABLE(pci, pci_ids); |
62 |
+ |
63 |
++static int ricoh_mmc_disable(struct pci_dev *fw_dev) |
64 |
++{ |
65 |
++ u8 write_enable; |
66 |
++ u8 disable; |
67 |
++ |
68 |
++ pci_read_config_byte(fw_dev, 0xCB, &disable); |
69 |
++ if (disable & 0x02) { |
70 |
++ printk(KERN_INFO DRIVER_NAME |
71 |
++ ": Controller already disabled. Nothing to do.\n"); |
72 |
++ return -ENODEV; |
73 |
++ } |
74 |
++ |
75 |
++ pci_read_config_byte(fw_dev, 0xCA, &write_enable); |
76 |
++ pci_write_config_byte(fw_dev, 0xCA, 0x57); |
77 |
++ pci_write_config_byte(fw_dev, 0xCB, disable | 0x02); |
78 |
++ pci_write_config_byte(fw_dev, 0xCA, write_enable); |
79 |
++ |
80 |
++ printk(KERN_INFO DRIVER_NAME |
81 |
++ ": Controller is now disabled.\n"); |
82 |
++ |
83 |
++ return 0; |
84 |
++} |
85 |
++ |
86 |
++static int ricoh_mmc_enable(struct pci_dev *fw_dev) |
87 |
++{ |
88 |
++ u8 write_enable; |
89 |
++ u8 disable; |
90 |
++ |
91 |
++ pci_read_config_byte(fw_dev, 0xCA, &write_enable); |
92 |
++ pci_read_config_byte(fw_dev, 0xCB, &disable); |
93 |
++ pci_write_config_byte(fw_dev, 0xCA, 0x57); |
94 |
++ pci_write_config_byte(fw_dev, 0xCB, disable & ~0x02); |
95 |
++ pci_write_config_byte(fw_dev, 0xCA, write_enable); |
96 |
++ |
97 |
++ printk(KERN_INFO DRIVER_NAME |
98 |
++ ": Controller is now re-enabled.\n"); |
99 |
++ |
100 |
++ return 0; |
101 |
++} |
102 |
++ |
103 |
+ static int __devinit ricoh_mmc_probe(struct pci_dev *pdev, |
104 |
+ const struct pci_device_id *ent) |
105 |
+ { |
106 |
+@@ -61,26 +101,12 @@ static int __devinit ricoh_mmc_probe(struct pci_dev *pdev, |
107 |
+ while ((fw_dev = pci_get_device(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_R5C832, fw_dev))) { |
108 |
+ if (PCI_SLOT(pdev->devfn) == PCI_SLOT(fw_dev->devfn) && |
109 |
+ pdev->bus == fw_dev->bus) { |
110 |
+- u8 write_enable; |
111 |
+- u8 disable; |
112 |
+- |
113 |
+- pci_read_config_byte(fw_dev, 0xCB, &disable); |
114 |
+- if (disable & 0x02) { |
115 |
+- printk(KERN_INFO DRIVER_NAME |
116 |
+- ": Controller already disabled. Nothing to do.\n"); |
117 |
++ if (ricoh_mmc_disable(fw_dev) != 0) { |
118 |
+ return -ENODEV; |
119 |
+ } |
120 |
+ |
121 |
+- pci_read_config_byte(fw_dev, 0xCA, &write_enable); |
122 |
+- pci_write_config_byte(fw_dev, 0xCA, 0x57); |
123 |
+- pci_write_config_byte(fw_dev, 0xCB, disable | 0x02); |
124 |
+- pci_write_config_byte(fw_dev, 0xCA, write_enable); |
125 |
+- |
126 |
+ pci_set_drvdata(pdev, fw_dev); |
127 |
+ |
128 |
+- printk(KERN_INFO DRIVER_NAME |
129 |
+- ": Controller is now disabled.\n"); |
130 |
+- |
131 |
+ break; |
132 |
+ } |
133 |
+ } |
134 |
+@@ -96,30 +122,51 @@ static int __devinit ricoh_mmc_probe(struct pci_dev *pdev, |
135 |
+ |
136 |
+ static void __devexit ricoh_mmc_remove(struct pci_dev *pdev) |
137 |
+ { |
138 |
+- u8 write_enable; |
139 |
+- u8 disable; |
140 |
+ struct pci_dev *fw_dev = NULL; |
141 |
+ |
142 |
+ fw_dev = pci_get_drvdata(pdev); |
143 |
+ BUG_ON(fw_dev == NULL); |
144 |
+ |
145 |
+- pci_read_config_byte(fw_dev, 0xCA, &write_enable); |
146 |
+- pci_read_config_byte(fw_dev, 0xCB, &disable); |
147 |
+- pci_write_config_byte(fw_dev, 0xCA, 0x57); |
148 |
+- pci_write_config_byte(fw_dev, 0xCB, disable & ~0x02); |
149 |
+- pci_write_config_byte(fw_dev, 0xCA, write_enable); |
150 |
+- |
151 |
+- printk(KERN_INFO DRIVER_NAME |
152 |
+- ": Controller is now re-enabled.\n"); |
153 |
++ ricoh_mmc_enable(fw_dev); |
154 |
+ |
155 |
+ pci_set_drvdata(pdev, NULL); |
156 |
+ } |
157 |
+ |
158 |
++static int ricoh_mmc_suspend (struct pci_dev *pdev, pm_message_t state) |
159 |
++{ |
160 |
++ struct pci_dev *fw_dev = NULL; |
161 |
++ |
162 |
++ fw_dev = pci_get_drvdata(pdev); |
163 |
++ BUG_ON(fw_dev == NULL); |
164 |
++ |
165 |
++ printk(KERN_INFO DRIVER_NAME ": Suspending.\n"); |
166 |
++ |
167 |
++ ricoh_mmc_enable(fw_dev); |
168 |
++ |
169 |
++ return 0; |
170 |
++} |
171 |
++ |
172 |
++static int ricoh_mmc_resume (struct pci_dev *pdev) |
173 |
++{ |
174 |
++ struct pci_dev *fw_dev = NULL; |
175 |
++ |
176 |
++ fw_dev = pci_get_drvdata(pdev); |
177 |
++ BUG_ON(fw_dev == NULL); |
178 |
++ |
179 |
++ printk(KERN_INFO DRIVER_NAME ": Resuming.\n"); |
180 |
++ |
181 |
++ ricoh_mmc_disable(fw_dev); |
182 |
++ |
183 |
++ return 0; |
184 |
++} |
185 |
++ |
186 |
+ static struct pci_driver ricoh_mmc_driver = { |
187 |
+ .name = DRIVER_NAME, |
188 |
+ .id_table = pci_ids, |
189 |
+ .probe = ricoh_mmc_probe, |
190 |
+ .remove = __devexit_p(ricoh_mmc_remove), |
191 |
++ .suspend = ricoh_mmc_suspend, |
192 |
++ .resume = ricoh_mmc_resume, |
193 |
+ }; |
194 |
+ |
195 |
+ /*****************************************************************************\ |
196 |
+ |
197 |
|
198 |
Added: genpatches-2.6/trunk/2.6.24/2515_ricoh-mmc-RL5c476.patch |
199 |
=================================================================== |
200 |
--- genpatches-2.6/trunk/2.6.24/2515_ricoh-mmc-RL5c476.patch (rev 0) |
201 |
+++ genpatches-2.6/trunk/2.6.24/2515_ricoh-mmc-RL5c476.patch 2008-03-25 23:51:16 UTC (rev 1274) |
202 |
@@ -0,0 +1,179 @@ |
203 |
+From: Frank Seidel <fseidel@××××.de> |
204 |
+Date: Mon, 4 Feb 2008 18:25:42 +0000 (+0100) |
205 |
+Subject: mmc: extend ricoh_mmc to support Ricoh RL5c476 |
206 |
+X-Git-Tag: v2.6.25-rc1~19^2 |
207 |
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=882c49164d72c45f37d7fa1bb3de7c31cf1a5fab |
208 |
+ |
209 |
+mmc: extend ricoh_mmc to support Ricoh RL5c476 |
210 |
+ |
211 |
+This patch adds support for the Ricoh RL5c476 chip: with this |
212 |
+the mmc adapter that needs this disabler (R5C843) can also be |
213 |
+handled correctly when it sits on a RL5c476. |
214 |
+ |
215 |
+Signed-off-by: Frank Seidel <fseidel@××××.de> |
216 |
+Signed-off-by: Pierre Ossman <drzeus@××××××.cx> |
217 |
+--- |
218 |
+ |
219 |
+diff --git a/drivers/mmc/host/ricoh_mmc.c b/drivers/mmc/host/ricoh_mmc.c |
220 |
+index 898e799..a16d760 100644 |
221 |
+--- a/drivers/mmc/host/ricoh_mmc.c |
222 |
++++ b/drivers/mmc/host/ricoh_mmc.c |
223 |
+@@ -44,19 +44,43 @@ MODULE_DEVICE_TABLE(pci, pci_ids); |
224 |
+ static int ricoh_mmc_disable(struct pci_dev *fw_dev) |
225 |
+ { |
226 |
+ u8 write_enable; |
227 |
++ u8 write_target; |
228 |
+ u8 disable; |
229 |
+ |
230 |
+- pci_read_config_byte(fw_dev, 0xCB, &disable); |
231 |
+- if (disable & 0x02) { |
232 |
+- printk(KERN_INFO DRIVER_NAME |
233 |
+- ": Controller already disabled. Nothing to do.\n"); |
234 |
+- return -ENODEV; |
235 |
+- } |
236 |
++ if (fw_dev->device == PCI_DEVICE_ID_RICOH_RL5C476) { |
237 |
++ /* via RL5C476 */ |
238 |
+ |
239 |
+- pci_read_config_byte(fw_dev, 0xCA, &write_enable); |
240 |
+- pci_write_config_byte(fw_dev, 0xCA, 0x57); |
241 |
+- pci_write_config_byte(fw_dev, 0xCB, disable | 0x02); |
242 |
+- pci_write_config_byte(fw_dev, 0xCA, write_enable); |
243 |
++ pci_read_config_byte(fw_dev, 0xB7, &disable); |
244 |
++ if (disable & 0x02) { |
245 |
++ printk(KERN_INFO DRIVER_NAME |
246 |
++ ": Controller already disabled. " \ |
247 |
++ "Nothing to do.\n"); |
248 |
++ return -ENODEV; |
249 |
++ } |
250 |
++ |
251 |
++ pci_read_config_byte(fw_dev, 0x8E, &write_enable); |
252 |
++ pci_write_config_byte(fw_dev, 0x8E, 0xAA); |
253 |
++ pci_read_config_byte(fw_dev, 0x8D, &write_target); |
254 |
++ pci_write_config_byte(fw_dev, 0x8D, 0xB7); |
255 |
++ pci_write_config_byte(fw_dev, 0xB7, disable | 0x02); |
256 |
++ pci_write_config_byte(fw_dev, 0x8E, write_enable); |
257 |
++ pci_write_config_byte(fw_dev, 0x8D, write_target); |
258 |
++ } else { |
259 |
++ /* via R5C832 */ |
260 |
++ |
261 |
++ pci_read_config_byte(fw_dev, 0xCB, &disable); |
262 |
++ if (disable & 0x02) { |
263 |
++ printk(KERN_INFO DRIVER_NAME |
264 |
++ ": Controller already disabled. " \ |
265 |
++ "Nothing to do.\n"); |
266 |
++ return -ENODEV; |
267 |
++ } |
268 |
++ |
269 |
++ pci_read_config_byte(fw_dev, 0xCA, &write_enable); |
270 |
++ pci_write_config_byte(fw_dev, 0xCA, 0x57); |
271 |
++ pci_write_config_byte(fw_dev, 0xCB, disable | 0x02); |
272 |
++ pci_write_config_byte(fw_dev, 0xCA, write_enable); |
273 |
++ } |
274 |
+ |
275 |
+ printk(KERN_INFO DRIVER_NAME |
276 |
+ ": Controller is now disabled.\n"); |
277 |
+@@ -67,13 +91,29 @@ static int ricoh_mmc_disable(struct pci_dev *fw_dev) |
278 |
+ static int ricoh_mmc_enable(struct pci_dev *fw_dev) |
279 |
+ { |
280 |
+ u8 write_enable; |
281 |
++ u8 write_target; |
282 |
+ u8 disable; |
283 |
+ |
284 |
+- pci_read_config_byte(fw_dev, 0xCA, &write_enable); |
285 |
+- pci_read_config_byte(fw_dev, 0xCB, &disable); |
286 |
+- pci_write_config_byte(fw_dev, 0xCA, 0x57); |
287 |
+- pci_write_config_byte(fw_dev, 0xCB, disable & ~0x02); |
288 |
+- pci_write_config_byte(fw_dev, 0xCA, write_enable); |
289 |
++ if (fw_dev->device == PCI_DEVICE_ID_RICOH_RL5C476) { |
290 |
++ /* via RL5C476 */ |
291 |
++ |
292 |
++ pci_read_config_byte(fw_dev, 0x8E, &write_enable); |
293 |
++ pci_write_config_byte(fw_dev, 0x8E, 0xAA); |
294 |
++ pci_read_config_byte(fw_dev, 0x8D, &write_target); |
295 |
++ pci_write_config_byte(fw_dev, 0x8D, 0xB7); |
296 |
++ pci_read_config_byte(fw_dev, 0xB7, &disable); |
297 |
++ pci_write_config_byte(fw_dev, 0xB7, disable & ~0x02); |
298 |
++ pci_write_config_byte(fw_dev, 0x8E, write_enable); |
299 |
++ pci_write_config_byte(fw_dev, 0x8D, write_target); |
300 |
++ } else { |
301 |
++ /* via R5C832 */ |
302 |
++ |
303 |
++ pci_read_config_byte(fw_dev, 0xCA, &write_enable); |
304 |
++ pci_read_config_byte(fw_dev, 0xCB, &disable); |
305 |
++ pci_write_config_byte(fw_dev, 0xCA, 0x57); |
306 |
++ pci_write_config_byte(fw_dev, 0xCB, disable & ~0x02); |
307 |
++ pci_write_config_byte(fw_dev, 0xCA, write_enable); |
308 |
++ } |
309 |
+ |
310 |
+ printk(KERN_INFO DRIVER_NAME |
311 |
+ ": Controller is now re-enabled.\n"); |
312 |
+@@ -85,6 +125,7 @@ static int __devinit ricoh_mmc_probe(struct pci_dev *pdev, |
313 |
+ const struct pci_device_id *ent) |
314 |
+ { |
315 |
+ u8 rev; |
316 |
++ u8 ctrlfound = 0; |
317 |
+ |
318 |
+ struct pci_dev *fw_dev = NULL; |
319 |
+ |
320 |
+@@ -98,20 +139,38 @@ static int __devinit ricoh_mmc_probe(struct pci_dev *pdev, |
321 |
+ pci_name(pdev), (int)pdev->vendor, (int)pdev->device, |
322 |
+ (int)rev); |
323 |
+ |
324 |
+- while ((fw_dev = pci_get_device(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_R5C832, fw_dev))) { |
325 |
++ while ((fw_dev = |
326 |
++ pci_get_device(PCI_VENDOR_ID_RICOH, |
327 |
++ PCI_DEVICE_ID_RICOH_RL5C476, fw_dev))) { |
328 |
+ if (PCI_SLOT(pdev->devfn) == PCI_SLOT(fw_dev->devfn) && |
329 |
+ pdev->bus == fw_dev->bus) { |
330 |
+- if (ricoh_mmc_disable(fw_dev) != 0) { |
331 |
++ if (ricoh_mmc_disable(fw_dev) != 0) |
332 |
+ return -ENODEV; |
333 |
+- } |
334 |
+ |
335 |
+ pci_set_drvdata(pdev, fw_dev); |
336 |
+ |
337 |
++ ++ctrlfound; |
338 |
+ break; |
339 |
+ } |
340 |
+ } |
341 |
+ |
342 |
+- if (pci_get_drvdata(pdev) == NULL) { |
343 |
++ fw_dev = NULL; |
344 |
++ |
345 |
++ while (!ctrlfound && |
346 |
++ (fw_dev = pci_get_device(PCI_VENDOR_ID_RICOH, |
347 |
++ PCI_DEVICE_ID_RICOH_R5C832, fw_dev))) { |
348 |
++ if (PCI_SLOT(pdev->devfn) == PCI_SLOT(fw_dev->devfn) && |
349 |
++ pdev->bus == fw_dev->bus) { |
350 |
++ if (ricoh_mmc_disable(fw_dev) != 0) |
351 |
++ return -ENODEV; |
352 |
++ |
353 |
++ pci_set_drvdata(pdev, fw_dev); |
354 |
++ |
355 |
++ ++ctrlfound; |
356 |
++ } |
357 |
++ } |
358 |
++ |
359 |
++ if (!ctrlfound) { |
360 |
+ printk(KERN_WARNING DRIVER_NAME |
361 |
+ ": Main firewire function not found. Cannot disable controller.\n"); |
362 |
+ return -ENODEV; |
363 |
+@@ -132,7 +191,7 @@ static void __devexit ricoh_mmc_remove(struct pci_dev *pdev) |
364 |
+ pci_set_drvdata(pdev, NULL); |
365 |
+ } |
366 |
+ |
367 |
+-static int ricoh_mmc_suspend (struct pci_dev *pdev, pm_message_t state) |
368 |
++static int ricoh_mmc_suspend(struct pci_dev *pdev, pm_message_t state) |
369 |
+ { |
370 |
+ struct pci_dev *fw_dev = NULL; |
371 |
+ |
372 |
+@@ -146,7 +205,7 @@ static int ricoh_mmc_suspend (struct pci_dev *pdev, pm_message_t state) |
373 |
+ return 0; |
374 |
+ } |
375 |
+ |
376 |
+-static int ricoh_mmc_resume (struct pci_dev *pdev) |
377 |
++static int ricoh_mmc_resume(struct pci_dev *pdev) |
378 |
+ { |
379 |
+ struct pci_dev *fw_dev = NULL; |
380 |
+ |
381 |
+ |
382 |
|
383 |
-- |
384 |
gentoo-commits@l.g.o mailing list |