2001-02-05 14:21:37

by Maciej W. Rozycki

[permalink] [raw]
Subject: [patch] 2.4.1-ac1: W89c840 -- printout inconsistency?

Hi,

While working on the CPU capabilities changes I noticed the W89c840
driver prints a different cache alignment from what it really sets. It's
possible that it's the intended behaviour, but I really doubt it. I don't
have such a board and I haven't ever used the driver.

The following patch fixes it.

Maciej

--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: [email protected], PGP key available +

patch-2.4.1-ac1-winbond-0
diff -up --recursive --new-file linux-2.4.1-ac1.macro/drivers/net/winbond-840.c linux-2.4.1-ac1/drivers/net/winbond-840.c
--- linux-2.4.1-ac1.macro/drivers/net/winbond-840.c Sat Feb 3 12:16:41 2001
+++ linux-2.4.1-ac1/drivers/net/winbond-840.c Sun Feb 4 17:12:28 2001
@@ -832,7 +832,7 @@ static void init_registers(struct net_de
if (x86 <= 4)
printk(KERN_INFO "%s: This is a 386/486 PCI system, setting cache "
"alignment to %x.\n", dev->name,
- (x86 <= 4 ? 0x4810 : 0x8010));
+ (x86 <= 4 ? 0x4810 : 0xE010));
#endif
#else
writel(0xE010, ioaddr + PCIBusCfg);


2001-02-05 14:51:57

by Francois Romieu

[permalink] [raw]
Subject: Re: [patch] 2.4.1-ac1: W89c840 -- printout inconsistency?

Maciej W. Rozycki <[email protected]> ?crit :
[...]
> While working on the CPU capabilities changes I noticed the W89c840
> driver prints a different cache alignment from what it really sets. It's
> possible that it's the intended behaviour, but I really doubt it. I don't
> have such a board and I haven't ever used the driver.

Wouldn't this ("work around broken '486 PCI boards") fit better in
drivers/pci/quirks.c, somewhere around pci_fixup_device ?

--
Ueimor

2001-02-05 16:18:53

by Maciej W. Rozycki

[permalink] [raw]
Subject: Re: [patch] 2.4.1-ac1: W89c840 -- printout inconsistency?

On Mon, 5 Feb 2001, Francois Romieu wrote:

> Wouldn't this ("work around broken '486 PCI boards") fit better in
> drivers/pci/quirks.c, somewhere around pci_fixup_device ?

I thinks it's already in the right place. The workaround is
driver-specific. Only generic or bridge-specific code goes into
drivers/pci/quirks.c.

--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: [email protected], PGP key available +