]> git.baikalelectronics.ru Git - kernel.git/commit
net: socionext: Stop PHY before resetting netsec
authorMasahisa Kojima <masahisa.kojima@linaro.org>
Tue, 23 Oct 2018 11:24:26 +0000 (20:24 +0900)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 Oct 2018 17:55:34 +0000 (10:55 -0700)
commitbe515903fa81d1b079a3f9a462b1f6d568d2f4d4
treed7cf4b8e7be570e205fae49f1657ec3f78b0fc9b
parent6fd427be0d27a5ec294b190904efafa0a710c25e
net: socionext: Stop PHY before resetting netsec

In ndo_stop, driver resets the netsec ethernet controller IP.
When the netsec IP is reset, HW running mode turns to NRM mode
and driver has to wait until this mode transition completes.

But mode transition to NRM will not complete if the PHY is
in normal operation state. Netsec IP requires PHY is in
power down state when it is reset.

This modification stops the PHY before resetting netsec.

Together with this modification, phy_addr is stored in netsec_priv
structure because ndev->phydev is not yet ready in ndo_init.

Fixes: 0d326cdbc883 ("net: socionext: Add Synquacer NetSec driver")
Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Signed-off-by: Yoshitoyo Osaki <osaki.yoshitoyo@socionext.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/socionext/netsec.c