]> 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)
commiteb7c86062fd008074f1eb0fe8a24a00c598d34a9
treed7cf4b8e7be570e205fae49f1657ec3f78b0fc9b
parent1b969db2a67e883be9ba572e29eaf1f2afb5e360
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: f58ac80bf63d ("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