Hi,

Mostly great, but just a couple more points.

On Wed, Mar 03, 2021 at 01:57:57PM +0300, Ivan Bornyakov wrote:
> +     adv = 0;
> +
> +     if (linkmode_test_bit(ETHTOOL_LINK_MODE_1000baseX_Full_BIT,
> +                           priv->supported))
> +             adv |= ADVERTISE_1000XFULL;
> +
> +     if (linkmode_test_bit(ETHTOOL_LINK_MODE_Pause_BIT,
> +                           priv->supported))
> +             adv |= ADVERTISE_1000XPAUSE;
> +
> +     if (linkmode_test_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT,
> +                           priv->supported))
> +             adv |= ADVERTISE_1000XPSE_ASYM;

You could use the helper:

        adv = linkmode_adv_to_mii_adv_x(priv->supported,
                                        ETHTOOL_LINK_MODE_1000baseX_Full_BIT);

instead here. It's also a bit weird to set the advertisement based off
a "supported" mask.

> +     linkmode_set_bit(ETHTOOL_LINK_MODE_10000baseKR_Full_BIT, supported);

Does the PHY support backplane links?

Thanks.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

Reply via email to