[PATCH] yenta: don't enable read prefetch on older o2 bridges.
Daniel Ritz
daniel.ritz at gmx.ch
Tue Oct 26 18:46:24 EDT 2004
hi
it turns out that just blindly enabling read prefetch is wrong for the
older (and buggy) oz6833 bridge. fixed in the attached patch.
- don't touch the oz6832/6833
- more verbose
- only set the read prefetch and the write burst bits
it broke on some old laptop with a cardbus tulip.
please apply.
rgds
-daniel
--- 1.4/drivers/pcmcia/o2micro.h 2004-06-21 03:19:18 +02:00
+++ edited/drivers/pcmcia/o2micro.h 2004-10-27 00:36:20 +02:00
@@ -129,9 +129,24 @@
* ok to write to both registers on all O2 bridges.
* from Eric Still, 02Micro.
*/
+ u8 a, b;
+
if (PCI_FUNC(socket->dev->devfn) == 0) {
- config_writeb(socket, 0x94, 0xCA);
- config_writeb(socket, 0xD4, 0xCA);
+ a = config_readb(socket, 0x94);
+ b = config_readb(socket, 0xD4);
+
+ printk(KERN_INFO "Yenta O2: res at 0x94/0xD4: %02x/%02x\n", a, b);
+
+ switch (socket->dev->device) {
+ case PCI_DEVICE_ID_O2_6832:
+ printk(KERN_INFO "Yenta O2: old bridge, not enabling read prefetch / write burst\n");
+ break;
+
+ default:
+ printk(KERN_INFO "Yenta O2: enabling read prefetch/write burst\n");
+ config_writeb(socket, 0x94, a | 0x0a);
+ config_writeb(socket, 0xD4, b | 0x0a);
+ }
}
return 0;
More information about the linux-pcmcia
mailing list