problems with pcnet_cs and powerpc

Oliver Kurth <[email protected]> Mon, 30 Jun 2003 18:15:17 +0200
Newsgroups gmane.linux.pcmcia.devel
Message-ID <20030630161516.GF3297@nimrod>
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 get the card running, but only with that dirty hack, and I get another 
hardware address each time I reboot.

The driver for the PCMCIA slots is m8xx_pcmcia. Several other cards work
with the device.

The Linksys card works fine in my notebook (IBM A20m, Linux 2.4.21) [1]. 
So I suspect it's a problem of the powerpc host, and not the card.

Greetings,
Oliver

[1] after commenting 'include port 0xa00-0xaff' in 
/etc/pcmcia/config.opts

-- 
  .''`.
 : :' :    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/AGIUUmVSJkUeqxsRAsFGAJ4uN4JlAoua5YOWOG0/OR8s9BHjxQCdEmYc
GA/cjByFy/zo223boXSxmE4=
=EHt+
-----END PGP SIGNATURE-----