diff options
author | Ben Hutchings <ben.hutchings@mind.be> | 2021-08-16 21:09:22 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-08-18 09:59:19 +0300 |
commit | 60c007b52779fdea6ae5116c00079cb6a7017c02 (patch) | |
tree | 8a3618ef4fdcef8283ef6778affd408942ac30e5 /drivers/net/plip | |
parent | f365d53c868725c472d515fa1ce4f57d0eaff5ae (diff) | |
download | linux-60c007b52779fdea6ae5116c00079cb6a7017c02.tar.xz |
net: dsa: microchip: ksz8795: Fix PVID tag insertion
commit ef3b02a1d79b691f9a354c4903cf1e6917e315f9 upstream.
ksz8795 has never actually enabled PVID tag insertion, and it also
programmed the PVID incorrectly. To fix this:
* Allow tag insertion to be controlled per ingress port. On most
chips, set bit 2 in Global Control 19. On KSZ88x3 this control
flag doesn't exist.
* When adding a PVID:
- Set the appropriate register bits to enable tag insertion on
egress at every other port if this was the packet's ingress port.
- Mask *out* the VID from the default tag, before or-ing in the new
PVID.
* When removing a PVID:
- Clear the same control bits to disable tag insertion.
- Don't update the default tag. This wasn't doing anything useful.
Fixes: e66f840c08a2 ("net: dsa: ksz: Add Microchip KSZ8795 DSA driver")
Signed-off-by: Ben Hutchings <ben.hutchings@mind.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
[bwh: Backport to 5.10:
- Drop the KSZ88x3 cases as those chips are not supported here
- Handle VID ranges in ksz8795_port_vlan_del()]
Signed-off-by: Ben Hutchings <ben.hutchings@mind.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/plip')
0 files changed, 0 insertions, 0 deletions