Skip to content

Commit 7fe579d

Browse files
grygoriySdavem330
authored andcommitted
net: ethernet: ti: ale: clean ale tbl on init and intf restart
Clean CPSW ALE on init and intf restart (up/down) to avoid reading obsolete or garbage entries from ALE table. Signed-off-by: Grygorii Strashko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent b9242da commit 7fe579d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/net/ethernet/ti/cpsw_ale.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -779,6 +779,7 @@ void cpsw_ale_start(struct cpsw_ale *ale)
779779
void cpsw_ale_stop(struct cpsw_ale *ale)
780780
{
781781
del_timer_sync(&ale->timer);
782+
cpsw_ale_control_set(ale, 0, ALE_CLEAR, 1);
782783
cpsw_ale_control_set(ale, 0, ALE_ENABLE, 0);
783784
}
784785

@@ -862,6 +863,7 @@ struct cpsw_ale *cpsw_ale_create(struct cpsw_ale_params *params)
862863
ALE_UNKNOWNVLAN_FORCE_UNTAG_EGRESS;
863864
}
864865

866+
cpsw_ale_control_set(ale, 0, ALE_CLEAR, 1);
865867
return ale;
866868
}
867869

0 commit comments

Comments
 (0)