This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: PCI Ethernet card
- From: Eric Doenges <Eric dot Doenges at DynaPel dot de>
- To: Michael Anburaj <embeddedeng at hotmail dot com>
- Cc: gary at mlbassoc dot com, ecos-discuss at sources dot redhat dot com
- Date: Wed, 13 Aug 2003 10:11:35 +0200
- Subject: Re: [ECOS] PCI Ethernet card
- References: <Law15-F12BWDLGiWkgL000341c4@hotmail.com>
Michael Anburaj wrote:
I did this. Interrupt Status Register's bit 5 ( PUN/LinkChg- Packet
Underrun/Link Change ) was getting set each time after a packet was sent
through the RealTek 8139 NIC.
The status printed showed this (0x20 or 0x24),
diag_printf("rltk8139_deliver(%s): %04x\n", sc->dev_name, status);
Please let me know why this is happening? Is this a common thing or an
error condition.
I'd say that is an error condition. The way I understand the
documentation, PUN/LinkChg is set when either:
1. CAPR is written by the driver software even though the chip thinks
it's receive buffer is empty.
2. The link status changed.
Since the driver only touches CAPR when there is in fact a packet in the
receive buffer, I think you're getting frequent link status changes,
which is an error and explains why communication is not working. In a
previous life as a network administrator, we had problems with
auto-negotiation between ethernet NICs and 3Com switches that resulted
in frequent link up/link down events. With more modern equipment, these
problems went away (mostly). Some suggestions:
a. Check the value of the basic mode status register (0x64), the
auto-negotiation registers (0x66, 0x68, 0x6A), and the disconnect (0x6c)
and false carrier sense (0x6e) counters.
b. Force the 8139 to use a particular speed and duplex mode by setting
bits #13 and #8 in the basic mode control register (0x62) explicitely.
Don't forget to disable autonegotiation by clearing bit #12. (I'm
assuming that the EEPROM on your card selects autonegotiation by
default).
Apart from the specs (which gives very little details
about these registers & the 8139 chip operation), is there a better
document (or a detailed document for some other related chip)? If so,
please send me the URL for the same.
Well, if you manage to find better documentation than what RealTek
provides on their website, be sure to let me know ! The best
documentation I found for how the chip actually works was the original
OpenBSD driver (sorry, don't remember the URL) -- but that doesn't
handle that condition.
--
--------------------------------------------------------------------
| Eric Doenges | DynaPel Laboratories GmbH |
| Tel: +49 89 962428 23 | Fraunhoferstrasse 9/2 |
| Fax: +49 89 962428 90 | D - 85737 Ismaning, Germany |
--------------------------------------------------------------------
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss