lkml.org 
[lkml]   [2019]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL 5.4 323/350] net: ethernet: ti: ale: clean ale tbl on init and intf restart
    Date
    From: Grygorii Strashko <grygorii.strashko@ti.com>

    [ Upstream commit 7fe579dfb90fcdf0c7722f33c772d5f0d1bc7cb6 ]

    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 <grygorii.strashko@ti.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/net/ethernet/ti/cpsw_ale.c | 2 ++
    1 file changed, 2 insertions(+)

    diff --git a/drivers/net/ethernet/ti/cpsw_ale.c b/drivers/net/ethernet/ti/cpsw_ale.c
    index 84025dcc78d59..e7c24396933e9 100644
    --- a/drivers/net/ethernet/ti/cpsw_ale.c
    +++ b/drivers/net/ethernet/ti/cpsw_ale.c
    @@ -779,6 +779,7 @@ void cpsw_ale_start(struct cpsw_ale *ale)
    void cpsw_ale_stop(struct cpsw_ale *ale)
    {
    del_timer_sync(&ale->timer);
    + cpsw_ale_control_set(ale, 0, ALE_CLEAR, 1);
    cpsw_ale_control_set(ale, 0, ALE_ENABLE, 0);
    }

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

    + cpsw_ale_control_set(ale, 0, ALE_CLEAR, 1);
    return ale;
    }

    --
    2.20.1
    \
     
     \ /
      Last update: 2019-12-10 22:13    [W:10.691 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site