diff options
author | Grygorii Strashko <grygorii.strashko@ti.com> | 2017-12-01 03:21:16 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-12-02 00:36:32 +0300 |
commit | d0aef029b53c70d6261ef9d4bd827c861d51a8ef (patch) | |
tree | 5d67b3d218c2d8c8b5a3f202fc7638b7bca6c47a /drivers/net/ethernet/ti | |
parent | 4ff2c4bd119fdccca4cf78e0cfc1f92d645ff743 (diff) | |
download | linux-d0aef029b53c70d6261ef9d4bd827c861d51a8ef.tar.xz |
net: ethernet: ti: ale: disable ale from stop()
ALE is enabled from cpsw_ale_start() now, but disabled only from
cpsw_ale_destroy() which introduces inconsitance as cpsw_ale_start() is
called when netif[s] is opened, but cpsw_ale_destroy() is called when
driver is removed. Hence, move ALE disabling in cpsw_ale_stop().
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ti')
-rw-r--r-- | drivers/net/ethernet/ti/cpsw_ale.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/ti/cpsw_ale.c b/drivers/net/ethernet/ti/cpsw_ale.c index fca5c29ef5f5..5eaaf8896941 100644 --- a/drivers/net/ethernet/ti/cpsw_ale.c +++ b/drivers/net/ethernet/ti/cpsw_ale.c @@ -870,6 +870,7 @@ EXPORT_SYMBOL_GPL(cpsw_ale_start); void cpsw_ale_stop(struct cpsw_ale *ale) { del_timer_sync(&ale->timer); + cpsw_ale_control_set(ale, 0, ALE_ENABLE, 0); } EXPORT_SYMBOL_GPL(cpsw_ale_stop); @@ -892,7 +893,6 @@ int cpsw_ale_destroy(struct cpsw_ale *ale) { if (!ale) return -EINVAL; - cpsw_ale_control_set(ale, 0, ALE_ENABLE, 0); kfree(ale); return 0; } |