- Le 13 Jan 21, à 13:45, Gilles Doffe gilles.do...@savoirfairelinux.com a
écrit :
> The FID (Filter ID) is a 7 bits field used to link the VLAN table
> to the static and dynamic mac address tables.
> Until now the KSZ8795 driver could only add one VLAN as the FID was
> alw
This patchset fixes various issues.
It mainly concerns VLANs support by fixing FID table management to
allow adding more than one VLAN.
It also fixes tag/untag behavior on ingress/egress packets.
Gilles DOFFE (6):
net: dsa: ksz: fix FID management
net: dsa: ksz: move tag/untag action
net
If a VLAN is removed, the tagging policy should not be changed as
still active VLANs could be impacted.
Signed-off-by: Gilles DOFFE
---
drivers/net/dsa/microchip/ksz8795.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/net/dsa/microchip/ksz8795.c
b/drivers/net/dsa/microchip
.
Signed-off-by: Gilles DOFFE
---
drivers/net/dsa/microchip/ksz8795.c | 59 +++--
drivers/net/dsa/microchip/ksz8795_reg.h | 1 +
drivers/net/dsa/microchip/ksz_common.h | 1 +
3 files changed, 57 insertions(+), 4 deletions(-)
diff --git a/drivers/net/dsa/microchip
'(u64)*value' casts a u32 to a u64. So depending on endianness,
LSB or MSB is lost.
The pointer needs to be cast to read the full u64:
'*((u64 *)value)'
Signed-off-by: Gilles DOFFE
---
drivers/net/dsa/microchip/ksz_common.h | 2 +-
1 file changed, 1 insertion(+), 1 delet
Move tag/untag action at the end of the function to avoid
tagging or untagging traffic if only vlan 0 is handled.
Signed-off-by: Gilles DOFFE
---
drivers/net/dsa/microchip/ksz8795.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/dsa/microchip/ksz8795.c
b
If 802.1q VLAN tag is removed from egress traffic, ingress
traffic should by logic be tagged.
Signed-off-by: Gilles DOFFE
---
drivers/net/dsa/microchip/ksz8795.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/dsa/microchip/ksz8795.c
b/drivers/net/dsa/microchip/ksz8795.c
index
A logical 'or' was performed until now.
So if vlan 1 is the current pvid and vlan 20 is set as the new one,
vlan 21 is the new pvid.
This commit fixes this by setting the right mask to set the new pvid.
Signed-off-by: Gilles DOFFE
---
drivers/net/dsa/microchip/ksz8795.c | 4 ++--
1 fi