RTL8139A and Etherboot

Bryan Clingman bac@realtimeweb.com
Mon Oct 11 11:22:04 1999


I have a 'noname' RTL8139A 10/100 PCI card that I'm using in a diskless Linux
box.  The system boots off of (for now) a floppy containing an etherboot-4.2.9
rom image that tftp's a kernel containing the RTL8139A driver.  I'm using
driver 1.08a in a 2.2.12 kernel.  This is on a 10mbps network, _not_ 100.

When the kernel gets ready to NFS mount it's root filesystem, I get a several
kernel messages indicating

"Oversized Ethernet frame, status XXXXXXX"

If I increase the debugging level, I get

"eth0: Abnormal interrupt, status 0x00000020"

and the above message.  (This is an RxUnderrun status BTW).  These messages
repeat with no effective network usage. (i.e. system won't finish booting).

When the card initializes, I get:

"eth0: Setting half-duplex based on auto-negotiated partner ability 0000"

After a couple of tries at debugging, I decided to comment out the check for an
8139 in mdio_read(), to try to get a value other than 0000 returned.  When I
did this, the card worked fine!!!!!  The system finished booting with no more
errors????  The mdio_read() function still returned 0000.  I double checked,
it's an 8139A with nothing else but the tranceiver on board.

Here's my $0.02 at why this is happening.....

-	Could etherboot be leaving the card in an 8129 "emulation" mode and not
resetting the card?  If this is the case, who should reset the card?  Etherboot
or rtl8139.c?

-	Is this just something to do with the RTL8139A?  I don't see anything
mentioned about it.  Maybe it's a new version of the silicon without a new PCI
ID.

I'm willing to try a few strokes at debugging this problem.  The system is
currently waiting for more hardware to arrive, so I'm in a wait state.

Here's my patch to the driver....

--- rtl8139.c	Fri Oct  8 22:03:41 1999
+++ /home/bryan/rtl8139.c	Fri Oct  8 20:44:03 1999
@@ -626,10 +626,10 @@
 	int retval = 0;
 	int i;
 
-//	if (phy_id > 31) {	/* Really a 8139.  Use internal registers. */
-//		return location < 8 && mii_2_8139_map[location] ?
-//			inw(dev->base_addr + mii_2_8139_map[location]) : 0;
-//	}
+	if (phy_id > 31) {	/* Really a 8139.  Use internal registers. */
+		return location < 8 && mii_2_8139_map[location] ?
+			inw(dev->base_addr + mii_2_8139_map[location]) : 0;
+	}
 	mdio_sync(mdio_addr);
 	/* Shift the read command bits out. */
 	for (i = 15; i >= 0; i--) {


--
Bryan Clingman ( bac@realtimeweb.com )
 | To unsubscribe, send mail to Majordomo@cesdis.gsfc.nasa.gov, and within the
 |  body of the mail, include only the text:
 |   unsubscribe this-list-name youraddress@wherever.org
 | You will be unsubscribed as speedily as possible.