linux/drivers/net/dsa/sja1105
Vladimir Oltean 994d2cbb08 net: dsa: tag_sja1105: be dsa_loop-safe
Add support for tag_sja1105 running on non-sja1105 DSA ports, by making
sure that every time we dereference dp->priv, we check the switch's
dsa_switch_ops (otherwise we access a struct sja1105_port structure that
is in fact something else).

This adds an unconditional build-time dependency between sja1105 being
built as module => tag_sja1105 must also be built as module. This was
there only for PTP before.

Some sane defaults must also take place when not running on sja1105
hardware. These are:

- sja1105_xmit_tpid: the sja1105 driver uses different VLAN protocols
  depending on VLAN awareness and switch revision (when an encapsulated
  VLAN must be sent). Default to 0x8100.

- sja1105_rcv_meta_state_machine: this aggregates PTP frames with their
  metadata timestamp frames. When running on non-sja1105 hardware, don't
  do that and accept all frames unmodified.

- sja1105_defer_xmit: calls sja1105_port_deferred_xmit in sja1105_main.c
  which writes a management route over SPI. When not running on sja1105
  hardware, bypass the SPI write and send the frame as-is.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-18 10:33:15 +01:00
..
Kconfig ethernet: fix PTP_1588_CLOCK dependencies 2021-08-13 17:49:05 -07:00
Makefile net: dsa: sja1105: register the MDIO buses for 100base-T1 and 100base-TX 2021-06-08 14:37:16 -07:00
sja1105.h net: dsa: sja1105: rely on DSA core tracking of port learning state 2021-08-08 20:56:51 +01:00
sja1105_clocking.c net: dsa: sja1105: properly power down the microcontroller clock for SJA1110 2021-06-18 12:26:17 -07:00
sja1105_devlink.c net: dsa: sja1105: delete the best_effort_vlan_filtering mode 2021-07-20 06:36:42 -07:00
sja1105_dynamic_config.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-08-05 15:08:47 -07:00
sja1105_dynamic_config.h net: dsa: sja1105: add support for the SJA1110 switch family 2021-06-08 14:37:16 -07:00
sja1105_ethtool.c net: dsa: sja1105: don't use burst SPI reads for port statistics 2021-05-21 14:01:41 -07:00
sja1105_flower.c net: dsa: sja1105: dimension the data structures for a larger port count 2021-05-24 13:59:03 -07:00
sja1105_main.c net: dsa: tag_sja1105: be dsa_loop-safe 2021-08-18 10:33:15 +01:00
sja1105_mdio.c net: dsa: sja1105: plug in support for 2500base-x 2021-06-11 13:43:56 -07:00
sja1105_ptp.c net: dsa: sja1105: implement TX timestamping for SJA1110 2021-06-11 12:45:38 -07:00
sja1105_ptp.h net: dsa: sja1105: implement TX timestamping for SJA1110 2021-06-11 12:45:38 -07:00
sja1105_spi.c net: dsa: sja1105: properly power down the microcontroller clock for SJA1110 2021-06-18 12:26:17 -07:00
sja1105_static_config.c net: dsa: sja1105: allow the TTEthernet configuration in the static config for SJA1110 2021-06-18 12:26:17 -07:00
sja1105_static_config.h net: dsa: add support for the SJA1110 native tagging protocol 2021-06-11 12:45:38 -07:00
sja1105_tas.c net: dsa: sja1105: parameterize the number of ports 2021-05-24 13:59:03 -07:00
sja1105_tas.h net: dsa: sja1105: dimension the data structures for a larger port count 2021-05-24 13:59:03 -07:00
sja1105_vl.c net: dsa: sja1105: delete the best_effort_vlan_filtering mode 2021-07-20 06:36:42 -07:00
sja1105_vl.h net: dsa: sja1105: suppress -Wmissing-prototypes in sja1105_vl.c 2020-06-01 12:13:47 -07:00