linux/drivers/net/dsa/sja1105
Vladimir Oltean 2e554a7a5d net: dsa: propagate switchdev vlan_filtering prepare phase to drivers
A driver may refuse to enable VLAN filtering for any reason beyond what
the DSA framework cares about, such as:
- having tc-flower rules that rely on the switch being VLAN-aware
- the particular switch does not support VLAN, even if the driver does
  (the DSA framework just checks for the presence of the .port_vlan_add
  and .port_vlan_del pointers)
- simply not supporting this configuration to be toggled at runtime

Currently, when a driver rejects a configuration it cannot support, it
does this from the commit phase, which triggers various warnings in
switchdev.

So propagate the prepare phase to drivers, to give them the ability to
refuse invalid configurations cleanly and avoid the warnings.

Since we need to modify all function prototypes and check for the
prepare phase from within the drivers, take that opportunity and move
the existing driver restrictions within the prepare phase where that is
possible and easy.

Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Cc: Woojung Huh <woojung.huh@microchip.com>
Cc: Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>
Cc: Sean Wang <sean.wang@mediatek.com>
Cc: Landen Chao <Landen.Chao@mediatek.com>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Vivien Didelot <vivien.didelot@gmail.com>
Cc: Jonathan McDowell <noodles@earth.li>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Claudiu Manoil <claudiu.manoil@nxp.com>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-10-05 05:56:48 -07:00
..
Kconfig net: dsa: sja1105: support flow-based redirection via virtual links 2020-05-07 17:31:57 -07:00
Makefile net: dsa: sja1105: move devlink param code to sja1105_devlink.c 2020-09-25 16:35:27 -07:00
sja1105_clocking.c net: dsa: sja1105: enable internal pull-down for RX_DV/CRS_DV/RX_CTL and RX_ER 2020-04-20 11:00:27 -07:00
sja1105_devlink.c net: dsa: propagate switchdev vlan_filtering prepare phase to drivers 2020-10-05 05:56:48 -07:00
sja1105_dynamic_config.c net: dsa: sja1105: remove duplicate prefix for VL Lookup dynamic config 2020-10-03 17:34:42 -07:00
sja1105_dynamic_config.h net: dsa: sja1105: make config table operation structures constant 2020-06-22 16:01:29 -07:00
sja1105_ethtool.c dsa: sja1105: fix semicolon.cocci warnings 2020-05-10 11:05:46 -07:00
sja1105_flower.c net:qos: police action offloading parameter 'burst' change to the original value 2020-06-29 17:33:42 -07:00
sja1105_main.c net: dsa: propagate switchdev vlan_filtering prepare phase to drivers 2020-10-05 05:56:48 -07:00
sja1105_ptp.c net: dsa: sja1105: poll for extts events from a timer 2020-08-03 18:16:02 -07:00
sja1105_ptp.h net: dsa: sja1105: poll for extts events from a timer 2020-08-03 18:16:02 -07:00
sja1105_sgmii.h net: dsa: sja1105: Add support for the SGMII port 2020-03-20 08:55:21 -07:00
sja1105_spi.c net: dsa: sja1105: expose static config as devlink region 2020-09-25 16:35:27 -07:00
sja1105_static_config.c net: dsa: sja1105: make config table operation structures constant 2020-06-22 16:01:29 -07:00
sja1105_static_config.h net: dsa: sja1105: make config table operation structures constant 2020-06-22 16:01:29 -07:00
sja1105_tas.c net: dsa: sja1105: Use struct_size() in kzalloc() 2020-06-19 13:42:08 -07:00
sja1105_tas.h net: dsa: sja1105: implement tc-gate using time-triggered virtual links 2020-05-07 17:31:57 -07:00
sja1105_vl.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-06-25 19:29:51 -07:00
sja1105_vl.h net: dsa: sja1105: suppress -Wmissing-prototypes in sja1105_vl.c 2020-06-01 12:13:47 -07:00
sja1105.h net: dsa: propagate switchdev vlan_filtering prepare phase to drivers 2020-10-05 05:56:48 -07:00