Re: CVS Update@xxxxxxxxx: linux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux