summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorGavin Shan <gwshan@linux.vnet.ibm.com>2016-10-04 11:25:54 +1100
committerDavid S. Miller <davem@davemloft.net>2016-10-04 02:11:51 -0400
commit2c15f25b2923435515298589dcaa2eace6a948c1 (patch)
tree02f0909f72e3bcae754d8e22e2dcc6c5d8878359 /drivers
parentc0cd1ba4f8bd8b5fef43bc51a2983673b8f086ff (diff)
net/faraday: Stop NCSI device on shutdown
This stops NCSI device when closing the network device so that the NCSI device can be reenabled later. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-by: Joel Stanley <joel@jms.id.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/faraday/ftgmac100.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c
index 90f9c5481290..262587240c86 100644
--- a/drivers/net/ethernet/faraday/ftgmac100.c
+++ b/drivers/net/ethernet/faraday/ftgmac100.c
@@ -1190,6 +1190,8 @@ static int ftgmac100_stop(struct net_device *netdev)
napi_disable(&priv->napi);
if (netdev->phydev)
phy_stop(netdev->phydev);
+ else if (priv->use_ncsi)
+ ncsi_stop_dev(priv->ndev);
ftgmac100_stop_hw(priv);
free_irq(priv->irq, netdev);