net: phy: dp83867: perform soft reset and retain established link
authorPraneeth Bajjuri <praneeth@ti.com>
Thu, 10 Jun 2021 00:43:42 +0000 (19:43 -0500)
committerSasha Levin <sashal@kernel.org>
Wed, 30 Jun 2021 12:47:21 +0000 (08:47 -0400)
commit47c07f919fabb6fc8b3c27ad985f24648f5fd6df
tree5a3f6f377ee9b04477753e579addaad9147481d7
parentf57132a887ea4be3d7d813b5003d56716ba33448
net: phy: dp83867: perform soft reset and retain established link

[ Upstream commit da9ef50f545f86ffe6ff786174d26500c4db737a ]

Current logic is performing hard reset and causing the programmed
registers to be wiped out.

as per datasheet: https://www.ti.com/lit/ds/symlink/dp83867cr.pdf
8.6.26 Control Register (CTRL)

do SW_RESTART to perform a reset not including the registers,
If performed when link is already present,
it will drop the link and trigger re-auto negotiation.

Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
Signed-off-by: Geet Modi <geet.modi@ti.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/phy/dp83867.c