[patch] Another read[bwl] and ioremap "fix"

Bill Wendling (wendling@ganymede.isdn.uiuc.edu)
Sat, 18 Dec 1999 19:03:22 -0600


--AhhlLboLdkugWU4S
Content-Type: text/plain; charset=us-ascii

Okay, so I've donned my asbestos suit in preparation for making yet
another fool of myself :).

Here's another patch. I think this one is correct, however I'm not so
sure about the changes starting at 251...

Bill

--AhhlLboLdkugWU4S
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=patch

diff -Naur linux-2.3.33/drivers/net/3c503.c linux/drivers/net/3c503.c
--- linux-2.3.33/drivers/net/3c503.c Thu Oct 28 18:13:20 1999
+++ linux/drivers/net/3c503.c Sat Dec 18 19:02:00 1999
@@ -103,7 +103,7 @@

for (addr = addrs; *addr; addr++) {
int i;
- unsigned int base_bits = readb(*addr);
+ unsigned int base_bits = isa_readb(*addr);
/* Find first set bit. */
for(i = 7; i >= 0; i--, base_bits >>= 1)
if (base_bits & 0x1)
@@ -251,18 +251,18 @@
{ /* Check the card's memory. */
unsigned long mem_base = dev->mem_start;
unsigned int test_val = 0xbbadf00d;
- writel(0xba5eba5e, mem_base);
+ isa_writel(0xba5eba5e, mem_base);
for (i = sizeof(test_val); i < EL2_MEMSIZE; i+=sizeof(test_val)) {
- writel(test_val, mem_base + i);
- if (readl(mem_base) != 0xba5eba5e
- || readl(mem_base + i) != test_val) {
+ isa_writel(test_val, mem_base + i);
+ if (isa_readl(mem_base) != 0xba5eba5e
+ || isa_readl(mem_base + i) != test_val) {
printk("3c503: memory failure or memory address conflict.\n");
dev->mem_start = 0;
ei_status.name = "3c503-PIO";
break;
}
test_val += 0x55555555;
- writel(0, mem_base + i);
+ isa_writel(0, mem_base + i);
}
}
#endif /* EL2MEMTEST */

--AhhlLboLdkugWU4S--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/