linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: Andrew Morton <akpm@osdl.org>
Cc: Al Viro <viro@ftp.linux.org.uk>,
	linux-kernel@vger.kernel.org, jgarzik@pobox.com,
	netdev@vger.kernel.org
Subject: [7/10] remove ISA legacy functions: drivers/net/lance.c
Date: Thu, 26 Jan 2006 23:54:40 +0100	[thread overview]
Message-ID: <20060126225439.GL3668@stusta.de> (raw)
In-Reply-To: <20060126223126.GD3668@stusta.de>

From: Al Viro <viro@zeniv.linux.org.uk>

switch to ioremap()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

 drivers/net/lance.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

aadde842b4976445ac101c6ed04986382988d035
diff --git a/drivers/net/lance.c b/drivers/net/lance.c
--- a/drivers/net/lance.c
+++ b/drivers/net/lance.c
@@ -464,20 +464,25 @@ static int __init lance_probe1(struct ne
 	static int did_version;			/* Already printed version info. */
 	unsigned long flags;
 	int err = -ENOMEM;
+	void __iomem *bios;
 
 	/* First we look for special cases.
 	   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.
 	   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};
-		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. */
 		if ((inb(hp_port) & 0xc0) == 0x80
 			&& ioaddr_table[inb(hp_port) & 3] == ioaddr)
 			hp_builtin = hp_port;
 	}
+	iounmap(bios);
 	/* We also recognize the HP Vectra on-board here, but check below. */
 	hpJ2405A = (inb(ioaddr) == 0x08 && inb(ioaddr+1) == 0x00
 				&& inb(ioaddr+2) == 0x09);


  parent reply	other threads:[~2006-01-26 22:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-26 22:31 [2.6 patch: 0/10] remove ISA legacy functions Adrian Bunk
2006-01-26 22:45 ` [1/10] remove ISA legacy functions: drivers/char/toshiba.c Adrian Bunk
2006-01-26 22:46 ` [2/10] remove ISA legacy functions: drivers/net/arcnet/ Adrian Bunk
2006-01-26 22:48 ` [3/10] remove ISA legacy functions: drivers/scsi/g_NCR5380.c Adrian Bunk
2006-01-26 22:49 ` [4/10] remove ISA legacy functions: drivers/scsi/in2000.c Adrian Bunk
2006-01-26 22:51 ` [5/10] remove ISA legacy functions: drivers/net/hp-plus.c Adrian Bunk
2006-01-26 22:53 ` [6/10] remove ISA legacy functions: drivers/net/hp100.c Adrian Bunk
2006-01-26 22:54 ` Adrian Bunk [this message]
2006-01-26 22:56 ` [8/10] remove ISA legacy functions: remove the helpers Adrian Bunk
2006-01-26 22:57 ` [9/10] remove ISA legacy functions: remove documentation Adrian Bunk
2006-01-26 22:57 ` [10/10] remove ISA legacy functions: only 9 patches Adrian Bunk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060126225439.GL3668@stusta.de \
    --to=bunk@stusta.de \
    --cc=akpm@osdl.org \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=viro@ftp.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).