Re: [PATCH net-next v7 2/3] net: phy: add support for clause 37 auto-negotiation

From: Tao Ren
Date: Mon Aug 19 2019 - 19:24:00 EST


On 8/19/19 4:15 PM, Renà van Dorst wrote:
> Hi Tao,
>
> Quoting Tao Ren <taoren@xxxxxx>:
>
>> On 8/11/19 4:40 PM, Tao Ren wrote:
>>> From: Heiner Kallweit <hkallweit1@xxxxxxxxx>
>>>
>>> This patch adds support for clause 37 1000Base-X auto-negotiation.
>>>
>>> Signed-off-by: Heiner Kallweit <hkallweit1@xxxxxxxxx>
>>> Signed-off-by: Tao Ren <taoren@xxxxxx>
>>
>> A kind reminder: could someone help to review the patch when you have bandwidth?
>>
>
> FWIW: I have a similar setup with my device. MAC -> PHY -> SFP cage.
> PHY is a Qualcomm at8031 and is used as a RGMII-to-SerDes converter.
> SerDes only support 100Base-FX and 1000Base-X in this converter mode.
> PHY also supports a RJ45 port but that is not wired on my device.
>
> I converted [0] at803x driver to make use of the PHYLINK API for SFP cage and
> also of these new c37 functions.
>
> In autoneg on and off, it detects the link and can ping a host on the network.
> Tested with 1gbit BiDi optical(1000Base-X) and RJ45 module(SGMII).
> Both work and both devices detects unplug and plug-in of the cable.
>
> output of ethtool:
>
> Autoneg on
> Settings for lan5:
> ÂÂÂÂÂÂÂ Supported ports: [ TP MII ]
> ÂÂÂÂÂÂÂ Supported link modes:ÂÂ 100baseT/Half 100baseT/Full
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ 1000baseT/Full
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ 1000baseX/Full
> ÂÂÂÂÂÂÂ Supported pause frame use: Symmetric Receive-only
> ÂÂÂÂÂÂÂ Supports auto-negotiation: Yes
> ÂÂÂÂÂÂÂ Supported FEC modes: Not reported
> ÂÂÂÂÂÂÂ Advertised link modes:Â 100baseT/Half 100baseT/Full
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ 1000baseT/Full
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ 1000baseX/Full
> ÂÂÂÂÂÂÂ Advertised pause frame use: Symmetric Receive-only
> ÂÂÂÂÂÂÂ Advertised auto-negotiation: Yes
> ÂÂÂÂÂÂÂ Advertised FEC modes: Not reported
> ÂÂÂÂÂÂÂ Link partner advertised link modes:Â 1000baseX/Full
> ÂÂÂÂÂÂÂ Link partner advertised pause frame use: Symmetric Receive-only
> ÂÂÂÂÂÂÂ Link partner advertised auto-negotiation: Yes
> ÂÂÂÂÂÂÂ Link partner advertised FEC modes: Not reported
> ÂÂÂÂÂÂÂ Speed: 1000Mb/s
> ÂÂÂÂÂÂÂ Duplex: Full
> ÂÂÂÂÂÂÂ Port: MII
> ÂÂÂÂÂÂÂ PHYAD: 7
> ÂÂÂÂÂÂÂ Transceiver: internal
> ÂÂÂÂÂÂÂ Auto-negotiation: on
> ÂÂÂÂÂÂÂ Supports Wake-on: g
> ÂÂÂÂÂÂÂ Wake-on: d
> ÂÂÂÂÂÂÂ Link detected: yes
>
> Autoneg off
> Settings for lan5:
> ÂÂÂÂÂÂÂ Supported ports: [ TP MII ]
> ÂÂÂÂÂÂÂ Supported link modes:ÂÂ 100baseT/Half 100baseT/Full
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ 1000baseT/Full
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ 1000baseX/Full
> ÂÂÂÂÂÂÂ Supported pause frame use: Symmetric Receive-only
> ÂÂÂÂÂÂÂ Supports auto-negotiation: Yes
> ÂÂÂÂÂÂÂ Supported FEC modes: Not reported
> ÂÂÂÂÂÂÂ Advertised link modes:Â 1000baseT/Full
> ÂÂÂÂÂÂÂ Advertised pause frame use: Symmetric Receive-only
> ÂÂÂÂÂÂÂ Advertised auto-negotiation: No
> ÂÂÂÂÂÂÂ Advertised FEC modes: Not reported
> ÂÂÂÂÂÂÂ Speed: 1000Mb/s
> ÂÂÂÂÂÂÂ Duplex: Full
> ÂÂÂÂÂÂÂ Port: MII
> ÂÂÂÂÂÂÂ PHYAD: 7
> ÂÂÂÂÂÂÂ Transceiver: internal
> ÂÂÂÂÂÂÂ Auto-negotiation: off
> ÂÂÂÂÂÂÂ Supports Wake-on: g
> ÂÂÂÂÂÂÂ Wake-on: d
> ÂÂÂÂÂÂÂ Link detected: yes
>
> Tested-by: Renà van Dorst <opensource@xxxxxxxxxx>
>
> Greats,
>
> RenÃ

Great. Thank you for the testing, RenÃ.


Cheers,

Tao