Subject: Re: [PATCH net-next 2/2] net: phy: marvell: implement cable-test for 88E308X/88E609X family

From: Simon Horman <[email-masked]>
Date: Wed, 27 Mar 2024 15:28:39 +0000

On Tue, Mar 26, 2024 at 03:12:36PM +0100, Pawel Dembicki wrote:
> This commit implements VCT in 88E308X/88E609X Family.
> 
> It require two workarounds with some magic configuration.
> Regular use require only one register configuration. But Open Circuit
> require second workaround.
> It cause implementation two phases for fault length measuring.
> 
> Fast Ethernet PHY have implemented very simple version of VCT. It's
> complitley different than vct5 or vct7.
> 
> Signed-off-by: Pawel Dembicki <[email-masked]>
> ---
>  drivers/net/phy/marvell.c | 252 ++++++++++++++++++++++++++++++++++++++
>  1 file changed, 252 insertions(+)
> 
> diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c

...

> +u32 m88e3082_vct_distrfln_2_cm(u8 distrfln)

nit: This function seems to only be used in this file.
     If so it should be static.

> +{
> +	if (distrfln < 24)
> +		return 0;
> +
> +	/* Original function for meters: y = 0.7861x - 18.862 */
> +	return (7861 * distrfln - 188620) / 100;
> +}

...