net: phy: at803x: fix resume for QCA8327 phy
authorAnsuel Smith <ansuelsmth@gmail.com>
Sat, 9 Oct 2021 22:46:15 +0000 (00:46 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 10 Oct 2021 10:27:42 +0000 (11:27 +0100)
commitba3c01ee02ed0d821c9f241f179bbc9457542b8f
treea213ef0197ccef8f57246ffc427301eec85044ad
parent275fdef2d91954330fe8cb3846eb3de6f33f1f2d
net: phy: at803x: fix resume for QCA8327 phy

From Documentation phy resume triggers phy reset and restart
auto-negotiation. Add a dedicated function to wait reset to finish as
it was notice a regression where port sometime are not reliable after a
suspend/resume session. The reset wait logic is copied from phy_poll_reset.
Add dedicated suspend function to use genphy_suspend only with QCA8337
phy and set only additional debug settings for QCA8327. With more test
it was reported that QCA8327 doesn't proprely support this mode and
using this cause the unreliability of the switch ports, especially the
malfunction of the port0.

Fixes: 15b9df4ece17 ("net: phy: at803x: add resume/suspend function to qca83xx phy")
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/at803x.c