diff options
author | WingMan Kwok | 2013-09-19 15:47:08 -0500 |
---|---|---|
committer | Murali Karicheri | 2014-12-03 10:29:58 -0600 |
commit | 4a05d95f1d7d6722dad55f6971722cfab330fdf1 (patch) | |
tree | 57725baad4f2d38bf09e6bce1f06c723220393a8 /drivers/net/ethernet/ti/keystone_ethss.c | |
parent | 8cf23eafa1aba6a33d3a7e1a253d6143c3b2d89c (diff) | |
download | linux-4a05d95f1d7d6722dad55f6971722cfab330fdf1.tar.gz linux-4a05d95f1d7d6722dad55f6971722cfab330fdf1.tar.xz linux-4a05d95f1d7d6722dad55f6971722cfab330fdf1.zip |
net: keystone: cpsw: ale should only be destroyed when cpsw is removed
The ALE instance should not be destroyed in the closing the CPSW instance
as ALE is needed for further clean up, such as removing vlan, later.
The ALE instance should only be destoryed when the CPSW instance is removed.
Signed-off-by: Jingting Zhou <zhoujt@ti.com>
Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
Diffstat (limited to 'drivers/net/ethernet/ti/keystone_ethss.c')
-rw-r--r-- | drivers/net/ethernet/ti/keystone_ethss.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/ethernet/ti/keystone_ethss.c b/drivers/net/ethernet/ti/keystone_ethss.c index bcf220a5157..27f5e07a861 100644 --- a/drivers/net/ethernet/ti/keystone_ethss.c +++ b/drivers/net/ethernet/ti/keystone_ethss.c | |||
@@ -2749,9 +2749,6 @@ static int cpsw_close(void *intf_priv, struct net_device *ndev) | |||
2749 | 2749 | ||
2750 | for_each_slave(cpsw_intf, cpsw_slave_stop, cpsw_dev); | 2750 | for_each_slave(cpsw_intf, cpsw_slave_stop, cpsw_dev); |
2751 | 2751 | ||
2752 | if (!cpsw_dev->ale_refcnt) | ||
2753 | cpsw_ale_destroy(cpsw_dev->ale); | ||
2754 | |||
2755 | netcp_unregister_txhook(netcp, CPSW_TXHOOK_ORDER, cpsw_tx_hook, | 2752 | netcp_unregister_txhook(netcp, CPSW_TXHOOK_ORDER, cpsw_tx_hook, |
2756 | cpsw_intf); | 2753 | cpsw_intf); |
2757 | netcp_txpipe_close(&cpsw_intf->tx_pipe); | 2754 | netcp_txpipe_close(&cpsw_intf->tx_pipe); |
@@ -2770,6 +2767,8 @@ static int cpsw_remove(struct netcp_device *netcp_device, void *inst_priv) | |||
2770 | 2767 | ||
2771 | of_node_put(cpsw_dev->interfaces); | 2768 | of_node_put(cpsw_dev->interfaces); |
2772 | 2769 | ||
2770 | cpsw_ale_destroy(cpsw_dev->ale); | ||
2771 | |||
2773 | list_for_each_entry_safe(cpsw_intf, tmp, &cpsw_dev->cpsw_intf_head, | 2772 | list_for_each_entry_safe(cpsw_intf, tmp, &cpsw_dev->cpsw_intf_head, |
2774 | cpsw_intf_list) { | 2773 | cpsw_intf_list) { |
2775 | netcp_delete_interface(netcp_device, cpsw_intf->ndev); | 2774 | netcp_delete_interface(netcp_device, cpsw_intf->ndev); |