Re: [PATCH net-next v1 1/1] net: phy: dp83td510: add cable testing support

From: Simon Horman
Date: Tue Jul 09 2024 - 08:22:15 EST


On Mon, Jul 08, 2024 at 04:05:42PM +0200, Oleksij Rempel wrote:
> Implement the TDR test procedure as described in "Application Note
> DP83TD510E Cable Diagnostics Toolkit revC", section 3.2.
>
> The procedure was tested with "draka 08 signalkabel 2x0.8mm". The reported
> cable length was 5 meters more for each 20 meters of actual cable length.
> For instance, a 20-meter cable showed as 25 meters, and a 40-meter cable
> showed as 50 meters. Since other parts of the diagnostics provided by this
> PHY (e.g., Active Link Cable Diagnostics) require accurate cable
> characterization to provide proper results, this tuning can be implemented
> in a separate patch/interface.
>
> Signed-off-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>
> ---
> drivers/net/phy/dp83td510.c | 158 ++++++++++++++++++++++++++++++++++++
> 1 file changed, 158 insertions(+)
>
> diff --git a/drivers/net/phy/dp83td510.c b/drivers/net/phy/dp83td510.c

...

> +/**
> + * dp83td510_cable_test_get_status - Get the status of the cable test for the
> + * DP83TD510 PHY.
> + * @phydev: Pointer to the phy_device structure.
> + * @finished: Pointer to a boolean that indicates whether the test is finished.
> + *
> + * The function sets the @finished flag to true if the test is complete, and
> + * returns 0 on success or a negative error code on failure.

Hi Oleksij,

Please consider documenting the return value using a "Return:" or
"Returns:" section in this Kernel doc.

Flagged by: kernel-doc -none -Wall

> + */
> +static int dp83td510_cable_test_get_status(struct phy_device *phydev,
> + bool *finished)

...