linux-mips
[Top] [All Lists]

Re: CVS Update@-mips.org: linux

To: linux-mips@linux-mips.org
Subject: Re: CVS Update@-mips.org: linux
From: Ralf Baechle <ralf@linux-mips.org>
Date: Mon, 21 Apr 2003 18:00:31 +0200
In-reply-to: <20030421125733Z8225073-1272+1478@linux-mips.org>; from sjhill@linux-mips.org on Mon, Apr 21, 2003 at 01:57:28PM +0100
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20030421125733Z8225073-1272+1478@linux-mips.org>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.2.5.1i
On Mon, Apr 21, 2003 at 01:57:28PM +0100, sjhill@linux-mips.org wrote:

> Modified files:
>       drivers/net    : Tag: linux_2_4 au1000_eth.c 
> 
> Log message:
>       Reserve the ethernet port address, no it's actual virtual address.

That's a kludge on top of a kludge.  This driver like so many others is
mixing up all sort of concepts of I/O in a creative way to the point
where things coincidentally happen to work:

 - Addresses in au1x00_iflist are KSEG1 addresses that is virtual addresses.
   So that is a properly ioremapped address, right?  No ...
 - struct au1if only has an unsigned int.  Decide - if this is a virtual
   address then use unsigned long.
 - au1000_probe1 passes those addresses (with your patch: converted to a
   physical address) to request_resource.  Physical addresses and ports are
   different things.  You're using request_resource, so that address must
   be an I/O port, right?
 - ((unsigned long)AU1000_MAC1_ENABLE) - code like that is treating as
   a virtual address again ...

That's just inconsistenst and seems to have done without much understanding
the difference between memory mappend I/O and I/O ports.  I suggest to use
physical addresses and ioremap only and forget about that pre-8088 I/O port
legacy ...

  Ralf

<Prev in Thread] Current Thread [Next in Thread>