linux/drivers/net/dsa
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
..
b53 net: dsa: propagate switchdev vlan_filtering prepare phase to drivers 2020-10-05 05:56:48 -07:00
microchip net: dsa: propagate switchdev vlan_filtering prepare phase to drivers 2020-10-05 05:56:48 -07:00
mv88e6xxx net: dsa: propagate switchdev vlan_filtering prepare phase to drivers 2020-10-05 05:56:48 -07:00
ocelot net: dsa: propagate switchdev vlan_filtering prepare phase to drivers 2020-10-05 05:56:48 -07:00
qca net: dsa/ar9331: convert to mac_link_up() 2020-06-25 16:01:15 -07:00
sja1105 net: dsa: propagate switchdev vlan_filtering prepare phase to drivers 2020-10-05 05:56:48 -07:00
bcm_sf2.c net: dsa: bcm_sf2: Include address 0 for MDIO diversion 2020-09-23 17:51:16 -07:00
bcm_sf2.h net: dsa: bcm_sf2: recalculate switch clock rate based on ports 2020-09-03 15:08:03 -07:00
bcm_sf2_cfp.c net: dsa: bcm_sf2: Pass GENMASK() signed bits 2020-07-05 15:45:38 -07:00
bcm_sf2_regs.h Revert "net: dsa: bcm_sf2: Also configure Port 5 for 2Gb/sec on 7278" 2020-02-26 16:33:35 -08:00
dsa_loop.c net: dsa: propagate switchdev vlan_filtering prepare phase to drivers 2020-10-05 05:56:48 -07:00
dsa_loop.h
dsa_loop_bdinfo.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
Kconfig net: dsa: mt7530: Add the support of MT7531 switch 2020-09-14 16:30:39 -07:00
lan9303-core.c net: dsa: lan9303: fix variable 'res' set but not used 2020-07-05 15:48:19 -07:00
lan9303.h
lan9303_i2c.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
lan9303_mdio.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
lantiq_gswip.c net: dsa: propagate switchdev vlan_filtering prepare phase to drivers 2020-10-05 05:56:48 -07:00
lantiq_pce.h net: dsa: Use the correct style for SPDX License Identifier 2019-09-22 15:25:08 -07:00
Makefile net: dsa: add support for Atheros AR9331 built-in switch 2019-12-20 17:05:47 -08:00
mt7530.c net: dsa: propagate switchdev vlan_filtering prepare phase to drivers 2020-10-05 05:56:48 -07:00
mt7530.h net: dsa: mt7530: Add the support of MT7531 switch 2020-09-14 16:30:39 -07:00
mv88e6060.c net: dsa: Get information about stacked DSA protocol 2020-01-08 16:01:13 -08:00
mv88e6060.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
qca8k.c net: dsa: propagate switchdev vlan_filtering prepare phase to drivers 2020-10-05 05:56:48 -07:00
qca8k.h net: dsa: qca8k: Add 802.1q VLAN support 2020-08-03 15:45:39 -07:00
realtek-smi-core.c net: dsa: remove dsa_switch_alloc helper 2019-10-22 12:37:07 -07:00
realtek-smi-core.h net: dsa: propagate switchdev vlan_filtering prepare phase to drivers 2020-10-05 05:56:48 -07:00
rtl8366.c net: dsa: propagate switchdev vlan_filtering prepare phase to drivers 2020-10-05 05:56:48 -07:00
rtl8366rb.c net: dsa: rtl8366rb: Support all 4096 VLANs 2020-09-21 14:49:14 -07:00
vitesse-vsc73xx-core.c net: dsa: vsc73xx: make the MTU configurable 2020-03-27 16:07:25 -07:00
vitesse-vsc73xx-platform.c net: dsa: vitesse-vsc73xx: Convert to plain comments to avoid kerneldoc warnings 2020-07-05 15:49:03 -07:00
vitesse-vsc73xx-spi.c net: dsa: vitesse-vsc73xx: Convert to plain comments to avoid kerneldoc warnings 2020-07-05 15:49:03 -07:00
vitesse-vsc73xx.h net: dsa: vsc73xx: Split vsc73xx driver 2019-07-07 14:16:32 -07:00