lkml.org 
[lkml]   [2023]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [REGRESSION PATCH RFC] net: phy: don't resume PHY via MDIO when iface is not up
Hello Heiner,

> > This may be a problem in itself, but I then wondered why
> > mdio_bus_phy_resume() gets called anyhow because the RAVB driver sets
> > 'phydev->mac_managed_pm = true' so once the interface is up
> > mdio_bus_phy_resume() never gets called. But again, the interface was
> > not up yet, so mac_managed_pm was not set yet.
> >
> Setting phydev->mac_managed_pm in the open() callback is too late.
> It should be set as soon as the phydev is created. That's in
> ravb_mdio_init() after the call to of_mdiobus_register().
>
> It should be possible to get the phydev with:
> pn = of_parse_phandle(np, "phy-handle", 0);
> phy = of_phy_find_device(pn);

Awesome, thank you very much for the pointer. I applied setting
'mac_managed_pm' at probe time, and now I can resume successfully.
Sadly, this is only the first part of the problem. I still can't get the
interface up after resuming, but I still need to debug this further.
At least, the problem with mdiobus_resume getting called is fixed now.

Thank you for your help!

Wolfram

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2023-03-27 00:37    [W:0.081 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site