From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: Heiner Kallweit <hkallweit1@gmail.com>
Cc: linux-renesas-soc@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>,
Russell King <linux@armlinux.org.uk>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [REGRESSION PATCH RFC] net: phy: don't resume PHY via MDIO when iface is not up
Date: Mon, 27 Feb 2023 20:43:12 +0100 [thread overview]
Message-ID: <Y/0H0DOC4sl0kVo+@ninjato> (raw)
In-Reply-To: <92332a2e-8e87-567d-7b4c-6ca779c866aa@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1075 bytes --]
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2023-02-27 19:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-23 7:05 [REGRESSION PATCH RFC] net: phy: don't resume PHY via MDIO when iface is not up Wolfram Sang
2023-02-23 10:01 ` Geert Uytterhoeven
2023-02-23 10:29 ` Wolfram Sang
2023-02-26 16:42 ` Heiner Kallweit
2023-02-27 19:43 ` Wolfram Sang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y/0H0DOC4sl0kVo+@ninjato \
--to=wsa+renesas@sang-engineering.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.