Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: zhuzhenhua <zzh.hust@gmail.com>
Cc: linux-mips <linux-mips@linux-mips.org>
Subject: Re: "Hw. address read/write mismap 0" or RTL8019 ethernet in linux
Date: Tue, 21 Feb 2006 11:44:18 +0000	[thread overview]
Message-ID: <1140522258.840.16.camel@localhost.localdomain> (raw)
In-Reply-To: <50c9a2250602202133g2e7350aesdaf1df810c90cef8@mail.gmail.com>

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.

  reply	other threads:[~2006-02-21 11:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-21  5:33 "Hw. address read/write mismap 0" or RTL8019 ethernet in linux zhuzhenhua
2006-02-21 11:44 ` Alan Cox [this message]
2006-02-22  0:17   ` zhuzhenhua

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=1140522258.840.16.camel@localhost.localdomain \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=linux-mips@linux-mips.org \
    --cc=zzh.hust@gmail.com \
    /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