#20 full/half-duplex negotiation fails

misc
closed-fixed
8139too (65)
6
2001-11-01
2001-04-19
No

Versions 0.9.16 and 0.9.15c (from stock Linus 2.4.3
kernel source) of
the 8139too driver fail to negotiate half/full duplex
operation when
talking to a Cisco 10/100 switch. (Cisco details, in
case you care:
model WS-C2924-XL, IOS version 11.2<8>SA2 ...) I tried
this with the
port on the switch configured both to be hardwired at
full-duplex
(i.e. the auto negotiation has been overidden and set
manually to full
duplex), and configured to be auto-negotiated.

The card itself is a no-name rtl8139A el-cheapo clone
from the
screwdriver shop down the road. (I know, I know. My
sysadmin has been
after me to get a "real" NIC (i.e. Intel) for quite
some time. But,
I'm cheap. Shoot me! :-)

In fact, I actually have no idea as to whether or not
the driver is
talking on the wire at full-duplex. I'm going by the
following messages
extracted from dmesg:

dmesg | grep -i eth

8139too Fast Ethernet driver 0.9.16
eth0: RealTek RTL8139 Fast Ethernet at 0xd0800000,
00:e0:7d:02:aa:36, IRQ 19
eth0: Identified 8139 chip type 'RTL-8139A'
eth0: Setting half-duplex based on auto-negotiated
partner ability 0000.

As requested in your doco, I compiled and ran your
rtl8139-diag code
with the following output:

`rtl8139-diag -mmaaavvveef > my-output-file.txt`
(N.B. with an 'N' appended to the options switch, as
documented in
your .txt file, the command whinged about not knowing
what the N
option did. I simply deleted it to produce the
following output.)

rtl8139-diag.c:v2.01 1/8/2001 Donald Becker
(becker@scyld.com)
http://www.scyld.com/diag/index.html
Index #1: Found a RealTek RTL8139 adapter at 0xe800.
RealTek chip registers at 0xe800
0x000: 027de000 000036aa 81000000 80000000 0008a08a
0008a08a 0008a08a 0008a08a
0x020: 0f816000 0f816600 0f816c00 0f817200 0f7b0000
0d0a0000 20e420d4 0000c07f
0x040: 70000600 0200f78e 4ce8ea3f 00000000 005c1000
00000000 0000c100 00100000
0x060: 2100f00f 05e1780d 00000000 00000000 00000000
000617c0 38fa8388 a5a5a5a5.
No interrupt sources are pending.
The chip configuration is 0x10 0x5c, MII full-duplex
mode.
EEPROM size test returned 6, 0x204a4 / 0x29696.
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 0xe1 value 0x21.
Station Address 00:E0:7D:02:AA:36.
Configuration register 0/1 -- 0x5c / 0xc2.
EEPROM active region checksum is 09dc.
EEPROM contents:
8129 10ec 8139 10ec 8139 4020 e121 e000
027d 36aa 5c10 f7c2 a5a5 a5a5 a5a5 a5a5
a5a5 a5a5 a5a5 a5a5 a5a5 a5a5 a5a5 a5a5
a5a5 a5a5 a5a5 a5a5 a5a5 a5a5 a5a5 a5a5
a5a5 a5a5 a5a5 a5a5 a5a5 a5a5 a5a5 a5a5
a5a5 a5a5 a5a5 a5a5 a5a5 a5a5 a5a5 a5a5
a5a5 a5a5 a5a5 a5a5 a5a5 a5a5 a5a5 a5a5
a5a5 a5a5 a5a5 a5a5 a5a5 a5a5 a5a5 a5a5
The word-wide EEPROM checksum is 0xd931.

Also as requested in your doco, here is the output from
`lspci -vvv`:

00:00.0 Host bridge: Intel Corporation 440BX/ZX -
82443BX/ZX Host bridge (rev 03)
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV-
VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B- ParErr-
DEVSEL=medium >TAbort- <TAbort- <MAbort+ >SERR- <PERR-
Latency: 32
Region 0: Memory at d0000000 (32-bit, prefetchable)
[size=32M]
Capabilities: [a0] AGP version 1.0
Status: RQ=31 SBA+ 64bit- FW- Rate=x1,x2
Command: RQ=0 SBA+ AGP+ 64bit- FW- Rate=x2

00:01.0 PCI bridge: Intel Corporation 440BX/ZX -
82443BX/ZX AGP bridge (rev 03) (prog-if 00 [Normal
decode])
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV-
VGASnoop- ParErr- Stepping- SERR+ FastB2B-
Status: Cap- 66Mhz+ UDF- FastB2B- ParErr-
DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 64
Bus: primary=00, secondary=01, subordinate=01,
sec-latency=32
I/O behind bridge: 0000f000-00000fff
Memory behind bridge: d4000000-d6ffffff
Prefetchable memory behind bridge: d2000000-d3ffffff
BridgeCtl: Parity- SERR- NoISA- VGA+ MAbort- >Reset-
FastB2B+

00:07.0 ISA bridge: Intel Corporation 82371AB PIIX4 ISA
(rev 02)
Control: I/O+ Mem+ BusMaster+ SpecCycle+ MemWINV-
VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr-
DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 0

00:07.1 IDE interface: Intel Corporation 82371AB PIIX4
IDE (rev 01) (prog-if 80 [Master])
Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV-
VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr-
DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 32
Region 4: I/O ports at f000 [size=16]

00:07.2 USB Controller: Intel Corporation 82371AB PIIX4
USB (rev 01) (prog-if 00 [UHCI])
Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV-
VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr-
DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 32
Interrupt: pin D routed to IRQ 19
Region 4: I/O ports at e000 [size=32]

00:07.3 Bridge: Intel Corporation 82371AB PIIX4 ACPI
(rev 02)
Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV-
VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr-
DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Interrupt: pin ? routed to IRQ 9

00:09.0 Multimedia audio controller: Ensoniq 5880
AudioPCI (rev 02)
Subsystem: Ensoniq: Unknown device 2003
Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV-
VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=slow
>TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 64 (3000ns min, 32000ns max)
Interrupt: pin A routed to IRQ 17
Region 0: I/O ports at e400 [size=64]
Capabilities: [dc] Power Management version 1
Flags: PMEClk- DSI+ D1- D2+ AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-

00:0b.0 Ethernet controller: Realtek Semiconductor Co.,
Ltd. RTL-8139 (rev 10)
Subsystem: Realtek Semiconductor Co., Ltd. RT8139
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV-
VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66Mhz- UDF- FastB2B+ ParErr-
DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 32 (8000ns min, 16000ns max)
Interrupt: pin A routed to IRQ 19
Region 0: I/O ports at e800 [size=256]
Region 1: Memory at d8001000 (32-bit,
non-prefetchable) [size=256]

00:0c.0 SCSI storage controller: Adaptec AHA-2940U2/W /
7890
Subsystem: Adaptec 2940U2W SCSI Controller
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV-
VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr-
DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 32 (9750ns min, 6250ns max), cache line size
08
Interrupt: pin A routed to IRQ 18
BIST result: 00
Region 0: I/O ports at ec00 [disabled] [size=256]
Region 1: Memory at d8000000 (64-bit,
non-prefetchable) [size=4K]
Expansion ROM at <unassigned> [disabled] [size=128K]
Capabilities: [dc] Power Management version 1
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-

01:00.0 VGA compatible controller: Matrox Graphics,
Inc. MGA G400 AGP (rev 04) (prog-if 00 [VGA])
Subsystem: Matrox Graphics, Inc. Millennium G400
MAX/Dual Head 32Mb
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV-
VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr-
DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 64 (4000ns min, 8000ns max), cache line size
08
Interrupt: pin A routed to IRQ 16
Region 0: Memory at d2000000 (32-bit, prefetchable)
[size=32M]
Region 1: Memory at d4000000 (32-bit,
non-prefetchable) [size=16K]
Region 2: Memory at d5000000 (32-bit,
non-prefetchable) [size=8M]
Expansion ROM at <unassigned> [disabled] [size=64K]
Capabilities: [dc] Power Management version 2
Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [f0] AGP version 2.0
Status: RQ=31 SBA+ 64bit- FW- Rate=x1,x2
Command: RQ=31 SBA+ AGP+ 64bit- FW- Rate=x2

If you are still reading this :-), I'm happy to try to
help by testing
against the problem switch, etc. etc. etc. Just e-mail
me as
frank@ned.dem.csiro.au

Hope this helps track down the bug!

Cheers,
Frank Horowitz

Discussion

  • Jeff Garzik

    Jeff Garzik - 2001-04-19
    • priority: 5 --> 6
    • assigned_to: nobody --> jgarzik
     
  • Jeff Garzik

    Jeff Garzik - 2001-05-07

    Logged In: YES
    user_id=17443

    This problem is fixed in the latest version of the driver. You
    can download the driver from the download section on this
    SourceForge web page.

     
  • Jeff Garzik

    Jeff Garzik - 2001-05-07
    • status: open --> closed-fixed
     
  • Frank Horowitz

    Frank Horowitz - 2001-05-08

    Logged In: YES
    user_id=9367

    Latest version of driver (patch; applied against stock
    0.9.16 source; is this the same as against code in Linus
    2.4.5.1 kernel referred to in your kernel-list message???)
    now returns message:
    "eth0: media is unconnected, link down, or incompatible
    connection"

    Looking at the code, this implies that the

    if (mii_reg5) {

    test (line 1360) is failing. This further implies that in
    u16 mii_reg5 = mdio_read(dev, tp->phys[0], 5);
    (line 1354) the mdio_read call is returning zero.

    Reading through that code, (and given that this is not an
    8129, so I assume that the
    #ifdef CONFIG_8139TOO_8129
    (line 1188) code path is not taken, that further implies
    either that the fragment:
    location < 8 && mii_2_8139_map[location]
    (line 1184) is testing out to zero, *OR* that the test
    if (phy_id > 31) {
    (line 1182) is failing, causing the code to fall through
    with retval =0 (from above).

    Since I don't know the register contents of this chip, I'm
    at a loss. Donal Becker's website is also not responding
    right now, so I can't even see what his code does here.

    All I can say for sure is that neither of the "media is
    unconnected, link down" cases fits my situation, and I don't
    believe that my connection is incompatible. (This very
    message is being transmitted over the connection so
    labelled.) This could simply be an erroneous error
    message....

    I'm still willing to help track this down (should I compile
    this module enabling the debugging messages via #define
    RTL8139_DEBUG 1? Where do those messages show up? syslog?).
    I'm open to advice.

    (I should mention that my network admin is willing to spring
    for an Intel NIC for this machine, which solves this problem
    for me, but not for you or other rtl8139 users out there...
    A quick response from you will forestall that, for a while,
    but I kind of suspect that my network admin will win the day
    on this one in the short-to-medium term future...)

    Cheers (and hope that the second pair of eyes looking
    through the code path above helps somewhat)!

    Frank Horowitz

    Cheers

     
  • Frank Horowitz

    Frank Horowitz - 2001-05-08

    Logged In: YES
    user_id=9367

    Dammit, forgot to mention in both of my posts. The machine
    in question is an SMP box, in case it matters...

    Cheers,
    Frank Horowitz

     
  • Frank Horowitz

    Frank Horowitz - 2001-05-08
    • status: closed-fixed --> open-fixed
     
  • Scott Kriefall

    Scott Kriefall - 2001-05-10

    Logged In: YES
    user_id=194436

    I get the same "eth1: media is unconnected, link down, or incompatible connection" error with the 8139B
    card that I just installed in my box. This system is using kernel 2.4.4, patched with version 0.9.17 of the
    8139too driver.

    In my case, I'm trying to connect the card to a 3Com HomeConnect (aka "Sharkfin") cable modem. Could
    this be another occurrence of the same issue?

    This is the output from rtl8139-diag:

    rtl8139-diag.c:v2.01 1/8/2001 Donald Becker (becker@scyld.com)
    http://www.scyld.com/diag/index.html
    Index #1: Found a RealTek RTL8139 adapter at 0xec00.
    RealTek chip registers at 0xec00
    0x000: d3334000 0000f023 00000000 00000000 00002000 00002000 00002000 00002000
    0x020: 0e758000 0e758600 0e758c00 0e759200 09a70000 0d000000 0000fff0 0000c07f
    0x040: 78000600 0200f780 9338f4f3 00000000 000d1000 00000000 0080c108 00100000
    0x060: 1000000f 05e1782d 00000000 00000000 00000005 000f77c0 58fab388 ad38d843.
    No interrupt sources are pending.
    The chip configuration is 0x10 0x0d, MII half-duplex mode.
    EEPROM size test returned 6, 0x204a6 / 0.
    Parsing the EEPROM of a RealTek chip:
    PCI IDs -- Vendor 0x10ec, Device 0x8139, Subsystem 0x4033.
    PCI timer settings -- minimum grant 32, maximum latency 64.
    General purpose pins -- direction 0xe1 value 0x10.
    Station Address 00:40:33:D3:23:F0.
    Configuration register 0/1 -- 0x0d / 0xc2.
    EEPROM active region checksum is 08c6.
    EEPROM contents:
    8129 10ec 8139 4033 1360 4020 e110 4000
    d333 f023 0d10 f7c2 8001 b388 58fa 0708
    d843 a438 d843 a438 d843 a438 d843 a438
    0000 0000 0000 0000 0000 0000 0000 0000
    0000 0000 0000 0000 0000 0000 0000 0000
    0000 0000 0000 0000 0000 0000 0000 0000
    0000 0000 0000 0000 0000 0000 0000 0000
    0000 0000 0000 0000 0000 0000 0000 0000
    The word-wide EEPROM checksum is 0x15b0.

     
  • Scott Kriefall

    Scott Kriefall - 2001-05-10

    Logged In: YES
    user_id=194436

    I get the same "eth1: media is unconnected, link down, or
    incompatible connection" error with the 8139B card that I
    just installed in my box. This system is using kernel
    2.4.4, patched with version 0.9.17 of the 8139too driver.

    In my case, I'm trying to connect the card to a 3Com
    HomeConnect (aka "Sharkfin") cable modem. Could this be
    another occurrence of the same issue?

    This is the output from rtl8139-diag:

    rtl8139-diag.c:v2.01 1/8/2001 Donald Becker
    (becker@scyld.com)
    http://www.scyld.com/diag/index.html
    Index #1: Found a RealTek RTL8139 adapter at 0xec00.
    RealTek chip registers at 0xec00
    0x000: d3334000 0000f023 00000000 00000000 00002000
    00002000 00002000 00002000
    0x020: 0e758000 0e758600 0e758c00 0e759200 09a70000
    0d000000 0000fff0 0000c07f
    0x040: 78000600 0200f780 9338f4f3 00000000 000d1000
    00000000 0080c108 00100000
    0x060: 1000000f 05e1782d 00000000 00000000 00000005
    000f77c0 58fab388 ad38d843.
    No interrupt sources are pending.
    The chip configuration is 0x10 0x0d, MII half-duplex mode.
    EEPROM size test returned 6, 0x204a6 / 0.
    Parsing the EEPROM of a RealTek chip:
    PCI IDs -- Vendor 0x10ec, Device 0x8139, Subsystem 0x4033.
    PCI timer settings -- minimum grant 32, maximum latency
    64.
    General purpose pins -- direction 0xe1 value 0x10.
    Station Address 00:40:33:D3:23:F0.
    Configuration register 0/1 -- 0x0d / 0xc2.
    EEPROM active region checksum is 08c6.
    EEPROM contents:
    8129 10ec 8139 4033 1360 4020 e110 4000
    d333 f023 0d10 f7c2 8001 b388 58fa 0708
    d843 a438 d843 a438 d843 a438 d843 a438
    0000 0000 0000 0000 0000 0000 0000 0000
    0000 0000 0000 0000 0000 0000 0000 0000
    0000 0000 0000 0000 0000 0000 0000 0000
    0000 0000 0000 0000 0000 0000 0000 0000
    0000 0000 0000 0000 0000 0000 0000 0000
    The word-wide EEPROM checksum is 0x15b0.

     
  • Jeff Garzik

    Jeff Garzik - 2001-11-01
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks