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.h | |
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.h')
-rw-r--r-- | drivers/net/dsa/sja1105/sja1105.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/dsa/sja1105/sja1105.h b/drivers/net/dsa/sja1105/sja1105.h index d043332cbc02..4af70f619d8e 100644 --- a/drivers/net/dsa/sja1105/sja1105.h +++ b/drivers/net/dsa/sja1105/sja1105.h @@ -218,6 +218,7 @@ struct sja1105_private { struct mutex mgmt_lock; struct dsa_8021q_context *dsa_8021q_ctx; enum sja1105_vlan_state vlan_state; + struct devlink_region **regions; struct sja1105_cbs_entry *cbs; struct sja1105_tagger_data tagger_data; struct sja1105_ptp_data ptp_data; @@ -265,6 +266,8 @@ int sja1105_xfer_u32(const struct sja1105_private *priv, int sja1105_xfer_u64(const struct sja1105_private *priv, sja1105_spi_rw_mode_t rw, u64 reg_addr, u64 *value, struct ptp_system_timestamp *ptp_sts); +int static_config_buf_prepare_for_upload(struct sja1105_private *priv, + void *config_buf, int buf_len); int sja1105_static_config_upload(struct sja1105_private *priv); int sja1105_inhibit_tx(const struct sja1105_private *priv, unsigned long port_bitmap, bool tx_inhibited); |