Subject: Re: [PATCH net-next 1/3] net: phy: add and use phy_check_downshift

From: Andrew Lunn <[email-masked]>
Date: Thu, 19 Mar 2020 10:10:45 +0100

On Wed, Mar 18, 2020 at 10:29:01PM +0100, Heiner Kallweit wrote:
> So far PHY drivers have to check whether a downshift occurred to be
> able to notify the user. To make life of drivers authors a little bit
> easier move the downshift notification to phylib. phy_check_downshift()
> compares the highest mutually advertised speed with the actual value
> of phydev->speed (typically read by the PHY driver from a
> vendor-specific register) to detect a downshift.
>  
> +/**
> + * phy_check_downshift - check whether downshift occurred
> + * @phydev: The phy_device struct
> + *
> + * Check whether a downshift to a lower speed occurred. If this should be the
> + * case warn the user.
> + */

Hi Heiner

Might be worth documenting here that phydev->speed needs to contain
the real speed, which typically requires a vendor-specific register.

    Andrew