diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2020-09-26 02:04:20 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-09-26 02:35:27 +0300 |
commit | bf425b82059e0b0752c0026353c1902112200837 (patch) | |
tree | bd0d0cce36bfd8b3d472425316c9110a4eaa1765 /drivers/net/dsa/sja1105/sja1105_spi.c | |
parent | 0a7bdbc23d8a1d5e6f6f74abf00ba572f7369dd6 (diff) | |
download | linux-bf425b82059e0b0752c0026353c1902112200837.tar.xz |
net: dsa: sja1105: expose static config as devlink region
As explained in Documentation/networking/dsa/sja1105.rst, this switch
has a static config held in the driver's memory and re-uploaded from
time to time into the device (after any major change).
The format of this static config is in fact described in UM10944.pdf and
it contains all the switch's settings (it also contains device ID, table
CRCs, etc, just like in the manual). So it is a useful and universal
devlink region to expose to user space, for debugging purposes.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/sja1105/sja1105_spi.c')
-rw-r--r-- | drivers/net/dsa/sja1105/sja1105_spi.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/dsa/sja1105/sja1105_spi.c b/drivers/net/dsa/sja1105/sja1105_spi.c index 704dcf1d1c01..591c5734747d 100644 --- a/drivers/net/dsa/sja1105/sja1105_spi.c +++ b/drivers/net/dsa/sja1105/sja1105_spi.c @@ -302,9 +302,8 @@ static int sja1105_status_get(struct sja1105_private *priv, * for upload requires the recalculation of table CRCs and updating the * structures with these. */ -static int -static_config_buf_prepare_for_upload(struct sja1105_private *priv, - void *config_buf, int buf_len) +int static_config_buf_prepare_for_upload(struct sja1105_private *priv, + void *config_buf, int buf_len) { struct sja1105_static_config *config = &priv->static_config; struct sja1105_table_header final_header; |