Re: problems with pcnet_cs and powerpc
Oliver Kurth <[email protected]> Tue, 1 Jul 2003 15:37:51 +0200
| Newsgroups | gmane.linux.pcmcia.devel |
|---|---|
| Message-ID | <20030701133751.GA9899@nimrod> |
On Mon, Jun 30, 2003 at 06:15:17PM +0200, Oliver Kurth wrote:
> Hello!
>
> I am trying to get a Linksys "EtherFast 10&100 + 56K PC Card (PCMLM56)"
> (0x0143, 0xc0ab) running on an ACS. This is an embedded device running
> Linux 2.4.17. The CPU is a MPC855T (ie. a powerpc). The problem is
> exactly here in pcnet_cs.c:
>
> static hw_info_t *get_dl10019(dev_link_t *link)
> {
> struct net_device *dev = link->priv;
> int i;
> u_char sum;
>
> for (sum = 0, i = 0x14; i < 0x1c; i++)
> sum += inb_p(dev->base_addr + i);
> if (sum != 0xff)
> return NULL;
> for (i = 0; i < 6; i++)
> dev->dev_addr[i] = inb_p(dev->base_addr + 0x14 + i);
> i = inb(dev->base_addr + 0x1f);
> return ((i == 0x91)||(i == 0x99)) ? &dl10022_info : &dl10019_info;
> }
>
> I uncommented the 'if (sum != 0xff)' part, because that check never
> passes. The reason is that every odd byte read with inb_p is wrong, and
> each time different when I reinsert the card or reboot. The _even_ bytes
> are correct when I compare them with the hardware address.
I solved that problem, it was in m8xx_pcmcia.c. I changed there in
m8xx_set_io_map() the line
if(io->flags & (MAP_16BIT | MAP_AUTOSZ))
to
if(io->flags & (MAP_16BIT))
I can now read the hardware address correctly - it seems that the card
has to be configured for 8bit access. But network does not work. If I
do a ping to another host connected with a cross link cable, I see
garbled packages with weird src and dst addresses with ethereal.
I am stuck...
I still believe it's a problem with m8xx_pcmcia, but I do not know
where. And it's hard to me to belive that the card is only 8bit.
Greetings,
Oliver
--
.''`.
: :' : Oliver Kurth [email protected]
`. `' Debian GNU/Linux maintainer - www.debian.org
`-
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQE/AY6vUmVSJkUeqxsRApB8AJ4iFEWUbQ2B8L19X2C9zrS5YaL06QCfdYtH 4m6QLB2lOddYDsPW7Ow/B1c= =9S/O -----END PGP SIGNATURE-----