Linux MIPS Architecture development
 help / color / mirror / Atom feed
* "Hw. address read/write mismap 0" or RTL8019 ethernet in linux
@ 2006-02-21  5:33 zhuzhenhua
  2006-02-21 11:44 ` Alan Cox
  0 siblings, 1 reply; 3+ messages in thread
From: zhuzhenhua @ 2006-02-21  5:33 UTC (permalink / raw)
  To: linux-mips

i want to add a RTL8019 ethernet driver for my board, when i run the
linux, at the init of ethernet, it get

eth0: trigger_send() called with the transmitter busy.
.<6>NETDEV WATCHDOG: eth0: transmit timed out
Hw. address read/write mismap 0
Hw. address read/write mismap 1
Hw. address read/write mismap 2
Hw. address read/write mismap 3
Hw. address read/write mismap 4
Hw. address read/write mismap 5

then i check the code and find it's in 8390.c, caused by uncorrect
write of MAC addr, and now i repalce all the inb,outb,inb_p, outb_p
with get_reg and put_reg in the 8390.c.as follow:

static unsigned char get_reg (unsigned int regno)
{
	return (*(volatile unsigned char *) regno);
}

static void put_reg (unsigned int regno, unsigned char val)
{
	*(volatile unsigned char *) regno = val;
}

 it can run over t he ethernet init, and it also can mount nfs root
fs, it can ping and responding to ping, and also can do copy,delete in
the nfs root.
 but when i run  application in nfs root, it get message as follow,
and hang on it
"nfs: server 192.168.81.142 not responding, still trying"

does someone have any idea of this situation?

thanks for any hints

Best regards

zhuzhenhua

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: "Hw. address read/write mismap 0" or RTL8019 ethernet in linux
  2006-02-21  5:33 "Hw. address read/write mismap 0" or RTL8019 ethernet in linux zhuzhenhua
@ 2006-02-21 11:44 ` Alan Cox
  2006-02-22  0:17   ` zhuzhenhua
  0 siblings, 1 reply; 3+ messages in thread
From: Alan Cox @ 2006-02-21 11:44 UTC (permalink / raw)
  To: zhuzhenhua; +Cc: linux-mips

On Maw, 2006-02-21 at 13:33 +0800, zhuzhenhua wrote:
> then i check the code and find it's in 8390.c, caused by uncorrect
> write of MAC addr, and now i repalce all the inb,outb,inb_p, outb_p
> with get_reg and put_reg in the 8390.c.as follow:
> 
> static unsigned char get_reg (unsigned int regno)
> {
> 	return (*(volatile unsigned char *) regno);
> }
> 
> static void put_reg (unsigned int regno, unsigned char val)
> {
> 	*(volatile unsigned char *) regno = val;
> }

Should be

	return readb(regno);

and

	writeb(val, regno)

if regno holds the ioremap result of the memory mapped address of the
8019. Right now 8390.c assumes PIO mappings and you hardware appears to
be MMIO ?

> does someone have any idea of this situation?

If the card is MMIO then make sure you are using readb/writeb and
ioremap properly, otherwise you may get cache consistency and other
strange errors.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: "Hw. address read/write mismap 0" or RTL8019 ethernet in linux
  2006-02-21 11:44 ` Alan Cox
@ 2006-02-22  0:17   ` zhuzhenhua
  0 siblings, 0 replies; 3+ messages in thread
From: zhuzhenhua @ 2006-02-22  0:17 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-mips

On 2/21/06, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> On Maw, 2006-02-21 at 13:33 +0800, zhuzhenhua wrote:
> > then i check the code and find it's in 8390.c, caused by uncorrect
> > write of MAC addr, and now i repalce all the inb,outb,inb_p, outb_p
> > with get_reg and put_reg in the 8390.c.as follow:
> >
> > static unsigned char get_reg (unsigned int regno)
> > {
> >       return (*(volatile unsigned char *) regno);
> > }
> >
> > static void put_reg (unsigned int regno, unsigned char val)
> > {
> >       *(volatile unsigned char *) regno = val;
> > }
>
> Should be
>
>         return readb(regno);
>
> and
>
>         writeb(val, regno)
>
> if regno holds the ioremap result of the memory mapped address of the
> 8019. Right now 8390.c assumes PIO mappings and you hardware appears to
> be MMIO ?
>
> > does someone have any idea of this situation?
>
> If the card is MMIO then make sure you are using readb/writeb and
> ioremap properly, otherwise you may get cache consistency and other
> strange errors.
>
>

now i resolve the "Hw. address read/write mismap 0' by
set_io_port_base(0) in my board setup function. and nfs rootfs can
mounted and can copy/delete, also can run the helloworld app in nfs
rootfs, but if i run some big application or something like vi, it
will still get
"nfs: server 192.168.81.142 not responding, still trying"

what may cause this message? ethernet driver? or kernel uncorrect config?

thanks for any hints

Best Regards

zhuzhenhua

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-02-22  0:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-21  5:33 "Hw. address read/write mismap 0" or RTL8019 ethernet in linux zhuzhenhua
2006-02-21 11:44 ` Alan Cox
2006-02-22  0:17   ` zhuzhenhua

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox