OpenCloudOS-Kernel/drivers/net/dsa/mv88e6xxx
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: Make PTP-specific drivers depend on PTP_1588_CLOCK 2020-05-01 15:27:51 -07:00
Makefile net: dsa: mv88e6xxx: Move devlink code into its own file 2020-09-18 18:17:45 -07:00
chip.c net: dsa: propagate switchdev vlan_filtering prepare phase to drivers 2020-10-05 05:56:48 -07:00
chip.h net: dsa: mv88e6xxx: Add devlink regions 2020-09-18 18:18:30 -07:00
devlink.c net: dsa: mv88e6xxx: Add per port devlink regions 2020-10-04 14:38:53 -07:00
devlink.h net: dsa: mv88e6xxx: Implement devlink info get callback 2020-09-18 18:18:30 -07:00
global1.c net: dsa: mv88e6xxx: Use chip-wide max frame size for MTU 2020-07-24 20:03:27 -07:00
global1.h net: dsa: mv88e6xxx: Use chip-wide max frame size for MTU 2020-07-24 20:03:27 -07:00
global1_atu.c net: dsa: mv88e6xxx: Unique ATU and VTU IRQ names 2020-01-06 18:30:15 -08:00
global1_vtu.c net: dsa: mv88e6xxx: Unique ATU and VTU IRQ names 2020-01-06 18:30:15 -08:00
global2.c net: dsa: mv88e6xxx: Remove set but unused variable 2020-07-05 15:43:01 -07:00
global2.h net: dsa: mv8e6xxx: Fix stub function parameters 2019-11-06 21:42:53 -08:00
global2_avb.c net: dsa: mv88e6xxx: wait for AVB Busy bit 2019-08-11 21:27:15 -07:00
global2_scratch.c net: dsa: mv88e6xxx: scratch: Fixup kerneldoc 2020-07-05 15:43:01 -07:00
hwtstamp.c net: dsa: mv88e6xxx: Use generic helper function 2020-08-19 16:07:49 -07:00
hwtstamp.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
phy.c net: dsa: mv88e6xxx: introduce helpers for handling chip->reg_lock 2019-06-23 11:11:11 -07:00
phy.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
port.c net: dsa: mv88e6xxx: remove port_link_state functions 2020-03-15 17:11:12 -07:00
port.h net: dsa: mv88e6xxx: remove port_link_state functions 2020-03-15 17:11:12 -07:00
port_hidden.c net: dsa: mv88e6xxx: update code operating on hidden registers 2019-08-27 21:42:16 -07:00
ptp.c mv88e6xxx: Reject requests to enable time stamping on both edges. 2019-11-15 12:48:32 -08:00
ptp.h net: dsa: mv88e6xxx: add PTP support for MV88E6250 family 2019-08-02 17:58:53 -07:00
serdes.c net: dsa: mv88e6xxx: 88e6390 10G serdes support 2020-05-01 15:40:15 -07:00
serdes.h net: dsa: mv88e6xxx: 88e6390 10G serdes support 2020-05-01 15:40:15 -07:00
smi.c net: dsa: mv88e6xxx: add delay in direct SMI wait 2019-08-11 21:27:15 -07:00
smi.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00