mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-12-10 21:10:43 +00:00
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>
This commit is contained in:
parent
4ff2c4bd11
commit
d0aef029b5
@ -870,6 +870,7 @@ EXPORT_SYMBOL_GPL(cpsw_ale_start);
|
|||||||
void cpsw_ale_stop(struct cpsw_ale *ale)
|
void cpsw_ale_stop(struct cpsw_ale *ale)
|
||||||
{
|
{
|
||||||
del_timer_sync(&ale->timer);
|
del_timer_sync(&ale->timer);
|
||||||
|
cpsw_ale_control_set(ale, 0, ALE_ENABLE, 0);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(cpsw_ale_stop);
|
EXPORT_SYMBOL_GPL(cpsw_ale_stop);
|
||||||
|
|
||||||
@ -892,7 +893,6 @@ int cpsw_ale_destroy(struct cpsw_ale *ale)
|
|||||||
{
|
{
|
||||||
if (!ale)
|
if (!ale)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
cpsw_ale_control_set(ale, 0, ALE_ENABLE, 0);
|
|
||||||
kfree(ale);
|
kfree(ale);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user