fail to config net phy speed

Bug #1956294 reported by Fred Kimmy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kunpeng920
Incomplete
Undecided
Ike Panhc
Ubuntu-20.04
Incomplete
Undecided
Ike Panhc
Ubuntu-20.04-hwe
Fix Released
Undecided
Unassigned
Upstream-kernel
Fix Released
Undecided
Unassigned

Bug Description

[Bug Description]
config net phy 50M speed. it print "annot advertise speed 50 "

[Steps to Reproduce]
1)
estuary:/$ ethtool -s eth0 speed 50
Cannot advertise speed 50
estuary:/$ ethtool -a eth0
Pause parameters for eth0:
Autonegotiate: on
RX: on
TX: on
RX negotiated: on
TX negotiated: on
2)
3)

[Actual Results]
fail

[Expected Results]
ok

[Reproducibility]
100%

[Additional information]
(Firmware version, kernel version, affected hardware, etc. if required):
this following patch fix it:

https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=4826d2c4fcbfcc3ba7887a197143ffe4d444a3d3
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=d9032dba5a2b2bbf0fdce67c8795300ec9923b43

[Resolution]

Revision history for this message
Ike Panhc (ikepanhc) wrote :

Patch 4826d2c4fcbfc ("net: phy: realtek: read actual speed on rtl8211f to detect downshift") and d9032dba5a2b2 ("net: phy: fix save wrong speed and duplex problem if autoneg is on") are already merged into mainline kernel.

Changed in kunpeng920:
status: New → In Progress
assignee: nobody → Ike Panhc (ikepanhc)
Revision history for this message
Ike Panhc (ikepanhc) wrote :

Already in focal-hwe (5.13) since this patch hits mainline on v5.11

Revision history for this message
Ike Panhc (ikepanhc) wrote :

Commit d445dff2df604e ("net: phy: realtek: read actual speed to detect downshift") is also needed.

Revision history for this message
Ike Panhc (ikepanhc) wrote :

Test kernel is built. Will check if these 2 patches fixes this issue.

https://kernel.ubuntu.com/~ikepanhc/lp1956294/

Revision history for this message
Andrew Cloke (andrew-cloke) wrote :

The bug description shows that the target patch allows the NIC speed to be changed to 50Mbps. However, we do not have any network connections that support 50Mbps in our lab. So, we are not able to validate the patched kernel independently.
Xinwei, could you test and validate the patched kernel that Ike referenced in comment #4?
Marking as "incomplete" while waiting for either clarification or patched kernel validation.

Changed in kunpeng920:
status: In Progress → Incomplete
Revision history for this message
Fred Kimmy (kongzizaixian) wrote :

=>However, we do not have any network connections that support 50Mbps in our lab. So, we are not able to validate the patched kernel independently.
 you can use kunpeng 920 directly connecting another kunpeng 920 hns net card。 Can you try it?

Revision history for this message
Ike Panhc (ikepanhc) wrote :

Checked x6000 and realtek.ko is not loaded. Only d06 has it. I will check which NIC ports on them with realtek phy and validate the patch.

Revision history for this message
Ike Panhc (ikepanhc) wrote :

Checked RTL8211F spec and 50Mb/s is not supported. On d06 with focal-HWE kernel (5.13), ethtool set speed reports "Cannot advertise speed 50" too. What is the expected output?

$ uname -a
Linux kreiken 5.13.0-28-generic #31~20.04.1-Ubuntu SMP Wed Jan 19 14:06:20 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux
$ sudo ethtool -s enp189s0f1 speed 50
Cannot advertise speed 50

Revision history for this message
Fred Kimmy (kongzizaixian) wrote :

if system report "Cannot advertise speed 50", this following command will fail to set speed 50Mb/s
#ethtool eth0
Settings for eth0:
        Supported ports: [ TP ]
        Supported link modes: 10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes: 10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Advertised pause frame use: Symmetric
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Link partner advertised link modes: 10baseT/Half 10baseT/Full
                                             100baseT/Half 100baseT/Full
        Link partner advertised pause frame use: Symmetric
        Link partner advertised auto-negotiation: Yes
        Link partner advertised FEC modes: Not reported
        Speed: 50Mb/s ==> fail to set it
        Duplex: Full
        Port: MII
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        Current message level: 0x00000036 (54)
                               probe link ifdown ifup
        Link detected: yes

Revision history for this message
Ike Panhc (ikepanhc) wrote :

I still can not set to 50Mb/s with 5.13 kernel which has these 2 patches. Is there any other physical condition needed?

$ uname -a
Linux scobee-kernel 5.4.0-107-generic #121-Ubuntu SMP Thu Mar 24 16:07:22 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux
$ sudo ethtool -s enp189s0f0 speed 50
Cannot advertise speed 50
$ sudo ethtool enp189s0f0 | grep Speed
 Speed: 1000Mb/s

$ uname -a
Linux scobee-kernel 5.13.0-39-generic #44~20.04.1-Ubuntu SMP Thu Mar 24 16:47:35 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux
$ sudo ethtool -s enp189s0f0 speed 50
Cannot advertise speed 50
$ sudo ethtool enp189s0f0 | grep Speed
 Speed: 1000Mb/s

Hon Ming Hui (hm-hui)
tags: added: pel-41
Hon Ming Hui (hm-hui)
tags: removed: pel-41
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.