From: David Miller <davem@davemloft.net>
To: hayashi.kunihiko@socionext.com
Cc: hkallweit1@gmail.com, andrew@lunn.ch, f.fainelli@gmail.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: phy: Fix the issue that netif always links up after resuming
Date: Tue, 18 Dec 2018 21:49:04 -0800 (PST) [thread overview]
Message-ID: <20181218.214904.2030959667534757581.davem@davemloft.net> (raw)
In-Reply-To: <1545119824-30380-1-git-send-email-hayashi.kunihiko@socionext.com>
From: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Date: Tue, 18 Dec 2018 16:57:04 +0900
> Even though the link is down before entering hibernation,
> there is an issue that the network interface always links up after resuming
> from hibernation.
>
> If the link is still down before enabling the network interface,
> and after resuming from hibernation, the phydev->state is forcibly set
> to PHY_UP in mdio_bus_phy_restore(), and the link becomes up.
>
> In suspend sequence, only if the PHY is attached, mdio_bus_phy_suspend()
> calls phy_stop_machine(), and mdio_bus_phy_resume() calls
> phy_start_machine().
> In resume sequence, it's enough to do the same as mdio_bus_phy_resume()
> because the state has been preserved.
>
> This patch fixes the issue by calling phy_start_machine() in
> mdio_bus_phy_restore() in the same way as mdio_bus_phy_resume().
>
> Suggested-by: Heiner Kallweit <hkallweit1@gmail.com>
> Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Applied and queued up for -stable.
prev parent reply other threads:[~2018-12-19 5:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-18 7:57 Kunihiko Hayashi
2018-12-18 18:15 ` Heiner Kallweit
2018-12-19 1:59 ` Kunihiko Hayashi
2018-12-19 5:49 ` David Miller [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=20181218.214904.2030959667534757581.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=andrew@lunn.ch \
--cc=f.fainelli@gmail.com \
--cc=hayashi.kunihiko@socionext.com \
--cc=hkallweit1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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 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®