On 23/08/2023 07:54, Siddharth Vadapalli wrote:
> 
> 
> 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.

Sounds reasonable. I can do that.

> 
>>
>> Change them to debug().
>>
>> Signed-off-by: Roger Quadros <rog...@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;
>>  }
>>  
> 

-- 
cheers,
-roger

Reply via email to