[PATCH 2/2] net: phy: Change "PHY not found" message to debug()

Siddharth Vadapalli s-vadapalli at ti.com
Wed Aug 23 06:54:04 CEST 2023



On 22/08/23 17:43, Roger Quadros wrote:
> Some boards (e.g. Beagleplay) need multiple attempts to detect the PHY
> and the multiple "PHY not found" prints are not nice.

I tried grepping for calls to "phy_connect" across the drivers present in
drivers/net. Most of them simply return -ENODEV on failure. The ones
which add prints indicating failure, don't use debug(). For this reason,
I believe that the drivers which don't have any prints in case of
failure might be relying on the printf() within phy_connect() to indicate
failure. Therefore, if the printf() is being changed to debug() in
phy_connect(), maybe all the drivers which currently return -ENODEV,
should have a print added to them as a part of this patch.

> 
> Change them to debug().
> 
> Signed-off-by: Roger Quadros <rogerq at kernel.org>
> ---
>  drivers/net/phy/phy.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
> index ae21acb059..3a524bcd81 100644
> --- a/drivers/net/phy/phy.c
> +++ b/drivers/net/phy/phy.c
> @@ -928,7 +928,7 @@ struct phy_device *phy_connect(struct mii_dev *bus, int addr,
>  	if (phydev)
>  		phy_connect_dev(phydev, dev, interface);
>  	else
> -		printf("Could not get PHY for %s: addr %d\n", bus->name, addr);
> +		debug("Could not get PHY for %s: addr %d\n", bus->name, addr);
>  	return phydev;
>  }
>  

-- 
Regards,
Siddharth.


More information about the U-Boot mailing list