Re: [PATCH net 1/6] net: dsa: ksz: fix FID management

2021-01-13 Thread Gilles Doffe
- 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

[PATCH net 0/6] Fixes on Microchip KSZ8795 DSA switch driver

2021-01-13 Thread Gilles DOFFE
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

[PATCH net 2/6] net: dsa: ksz: move tag/untag action

2021-01-13 Thread Gilles DOFFE
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

[PATCH net 4/6] net: dsa: ksz: do not change tagging on del

2021-01-13 Thread Gilles DOFFE
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

[PATCH net 1/6] net: dsa: ksz: fix FID management

2021-01-13 Thread Gilles DOFFE
. 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

[PATCH net 6/6] net: dsa: ksz: fix wrong read cast to u64

2021-01-13 Thread Gilles DOFFE
'(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

[PATCH net 5/6] net: dsa: ksz: fix wrong pvid

2021-01-13 Thread Gilles DOFFE
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

[PATCH net 3/6] net: dsa: ksz: insert tag on ks8795 ingress packets

2021-01-13 Thread Gilles DOFFE
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

[PATCH v4] ARM: dts: imx6qdl-rex: add gpio expander pca9535

2019-10-16 Thread Gilles DOFFE
MX6QDL_PAD_NANDF_CS3__GPIO6_IO16. Signed-off-by: Gilles DOFFE --- arch/arm/boot/dts/imx6qdl-rex.dtsi | 19 +++ 1 file changed, 19 insertions(+) diff --git a/arch/arm/boot/dts/imx6qdl-rex.dtsi b/arch/arm/boot/dts/imx6qdl-rex.dtsi index 97f1659144ea..305b57fadc60 100644 --- a/arch/arm/boot/dts/imx6qdl

Re: [PATCH v3] ARM: dts: imx6qdl-rex: add gpio expander pca9535

2019-10-16 Thread Gilles Doffe
- Le 7 Oct 19, à 13:24, shawnguo shawn...@kernel.org a écrit : > On Mon, Sep 16, 2019 at 12:43:53PM +0200, Gilles DOFFE wrote: >> The pca9535 gpio expander is present on the Rex baseboard, but missing >> from the dtsi. >> The pca9535 is on i2c2 bus which is common to the

[PATCH v3] ARM: dts: imx6qdl-rex: add gpio expander pca9535

2019-09-16 Thread Gilles DOFFE
MX6QDL_PAD_NANDF_CS3__GPIO6_IO16. Signed-off-by: Gilles DOFFE --- arch/arm/boot/dts/imx6qdl-rex.dtsi | 19 +++ 1 file changed, 19 insertions(+) diff --git a/arch/arm/boot/dts/imx6qdl-rex.dtsi b/arch/arm/boot/dts/imx6qdl-rex.dtsi index 97f1659144ea..8a748ca1b108 100644 --- a/arch/arm/boot/dts/imx6qdl

Re: [PATCH v2] arm: dts: imx6qdl: add gpio expander pca9535

2019-09-13 Thread Gilles Doffe
Hi Marco, Ack for all, v3 incoming. Thank you, Gilles - Le 12 Sep 19, à 12:12, Marco Felsch m.fel...@pengutronix.de a écrit : > Hi Gilles, > > On 19-09-12 06:01, Gilles Doffe wrote: >> Hi Marco, >> >> Thanks for your reply and sorry about the delay. > >

Re: [PATCH v2] arm: dts: imx6qdl: add gpio expander pca9535

2019-09-12 Thread Gilles Doffe
ff common to all rex SOM should be in imx6qdl-rex.dtsi and not in the dts. Does-it seem correct to you ? > > On 19-07-19 12:46, Gilles DOFFE wrote: >> The pca9535 gpio expander is present on the Rex baseboard, but missing >> from the dtsi. >> >> Add the new gpio co

Re: [PATCH] arm: dts: imx6qdl: add gpio expander pca9535

2019-07-19 Thread Gilles Doffe
Hello Marco, Thanks for your review. Corrected in v2. Regards, Gilles - Le 12 Juil 19, à 15:55, Marco Felsch m.fel...@pengutronix.de a écrit : Hi, On 19-07-12 14:45, Gilles DOFFE wrote: > The pca9535 gpio expander is present on the Rex baseboard, but missing > from the dtsi. >

[PATCH v2] arm: dts: imx6qdl: add gpio expander pca9535

2019-07-19 Thread Gilles DOFFE
The pca9535 gpio expander is present on the Rex baseboard, but missing from the dtsi. Add the new gpio controller and the associated interrupt line MX6QDL_PAD_NANDF_CS3__GPIO6_IO16. Signed-off-by: Gilles DOFFE --- arch/arm/boot/dts/imx6qdl-rex.dtsi | 19 +++ 1 file changed, 19

[PATCH] arm: dts: imx6qdl: add gpio expander pca9535

2019-07-12 Thread Gilles DOFFE
The pca9535 gpio expander is present on the Rex baseboard, but missing from the dtsi. Add the new gpio controller and the associated interrupt line MX6QDL_PAD_NANDF_CS3__GPIO6_IO16. Signed-off-by: Gilles DOFFE --- arch/arm/boot/dts/imx6qdl-rex.dtsi | 19 +++ 1 file changed, 19