Re: [PATCH] net: phy: broadcom: Wire suspend/resume for BCM54612E

From: Andrew Lunn
Date: Wed Nov 01 2023 - 18:07:21 EST


On Wed, Nov 01, 2023 at 10:42:52PM +0100, Marco von Rosenberg wrote:
> On Tuesday, October 31, 2023 1:31:11 AM CET Andrew Lunn wrote:
> > Are we talking about a device which as been suspended? The PHY has
> > been left running because there is no suspend callback? Something then
> > triggers a resume. The bootloader then suspends the active PHY? Linux
> > then boots, detects its a resume, so does not touch the hardware
> > because there is no resume callback? The suspended PHY is then
> > useless.
>
> Hi Andrew,
>
> thanks for your feedback. I guess a bit of context is missing here. The issue
> has nothing to do with an ordinary suspension of the OS. The main point is
> that on initial power-up, the bootloader suspends the PHY before booting
> Linux. With a resume callback defined, Linux would call it on boot and make the
> PHY usable.

Ah, so you rely on phy_attach_direct() calling phy_resume(phydev).

This seems an odd way to solve the problem. It was not Linux which
suspend the PHY, so using resume is asymmetric.

I think soft_reset() or config_init() should be taking the PHY out of
suspend.

Andrew