net: smsc911x: Stop and start PHY during suspend and resume
authorFlorian Fainelli <f.fainelli@gmail.com>
Thu, 25 Aug 2022 02:39:51 +0000 (19:39 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Sep 2022 10:28:02 +0000 (12:28 +0200)
commit8eeba7ef4d1dce814ba3ffda4cf516e68be5536f
treea6033334fd835476d18435f57903e8d12b57ebe4
parentcc2b9170aa34e0e1ae54c8da52c5bb1dfb01b0c5
net: smsc911x: Stop and start PHY during suspend and resume

[ Upstream commit 3ce9f2bef75528936c78a7053301f5725f622f3a ]

Commit 744d23c71af3 ("net: phy: Warn about incorrect
mdio_bus_phy_resume() state") unveiled that the smsc911x driver was not
properly stopping and restarting the PHY during suspend/resume. Correct
that by indicating that the MAC is in charge of PHY PM operations and
ensure that all MDIO bus activity is quiescent during suspend.

Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Fixes: fba863b81604 ("net: phy: make PHY PM ops a no-op if MAC driver manages PHY PM")
Fixes: 2aa70f864955 ("net: smsc911x: Quieten netif during suspend")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20220825023951.3220-1-f.fainelli@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/smsc/smsc911x.c