Re: RealTek RTL8139 Fast Ethernet only works as a module?

From: James Fidell (james@cloud9.co.uk)
Date: Tue Feb 01 2000 - 19:08:31 EST


Following up to my own message...

> I've reinstalled the machine from scratch with RH6.1. With the default
> kernel, the 8139 works in 10Mb mode. 2.2.14 with the 8139 and eepro100
> drivers built as modules works, too. Same kernel, only change being those
> two drivers static-linked, doesn't work. I have no idea how to go about
> debugging this, so if anyone has advice, I'm listening :)

rtl8139-diag reveals the following. When the 8139 driver is a module:

rtl8139-diag.c:v1.01 4/30/99 Donald Becker (becker@cesdis.gsfc.nasa.gov)
Index #1: Found a RealTek RTL8139 adapter at 0xec00.
RealTek chip registers at 0xec00
 0x000: 394ce000 0000a200 00000000 00000000 00002000 00002000 00002000 00002000
 0x020: 03ef4000 03ef4600 03ef4c00 03ef5200 02980000 0d000000 0000fff0 0000c07f
 0x040: 73000400 00009c0e 810bbf58 00000000 002c1000 00000000 0000c108 00100000
 0x060: 1000000f 05e1782d 00000000 00000000 00000005 000f77c0 78fa8388 ad38de43.
  No interrupt sources are pending.
 The chip configuration is 0x10 0x2c, MII half-duplex mode.
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:E0:4C:39:00:A2.
  Configuration register 0/1 -- 0x2d / 0xc2.
 EEPROM active region checksum is 0974.
 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.

And when it's linked into the kernel:

rtl8139-diag.c:v1.01 4/30/99 Donald Becker (becker@cesdis.gsfc.nasa.gov)
Index #1: Found a RealTek RTL8139 adapter at 0xec00.
RealTek chip registers at 0xec00
 0x000: 394ce000 0000a200 00000000 00000000 00002000 00002000 00002000 00002000
 0x020: 03ef4000 03ef4600 03ef4c00 03ef5200 02980000 01000000 0000fff0 00000000
 0x040: 70000000 00000000 8d24efde 00000000 000f10c0 00000000 0000f108 00100000
 0x060: 1000000f 05e1782d 00000000 00000000 00000005 000f77c0 78fa8388 ad38de43.
  No interrupt sources are pending.
 The chip configuration is 0x10 0x0f, MII half-duplex mode.

I've chopped the rest because it's the same. The one important difference
I see here is

   The chip configuration is 0x10 0x2c, MII half-duplex mode.

for the module against

   The chip configuration is 0x10 0x0f, MII half-duplex mode.

for the static linked driver. I'm guessing that the difference is perhaps
due to some kind of initialisation error. I don't understand why it's
claiming to be MII though -- in both cases it's 10baseT and the link light
is on regardless of whether the network connection is actually working or
not.

James.

-- 
 "Yield to temptation --             | Consultancy: james@cloud9.co.uk 
  it may not pass your way again"    | http://www.cloud9.co.uk/james
                                     |
        - Lazarus Long               |              James Fidell

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Feb 07 2000 - 21:00:07 EST