Commit c44fec11 authored by Al Viro's avatar Al Viro Committed by Linus Torvalds

[PATCH] remove ISA legacy functions: drivers/net/lance.c

switch to ioremap()
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent b336cea3
...@@ -464,20 +464,25 @@ static int __init lance_probe1(struct net_device *dev, int ioaddr, int irq, int ...@@ -464,20 +464,25 @@ static int __init lance_probe1(struct net_device *dev, int ioaddr, int irq, int
static int did_version; /* Already printed version info. */ static int did_version; /* Already printed version info. */
unsigned long flags; unsigned long flags;
int err = -ENOMEM; int err = -ENOMEM;
void __iomem *bios;
/* First we look for special cases. /* First we look for special cases.
Check for HP's on-board ethernet by looking for 'HP' in the BIOS. Check for HP's on-board ethernet by looking for 'HP' in the BIOS.
There are two HP versions, check the BIOS for the configuration port. There are two HP versions, check the BIOS for the configuration port.
This method provided by L. Julliard, Laurent_Julliard@grenoble.hp.com. This method provided by L. Julliard, Laurent_Julliard@grenoble.hp.com.
*/ */
if (isa_readw(0x000f0102) == 0x5048) { bios = ioremap(0xf00f0, 0x14);
if (!bios)
return -ENOMEM;
if (readw(bios + 0x12) == 0x5048) {
static const short ioaddr_table[] = { 0x300, 0x320, 0x340, 0x360}; static const short ioaddr_table[] = { 0x300, 0x320, 0x340, 0x360};
int hp_port = (isa_readl(0x000f00f1) & 1) ? 0x499 : 0x99; int hp_port = (readl(bios + 1) & 1) ? 0x499 : 0x99;
/* We can have boards other than the built-in! Verify this is on-board. */ /* We can have boards other than the built-in! Verify this is on-board. */
if ((inb(hp_port) & 0xc0) == 0x80 if ((inb(hp_port) & 0xc0) == 0x80
&& ioaddr_table[inb(hp_port) & 3] == ioaddr) && ioaddr_table[inb(hp_port) & 3] == ioaddr)
hp_builtin = hp_port; hp_builtin = hp_port;
} }
iounmap(bios);
/* We also recognize the HP Vectra on-board here, but check below. */ /* We also recognize the HP Vectra on-board here, but check below. */
hpJ2405A = (inb(ioaddr) == 0x08 && inb(ioaddr+1) == 0x00 hpJ2405A = (inb(ioaddr) == 0x08 && inb(ioaddr+1) == 0x00
&& inb(ioaddr+2) == 0x09); && inb(ioaddr+2) == 0x09);
......
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