* [PATCH] net: phy: air_en8811h: add dedicated suspend callback for AN8811HB
@ 2026-09-17 1:21 Weiting Lee
2026-09-17 1:56 ` Andrew Lunn
0 siblings, 1 reply; 2+ messages in thread
From: Weiting Lee @ 2026-09-17 1:21 UTC (permalink / raw)
To: netdev
Cc: andrew, hkallweit1, linux, davem, kuba, edumazet, pabeni,
linux-kernel, bjorn, ericwouds, frank-w, joseph.lin,
wenshin.chung, lucien.jheng, albert-al.lee, Weiting Lee
The AN8811HB hardware requires a re-negotiation sequence before
entering power-down to correctly restore the link upon resume.
Add an8811hb_suspend() to handle this.
Signed-off-by: Weiting Lee <weiting.lee@airoha.com>
---
drivers/net/phy/air_en8811h.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/drivers/net/phy/air_en8811h.c b/drivers/net/phy/air_en8811h.c
index a03d63dd4ac9..5b1edb127c68 100644
--- a/drivers/net/phy/air_en8811h.c
+++ b/drivers/net/phy/air_en8811h.c
@@ -1573,6 +1573,19 @@ static void an8811hb_remove(struct phy_device *phydev)
}
}
+static int an8811hb_suspend(struct phy_device *phydev)
+{
+ int ret;
+
+ clk_save_context();
+
+ ret = phy_modify(phydev, MII_BMCR, 0, BMCR_ANRESTART);
+ if (ret < 0)
+ return ret;
+
+ return genphy_suspend(phydev);
+}
+
static struct phy_driver en8811h_driver[] = {
{
PHY_ID_MATCH_MODEL(EN8811H_PHY_ID),
@@ -1606,7 +1619,7 @@ static struct phy_driver en8811h_driver[] = {
.config_aneg = en8811h_config_aneg,
.read_status = en8811h_read_status,
.resume = en8811h_resume,
- .suspend = en8811h_suspend,
+ .suspend = an8811hb_suspend,
.config_intr = en8811h_clear_intr,
.handle_interrupt = en8811h_handle_interrupt,
.led_hw_is_supported = en8811h_led_hw_is_supported,
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] net: phy: air_en8811h: add dedicated suspend callback for AN8811HB
2026-09-17 1:21 [PATCH] net: phy: air_en8811h: add dedicated suspend callback for AN8811HB Weiting Lee
@ 2026-09-17 1:56 ` Andrew Lunn
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Lunn @ 2026-09-17 1:56 UTC (permalink / raw)
To: Weiting Lee
Cc: netdev, hkallweit1, linux, davem, kuba, edumazet, pabeni,
linux-kernel, bjorn, ericwouds, frank-w, joseph.lin,
wenshin.chung, lucien.jheng, albert-al.lee
On Thu, Sep 17, 2026 at 09:21:02AM +0800, Weiting Lee wrote:
> The AN8811HB hardware requires a re-negotiation sequence before
> entering power-down to correctly restore the link upon resume.
> Add an8811hb_suspend() to handle this.
Is there an errata for this? Please mention it in the commit message.
> +static int an8811hb_suspend(struct phy_device *phydev)
> +{
> + int ret;
> +
> + clk_save_context();
> +
> + ret = phy_modify(phydev, MII_BMCR, 0, BMCR_ANRESTART);
Why use phy_modify() if you are going to pass a mask of 0?
Andrew
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-17 1:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-17 1:21 [PATCH] net: phy: air_en8811h: add dedicated suspend callback for AN8811HB Weiting Lee
2026-09-17 1:56 ` Andrew Lunn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®