Commit 41beabcb authored by Daniel Ritz's avatar Daniel Ritz Committed by Linus Torvalds

[PATCH] yenta: don't enable read prefetch on older o2 bridges.

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.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e05cb048
...@@ -129,9 +129,24 @@ static int o2micro_override(struct yenta_socket *socket) ...@@ -129,9 +129,24 @@ static int o2micro_override(struct yenta_socket *socket)
* ok to write to both registers on all O2 bridges. * ok to write to both registers on all O2 bridges.
* from Eric Still, 02Micro. * from Eric Still, 02Micro.
*/ */
u8 a, b;
if (PCI_FUNC(socket->dev->devfn) == 0) { if (PCI_FUNC(socket->dev->devfn) == 0) {
config_writeb(socket, 0x94, 0xCA); a = config_readb(socket, 0x94);
config_writeb(socket, 0xD4, 0xCA); 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; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment