Project

General

Profile

Bug #7532

SG-1000 autonegotiation 10baseT speed and duplex

Added by Constantine Kormashev about 1 year ago. Updated 2 days ago.

Status:
New
Priority:
High
Category:
Interfaces
Target version:
Start date:
05/09/2017
Due date:
% Done:

0%

Affected Version:
2.4.x
Affected Architecture:
SG-1000

Description

During work on https://customercare.netgate.com/requests/show/index/id/19663 10baseT speed and duplex issue was found.
SG-1000 can not correctly negotiate speed and duplex if on another side link is 10FD and can not correctly define own link condition if one is in 10FD. See examples below. If link is 100FD or auto there are not any issues.

10FD
FastEthernet0/16 is down, line protocol is down (notconnect)
Hardware is Fast Ethernet, address is 0024.c4f0.5512 (bia 0024.c4f0.5512)
MTU 1998 bytes, BW 10000 Kbit/sec, DLY 1000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 10Mb/s, media type is 10/100BaseTX
input flow-control is off, output flow-control is unsupported
ARP type: ARPA, ARP Timeout 04:00:00
Last input 2w3d, output 00:06:26, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
1275 packets input, 99743 bytes, 0 no buffer
Received 1274 broadcasts (1159 multicasts)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog, 1159 multicast, 0 pause input
0 input packets with dribble condition detected
4700 packets output, 351100 bytes, 0 underruns
0 output errors, 0 collisions, 1 interface resets
0 unknown protocol drops
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier, 0 pause output
0 output buffer failures, 0 output buffers swapped out

10FD
cpsw0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8000b<RXCSUM,TXCSUM,VLAN_MTU,LINKSTATE>
ether 68:9e:19:8c:08:6e
inet6 fe80::6a9e:19ff:fe8c:86e%cpsw0 prefixlen 64 scopeid 0x1
media: Ethernet 10baseT/UTP <full-duplex>
status: no carrier
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>

Auto
FastEthernet0/16 is up, line protocol is up (connected)
Hardware is Fast Ethernet, address is 0024.c4f0.5512 (bia 0024.c4f0.5512)
MTU 1998 bytes, BW 10000 Kbit/sec, DLY 1000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Half-duplex, 10Mb/s, media type is 10/100BaseTX
input flow-control is off, output flow-control is unsupported
ARP type: ARPA, ARP Timeout 04:00:00
Last input 2w3d, output 00:00:01, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
1275 packets input, 99743 bytes, 0 no buffer
Received 1274 broadcasts (1159 multicasts)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog, 1159 multicast, 0 pause input
0 input packets with dribble condition detected
4704 packets output, 351376 bytes, 0 underruns
0 output errors, 0 collisions, 1 interface resets
0 unknown protocol drops
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier, 0 pause output

10FD
cpsw0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8000b<RXCSUM,TXCSUM,VLAN_MTU,LINKSTATE>
ether 68:9e:19:8c:08:6e
inet6 fe80::6a9e:19ff:fe8c:86e%cpsw0 prefixlen 64 scopeid 0x1
inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255
media: Ethernet 10baseT/UTP <full-duplex>
status: active
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>

10FD
FastEthernet0/16 is up, line protocol is up (connected)
Hardware is Fast Ethernet, address is 0024.c4f0.5512 (bia 0024.c4f0.5512)
MTU 1998 bytes, BW 10000 Kbit/sec, DLY 1000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 10Mb/s, media type is 10/100BaseTX
input flow-control is off, output flow-control is unsupported
ARP type: ARPA, ARP Timeout 04:00:00
Last input 2w3d, output 00:00:00, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
1428 packets input, 111343 bytes, 0 no buffer
Received 1279 broadcasts (1159 multicasts)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog, 1159 multicast, 0 pause input
0 input packets with dribble condition detected
5431 packets output, 425207 bytes, 0 underruns
0 output errors, 0 collisions, 2 interface resets
0 unknown protocol drops
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier, 0 pause output
0 output buffer failures, 0 output buffers swapped out

Auto
cpsw0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8000b<RXCSUM,TXCSUM,VLAN_MTU,LINKSTATE>
ether 68:9e:19:8c:08:6e
inet6 fe80::6a9e:19ff:fe8c:86e%cpsw0 prefixlen 64 scopeid 0x1
inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255
media: Ethernet autoselect (10baseT/UTP <half-duplex>)
status: active
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>

test.txt Magnifier - tests details (7.05 KB) Constantine Kormashev, 10/19/2017 02:43 AM

History

#1 Updated by Luiz Souza 11 months ago

  • Target version changed from 2.4.0 to 2.4.1

#2 Updated by Jim Pingle 9 months ago

  • Target version changed from 2.4.1 to 2.4.2

Moving target to 2.4.2 as we need 2.4.1 sooner than anticipated.

#3 Updated by Constantine Kormashev 9 months ago

During investigation 27001 found some important things:
  1. Looks like the issue affects 100BaseTX
  2. Changing from auto to manual (100BaseTX) does not make real connection changes until cable is unpluged/pluged, although I can see a proper information in ifconfig output (like media manual select etc)

Test details in attach.

#4 Updated by Jim Pingle 9 months ago

  • Target version changed from 2.4.2 to 2.4.3

#5 Updated by Constantine Kormashev 8 months ago

10FD still does not work.
Steve found that 100FD works with crossover. I checked manual 100FD on both sides with crossover, all works fine. That means something wrong with AutoMDIX when autonegotiaition disabled.
10FD shows links in up state, but IP does not work ping: sendto: Host is down, no DHCP, etc, after changing back on 100FD IP works without issues.

#6 Updated by Dmitry Vakhrushev 5 months ago

  • Assignee changed from Luiz Souza to Dmitry Vakhrushev
  • Affected Version changed from 2.4 to 2.4.x

#7 Updated by Jim Pingle 4 months ago

  • Target version changed from 2.4.3 to 2.4.4

#8 Updated by Dmitry Vakhrushev 14 days ago

Expected solution is not appropriate.
I thought that part of errata KSZ9031 (1G PHY chip which used in SG-1000) help us on this issue.
But these changes were present in the driver code.

I'll test with (MDI/MDI-X) with cross pairs of wires on cable.
I haven't looked before, I'll look at Register 1Ch bit 6 in driver code, which is responsible for Auto MDI/MID-X.

#9 Updated by Dmitry Vakhrushev 14 days ago

Looked at datasheet
p.33 in the description of bit 12 of Register 0h – Basic Control, found that:

1 = Enable auto-negotiation process
0 = Disable auto-negotiation process
If enabled, auto-negotiation result overrides settings
in Reg. 0.13, 0.8 and 0.6.
>> If disabled, Auto MDI-X is also automatically disabled.
>> Use Register 1Ch to set MDI/MDI-X.

seems we need switch on this bit after turn on and off the auto-negotiation process.

I'll look at this at home later.

#10 Updated by Steve Wheeler 2 days ago

Testing this further I found that with the SG-1000 port set to auto it establishes a link to a switch port set to 10Mbps but always at half duplex. This is confirmed by the output of both ifconfig and etherswitchcfg as well as the link switch.

Running a packet capture on the SG-1000 interface shows it can see traffic arriving and is attempting to send traffic. However a pcap on a switch mirror port shows nothing it sends ever reaches the wire.

Also available in: Atom PDF