Skip to content

Commit bf655ba

Browse files
vladimirolteandavem330
authored andcommitted
net: mscc: ocelot: fix address ageing time (again)
ocelot_set_ageing_time has 2 callers: - felix_set_ageing_time: from drivers/net/dsa/ocelot/felix.c - ocelot_port_attr_ageing_set: from drivers/net/ethernet/mscc/ocelot.c The issue described in the fixed commit below actually happened for the felix_set_ageing_time code path only, since ocelot_port_attr_ageing_set was already dividing by 1000. So to make both paths symmetrical (and to fix addresses getting aged way too fast on Ocelot), stop dividing by 1000 at caller side altogether. Fixes: c0d7ecc ("net: mscc: ocelot: ANA_AUTOAGE_AGE_PERIOD holds a value in seconds, not ms") Signed-off-by: Vladimir Oltean <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 561535b commit bf655ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/mscc/ocelot.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1467,7 +1467,7 @@ static void ocelot_port_attr_ageing_set(struct ocelot *ocelot, int port,
14671467
unsigned long ageing_clock_t)
14681468
{
14691469
unsigned long ageing_jiffies = clock_t_to_jiffies(ageing_clock_t);
1470-
u32 ageing_time = jiffies_to_msecs(ageing_jiffies) / 1000;
1470+
u32 ageing_time = jiffies_to_msecs(ageing_jiffies);
14711471

14721472
ocelot_set_ageing_time(ocelot, ageing_time);
14731473
}

0 commit comments

Comments
 (0)