Re: [RFC PATCH 0/1] net: phy: skip autoneg of ethernet(fec) on network boot

From: Masahiko KIMOTO
Date: Mon Jul 16 2018 - 21:47:54 EST


> > You said that the PHY is being configured 3 times, and might be doing
> > auto-neg three times. Often a phy will not actually perform auto-neg,
> > or do it much faster, if the advertised bits do not change with each
> > re-configuration.
> >
> > So check how u-boot is configuring what is advertised, and look at
> > what Linux is configuring. In particularly, look at the pause
> > configuration. If pause is configured different in u-boot and Linux,
> > try to make it the same. Things might go faster than.
>
> Thank you.
>
> I'll try to check out u-boot side by mii command and Linux(server)
> side by ethtool.

PHY setting in u-boot and after booting Linux is as follows;

We may avoid second and third auto-neg if both settings in u-boot and
in linux make same value, right?

---------------------------------------------------------------------------
=> mii dump 1 4
4. (11e1) -- Autonegotiation advertisement register --
(8000:0000) 4.15 = 0 next page able
(4000:0000) 4.14 = 0 (reserved)
(2000:0000) 4.13 = 0 remote fault
(1000:1000) 4.12 = 1 (reserved)
(0800:0000) 4.11 = 0 asymmetric pause
(0400:0000) 4.10 = 0 pause enable
(0200:0000) 4. 9 = 0 100BASE-T4 able
(0100:0100) 4. 8 = 1 100BASE-TX full duplex able
(0080:0080) 4. 7 = 1 100BASE-TX able
(0040:0040) 4. 6 = 1 10BASE-T full duplex able
(0020:0020) 4. 5 = 1 10BASE-T able
(001f:0001) 4. 4- 0 = 1 selector = IEEE 802.3


=> mii dump 1 5
5. (dd01) -- Autonegotiation partner abilities register --
(8000:8000) 5.15 = 1 next page able
(4000:4000) 5.14 = 1 acknowledge
(2000:0000) 5.13 = 0 remote fault
(1000:1000) 5.12 = 1 (reserved)
(0800:0800) 5.11 = 1 asymmetric pause able
(0400:0400) 5.10 = 1 pause able
(0200:0000) 5. 9 = 0 100BASE-T4 able
(0100:0100) 5. 8 = 1 100BASE-X full duplex able
(0080:0000) 5. 7 = 0 100BASE-TX able
(0040:0000) 5. 6 = 0 10BASE-T full duplex able
(0020:0000) 5. 5 = 0 10BASE-T able
(001f:0001) 5. 4- 0 = 1 selector = IEEE 802.3

---------------------------------------------------------------------------
root@imx6qdlsabresd:~# ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: Symmetric
Advertised auto-negotiation: Yes
Link partner advertised link modes: 100baseT/Full
1000baseT/Full
Link partner advertised pause frame use: Symmetric Receive-only
Link partner advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: MII
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: d
Wake-on: d
Link detected: yes

root@imx6qdlsabresd:~# ethtool -a eth0
Pause parameters for eth0:
Autonegotiate: on
RX: off
TX: off
RX negotiated: on
TX negotiated: on

---------------------------------------------------------------------------

---------------------------------------------------------------------------
Masahiko KIMOTO,Ph.D. / Cybertrust Japan Co., Ltd.
mail: masahiko.kimoto@xxxxxxxxxxxxxxxx
web: https://www.cybertrust.co.jp/ https://www.miraclelinux.com/