From 8456721dd4ec777e6f914f2ae98ba9fe3c6681df Mon Sep 17 00:00:00 2001 From: Vladimir Oltean Date: Thu, 2 May 2019 23:23:36 +0300 Subject: net: dsa: sja1105: Add support for configuring address ageing time If STP is active, this setting is applied on bridged ports each time an Ethernet link is established (topology changes). Since the setting is global to the switch and a reset is required to change it, resets are prevented if the new callback does not change the value that the hardware already is programmed for. Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller --- drivers/net/dsa/sja1105/sja1105.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/net/dsa/sja1105/sja1105.h') diff --git a/drivers/net/dsa/sja1105/sja1105.h b/drivers/net/dsa/sja1105/sja1105.h index 38506bde83c6..0489d9adf957 100644 --- a/drivers/net/dsa/sja1105/sja1105.h +++ b/drivers/net/dsa/sja1105/sja1105.h @@ -12,6 +12,10 @@ #define SJA1105_NUM_PORTS 5 #define SJA1105_NUM_TC 8 #define SJA1105ET_FDB_BIN_SIZE 4 +/* The hardware value is in multiples of 10 ms. + * The passed parameter is in multiples of 1 ms. + */ +#define SJA1105_AGEING_TIME_MS(ms) ((ms) / 10) /* Keeps the different addresses between E/T and P/Q/R/S */ struct sja1105_regs { -- cgit v1.2.3