RTL8139A and Etherboot -- more info

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


On Mon, 11 Oct 1999, Bryan Clingman wrote:
> > 
> > On Mon, 11 Oct 1999, Bryan Clingman wrote:
> > 
> > > 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.
> > 
> > I'm uncertain of what rtl8139 code is in etherboot.
> 
> I don't know either.  I'd guess it's based on the linux code.  I'll
> check tonight.

It's definately based on the linux driver.  Looks like it's basically the same,
with some kernel routines hacked or just avoided (e.g. printk etc)

> 
> > 
> > > 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).
> > 
> > The new RTL8139 chips ('A' or 'B' suffix) overload the RxUnderrun bit.  It
> > now means LinkChange, and you must read register 0x74 to figure out what
> > happened.
> > 
> > > 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.
> > 
> > Please clarify this: does the board have only the RTL8139A chip, or does it
> > have a RTL8139 chip plus a second transceiver chip?
> 
> I'll look to double check later.  It's a bare-bones card.  Maybe I'm
> thinking of another card.

The card has a RTL8139A, serial EEPROM and a large plastic DIP.  I'm guessing
this provides the isolation.  Sorry, my mistake.  There is no MII interface.

> 
> > 
> > > -	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?
> > 
> > The rtl8139.c driver should always reset the card, even if it's in a weird
> > state.  The reset is only done in open(), not probe1(), since it shouldn't
> > be necessary to detect the card.
> > 
> > > -	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.
> > 
> > There are two enhanced chips, the common 'A' version that adds WOL and fixes
> > the "twister tuning" issue, and the new 'B' that adds CardBus support.  I've
> > only seen one prototype 'B' card, but I expect most new shipments with use
> > the latest version.

I'm not famililar with the 'twister tuning' issue.  I see reference to it in
the source though.

> > 
<snip>

I downloaded and compiled the diagnostic program.  This is with the
'patched' driver.  Since this is a netboot box I can't run the diag tools
without the netcard working. Here is it's output....

bash# ./rtl8139-diag  -a
rtl8139-diag.c:v1.01 4/30/99 Donald Becker (becker@cesdis.gsfc.nasa.gov)
Index #1: Found a RealTek RTL8139 adapter at 0xec00.
The RealTek chip appears to be active, so some registers will not be read.
To see all register values use the '-f' flag.
RealTek chip registers at 0xec00
 0x000: 7be80000 000093e5 80000000 00000000 9008a0ae 9008a0c2 9008a09a 9008a052
 0x020: 00090000 00090600 00090c00 00091200 00020000 0d0a0000 92bc92ac 0000c07f
 0x040: 73000400 00009c0e e854df73 00000000 002c10c6 00000000 0000c108 00100000
 0x060: 1000f00f 05e1782d 00000000 00000000 00000005 000f77c0 78fa8388 ad38de43.
  No interrupt sources are pending.
 The chip configuration is 0x10 0x2c, MII half-duplex mode.
bash# ./rtl8139-diag  -e
rtl8139-diag.c:v1.01 4/30/99 Donald Becker (becker@cesdis.gsfc.nasa.gov)
Index #1: Found a RealTek RTL8139 adapter at 0xec00.
Parsing the EEPROM of a RealTek chip:
  PCI IDs -- Vendor 0x10ec, Device 0x8139, Subsystem 0x10ec.
  PCI timer settings -- minimum grant 32, maximum latency 64.
  General purpose pins --  direction 0xf1  value 0x10.
  Station Address 00:00:E8:7B:E5:93.
  Configuration register 0/1 -- 0x0d / 0xc2.
 EEPROM active region checksum is 0a28.
bash# ./rtl8139-diag  -m
rtl8139-diag.c:v1.01 4/30/99 Donald Becker (becker@cesdis.gsfc.nasa.gov)
Index #1: Found a RealTek RTL8139 adapter at 0xec00.
 The RTL8139 does not use a MII transceiver.
 It does have internal MII-compatible registers:
   Basic mode control register   0x782d.
   Basic mode status register    0x1000.
   Autonegotiation Advertisement 0x05e1.
   Link Partner Ability register 0x0000.
   Autonegotiation expansion     0x0000.
   Disconnects                   0x0000.
   False carrier sense counter   0x0000.
   NWay test register            0x0005.
   Receive frame error count     0x0000.
bash# 

--
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.