[PATCH net-next v2 2/9] net: dsa: mv88e6xxx: use 4-bit port for PVT data

2017-03-30 Thread Vivien Didelot
initialize the PVT content. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c | 15 +++ drivers/net/dsa/mv88e6xxx/global2.c | 25 + drivers/net/dsa/mv88e6xxx/global2.h | 7 +++ drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 1 + 4 files

[PATCH net-next v2 8/9] net: dsa: add cross-chip bridging operations

2017-03-30 Thread Vivien Didelot
Introduce crosschip_bridge_{join,leave} operations in the dsa_switch_ops structure, which can be used by switches supporting interconnection. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- include/net/dsa.h | 8 net/dsa/switch.c | 12 ++-- 2

[PATCH net-next v2 8/9] net: dsa: add cross-chip bridging operations

2017-03-30 Thread Vivien Didelot
Introduce crosschip_bridge_{join,leave} operations in the dsa_switch_ops structure, which can be used by switches supporting interconnection. Signed-off-by: Vivien Didelot --- include/net/dsa.h | 8 net/dsa/switch.c | 12 ++-- 2 files changed, 14 insertions(+), 6 deletions

[PATCH net-next v2 6/9] net: dsa: mv88e6xxx: factorize in-chip bridge map

2017-03-30 Thread Vivien Didelot
Factorize the code in the DSA port_bridge_{join,leave} routines used to program the port VLAN map of all local ports of a given bridge group. At the same time shorten the _mv88e6xxx_port_based_vlan_map to get rid of the old underscore prefix naming convention. Signed-off-by: Vivien Didelot

[PATCH net-next v2 6/9] net: dsa: mv88e6xxx: factorize in-chip bridge map

2017-03-30 Thread Vivien Didelot
Factorize the code in the DSA port_bridge_{join,leave} routines used to program the port VLAN map of all local ports of a given bridge group. At the same time shorten the _mv88e6xxx_port_based_vlan_map to get rid of the old underscore prefix naming convention. Signed-off-by: Vivien Didelot

[PATCH net-next v2 4/9] net: dsa: mv88e6xxx: allocate the number of ports

2017-03-30 Thread Vivien Didelot
The current code allocates DSA_MAX_PORTS ports for a Marvell dsa_switch structure. Provide the exact number of ports so the corresponding ds->num_ports is accurate. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- drivers/net/dsa/mv88e6xxx/chip.c | 2 +- 1 file c

[PATCH net-next v2 4/9] net: dsa: mv88e6xxx: allocate the number of ports

2017-03-30 Thread Vivien Didelot
The current code allocates DSA_MAX_PORTS ports for a Marvell dsa_switch structure. Provide the exact number of ports so the corresponding ds->num_ports is accurate. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) d

[PATCH net-next v2 9/9] net: dsa: mv88e6xxx: add cross-chip bridging

2017-03-30 Thread Vivien Didelot
ports, as well as bridge group members, can egress frames on local ports. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- drivers/net/dsa/mv88e6xxx/chip.c | 34 +- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/drivers/n

[PATCH net-next v2 9/9] net: dsa: mv88e6xxx: add cross-chip bridging

2017-03-30 Thread Vivien Didelot
ports, as well as bridge group members, can egress frames on local ports. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c | 34 +- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa

[PATCH net-next v2 1/9] net: dsa: mv88e6xxx: move PVT description in info

2017-03-30 Thread Vivien Didelot
flag. Add a mv88e6xxx_has_pvt helper to wrap future checks of that condition. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> Reviewed-by: Andrew Lunn <and...@lunn.ch> --- drivers/net/dsa/mv88e6xxx/chip.c | 22 ++ drivers/net/dsa/mv88e6xxx/global2.c

[PATCH net-next v2 1/9] net: dsa: mv88e6xxx: move PVT description in info

2017-03-30 Thread Vivien Didelot
flag. Add a mv88e6xxx_has_pvt helper to wrap future checks of that condition. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.c | 22 ++ drivers/net/dsa/mv88e6xxx/global2.c | 2 +- drivers/net/dsa/mv88e6xxx/mv88e6

[PATCH net-next v2 0/9] net: dsa: mv88e6xxx: program cross-chip bridging

2017-03-30 Thread Vivien Didelot
variant - add Andrew's tags and reword commit 6/9 Vivien Didelot (9): net: dsa: mv88e6xxx: move PVT description in info net: dsa: mv88e6xxx: use 4-bit port for PVT data net: dsa: mv88e6xxx: program the PVT with all ones net: dsa: mv88e6xxx: allocate the number of ports net: dsa

[PATCH net-next v2 7/9] net: dsa: mv88e6xxx: remap existing bridge members

2017-03-30 Thread Vivien Didelot
, allowing any external port to egress frames locally. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> Reviewed-by: Andrew Lunn <and...@lunn.ch> --- drivers/net/dsa/mv88e6xxx/chip.c | 20 1 file changed, 20 insertions(+) diff --git a/dri

[PATCH net-next v2 5/9] net: dsa: mv88e6xxx: rework in-chip bridging

2017-03-30 Thread Vivien Didelot
that it can be shared later with the cross-chip bridging code. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> Reviewed-by: Andrew Lunn <and...@lunn.ch> --- drivers/net/dsa/mv88e6xxx/chip.c | 53 ++-- 1 file changed, 34 insertions(+),

[PATCH net-next v2 0/9] net: dsa: mv88e6xxx: program cross-chip bridging

2017-03-30 Thread Vivien Didelot
variant - add Andrew's tags and reword commit 6/9 Vivien Didelot (9): net: dsa: mv88e6xxx: move PVT description in info net: dsa: mv88e6xxx: use 4-bit port for PVT data net: dsa: mv88e6xxx: program the PVT with all ones net: dsa: mv88e6xxx: allocate the number of ports net: dsa

[PATCH net-next v2 7/9] net: dsa: mv88e6xxx: remap existing bridge members

2017-03-30 Thread Vivien Didelot
, allowing any external port to egress frames locally. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index

[PATCH net-next v2 5/9] net: dsa: mv88e6xxx: rework in-chip bridging

2017-03-30 Thread Vivien Didelot
that it can be shared later with the cross-chip bridging code. Signed-off-by: Vivien Didelot Reviewed-by: Andrew Lunn --- drivers/net/dsa/mv88e6xxx/chip.c | 53 ++-- 1 file changed, 34 insertions(+), 19 deletions(-) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b

[PATCH net-next v2 3/9] net: dsa: mv88e6xxx: program the PVT with all ones

2017-03-30 Thread Vivien Didelot
. The current behavior is unchanged for the moment. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- drivers/net/dsa/mv88e6xxx/chip.c | 31 - drivers/net/dsa/mv88e6xxx/global2.c | 52 +-- drivers/net/dsa/mv8

[PATCH net-next v2 3/9] net: dsa: mv88e6xxx: program the PVT with all ones

2017-03-30 Thread Vivien Didelot
. The current behavior is unchanged for the moment. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c | 31 - drivers/net/dsa/mv88e6xxx/global2.c | 52 +-- drivers/net/dsa/mv88e6xxx/global2.h | 8 ++ drivers/net/dsa

Re: [PATCH net-next 3/9] net: dsa: mv88e6xxx: program the PVT with all ones

2017-03-30 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: >> +for (dev = 0; dev < 32; ++dev) { >> +for (port = 0; port < 16; ++port) { >> +err = mv88e6xxx_pvt_map(chip, dev, port); >> +if (err) >> +return err; >> +

Re: [PATCH net-next 3/9] net: dsa: mv88e6xxx: program the PVT with all ones

2017-03-30 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: >> +for (dev = 0; dev < 32; ++dev) { >> +for (port = 0; port < 16; ++port) { >> +err = mv88e6xxx_pvt_map(chip, dev, port); >> +if (err) >> +return err; >> +} >> +}

Re: [PATCH net-next 4/9] net: dsa: mv88e6xxx: allocate the number of ports

2017-03-30 Thread Vivien Didelot
Hi Andrew, Andrew Lunn <and...@lunn.ch> writes: > On Wed, Mar 29, 2017 at 04:30:15PM -0400, Vivien Didelot wrote: >> The current code allocates DSA_MAX_PORTS ports for a Marvell dsa_switch >> structure. Provide the exact number of ports so the corresponding >>

Re: [PATCH net-next 4/9] net: dsa: mv88e6xxx: allocate the number of ports

2017-03-30 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: > On Wed, Mar 29, 2017 at 04:30:15PM -0400, Vivien Didelot wrote: >> The current code allocates DSA_MAX_PORTS ports for a Marvell dsa_switch >> structure. Provide the exact number of ports so the corresponding >> ds->num_ports is accura

[PATCH net-next 1/9] net: dsa: mv88e6xxx: move PVT description in info

2017-03-29 Thread Vivien Didelot
flag. Add a mv88e6xxx_has_pvt helper to wrap future checks of that condition. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- drivers/net/dsa/mv88e6xxx/chip.c | 22 ++ drivers/net/dsa/mv88e6xxx/global2.c | 2 +- drivers/net/dsa/mv88e6xxx/

[PATCH net-next 1/9] net: dsa: mv88e6xxx: move PVT description in info

2017-03-29 Thread Vivien Didelot
flag. Add a mv88e6xxx_has_pvt helper to wrap future checks of that condition. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c | 22 ++ drivers/net/dsa/mv88e6xxx/global2.c | 2 +- drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 32 +++- 3 fil

[PATCH net-next 5/9] net: dsa: mv88e6xxx: rework in-chip bridging

2017-03-29 Thread Vivien Didelot
that it can be shared later with the cross-chip bridging code. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- drivers/net/dsa/mv88e6xxx/chip.c | 53 ++-- 1 file changed, 34 insertions(+), 19 deletions(-) diff --git a/drivers/n

[PATCH net-next 5/9] net: dsa: mv88e6xxx: rework in-chip bridging

2017-03-29 Thread Vivien Didelot
that it can be shared later with the cross-chip bridging code. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c | 53 ++-- 1 file changed, 34 insertions(+), 19 deletions(-) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx

[PATCH net-next 8/9] net: dsa: add cross-chip bridging operations

2017-03-29 Thread Vivien Didelot
Introduce crosschip_bridge_{join,leave} operations in the dsa_switch_ops structure, which can be used by switches supporting interconnection. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- include/net/dsa.h | 8 net/dsa/switch.c | 12 ++-- 2

[PATCH net-next 8/9] net: dsa: add cross-chip bridging operations

2017-03-29 Thread Vivien Didelot
Introduce crosschip_bridge_{join,leave} operations in the dsa_switch_ops structure, which can be used by switches supporting interconnection. Signed-off-by: Vivien Didelot --- include/net/dsa.h | 8 net/dsa/switch.c | 12 ++-- 2 files changed, 14 insertions(+), 6 deletions

[PATCH net-next 7/9] net: dsa: mv88e6xxx: remap existing bridge members

2017-03-29 Thread Vivien Didelot
, allowing any external port to egress frames locally. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- drivers/net/dsa/mv88e6xxx/chip.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv8

[PATCH net-next 7/9] net: dsa: mv88e6xxx: remap existing bridge members

2017-03-29 Thread Vivien Didelot
, allowing any external port to egress frames locally. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index 99f8c6106af5..31c296a04f03

[PATCH net-next 9/9] net: dsa: mv88e6xxx: add cross-chip bridging

2017-03-29 Thread Vivien Didelot
ports, as well as bridge group members, can egress frames on local ports. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- drivers/net/dsa/mv88e6xxx/chip.c | 34 +- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/drivers/n

[PATCH net-next 9/9] net: dsa: mv88e6xxx: add cross-chip bridging

2017-03-29 Thread Vivien Didelot
ports, as well as bridge group members, can egress frames on local ports. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c | 34 +- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa

[PATCH net-next 3/9] net: dsa: mv88e6xxx: program the PVT with all ones

2017-03-29 Thread Vivien Didelot
. The current behavior is unchanged for the moment. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- drivers/net/dsa/mv88e6xxx/chip.c| 31 +- drivers/net/dsa/mv88e6xxx/global2.c | 52 +++-- drivers/net/dsa/mv8

[PATCH net-next 3/9] net: dsa: mv88e6xxx: program the PVT with all ones

2017-03-29 Thread Vivien Didelot
. The current behavior is unchanged for the moment. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c| 31 +- drivers/net/dsa/mv88e6xxx/global2.c | 52 +++-- drivers/net/dsa/mv88e6xxx/global2.h | 8 ++ 3 files changed, 82

[PATCH net-next 4/9] net: dsa: mv88e6xxx: allocate the number of ports

2017-03-29 Thread Vivien Didelot
The current code allocates DSA_MAX_PORTS ports for a Marvell dsa_switch structure. Provide the exact number of ports so the corresponding ds->num_ports is accurate. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- drivers/net/dsa/mv88e6xxx/chip.c | 2 +- 1 file c

[PATCH net-next 4/9] net: dsa: mv88e6xxx: allocate the number of ports

2017-03-29 Thread Vivien Didelot
The current code allocates DSA_MAX_PORTS ports for a Marvell dsa_switch structure. Provide the exact number of ports so the corresponding ds->num_ports is accurate. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) d

[PATCH net-next 2/9] net: dsa: mv88e6xxx: use 4-bit port for PVT data

2017-03-29 Thread Vivien Didelot
initialize the PVT content. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- drivers/net/dsa/mv88e6xxx/chip.c | 15 +++ drivers/net/dsa/mv88e6xxx/global2.c | 19 +++ drivers/net/dsa/mv88e6xxx/global2.h | 7 +++ drivers/net/dsa/mv8

[PATCH net-next 2/9] net: dsa: mv88e6xxx: use 4-bit port for PVT data

2017-03-29 Thread Vivien Didelot
initialize the PVT content. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c | 15 +++ drivers/net/dsa/mv88e6xxx/global2.c | 19 +++ drivers/net/dsa/mv88e6xxx/global2.h | 7 +++ drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 1 + 4 files changed, 42

[PATCH net-next 0/9] net: dsa: mv88e6xxx: program cross-chip bridging

2017-03-29 Thread Vivien Didelot
* * * - - * * 03- - - - - * * 04- - - - - * * 05* * * * * * * 06* * * * * * * Vivien Didelot (9): net: dsa: mv88e6xxx: move PVT description in info net: dsa: mv88e6xxx: use 4-bit port for PVT data net: dsa

[PATCH net-next 0/9] net: dsa: mv88e6xxx: program cross-chip bridging

2017-03-29 Thread Vivien Didelot
* * * - - * * 03- - - - - * * 04- - - - - * * 05* * * * * * * 06* * * * * * * Vivien Didelot (9): net: dsa: mv88e6xxx: move PVT description in info net: dsa: mv88e6xxx: use 4-bit port for PVT data net: dsa

[PATCH net-next 6/9] net: dsa: mv88e6xxx: factorize in-chip bridge map

2017-03-29 Thread Vivien Didelot
Factorize the code in the DSA port_bridge_{join,leave} routines used to program the port VLAN map of all local ports of a given bridge group. In the meantime shorten the _mv88e6xxx_port_based_vlan_map to get rid of the old underscore prefix naming convention. Signed-off-by: Vivien Didelot

[PATCH net-next 6/9] net: dsa: mv88e6xxx: factorize in-chip bridge map

2017-03-29 Thread Vivien Didelot
Factorize the code in the DSA port_bridge_{join,leave} routines used to program the port VLAN map of all local ports of a given bridge group. In the meantime shorten the _mv88e6xxx_port_based_vlan_map to get rid of the old underscore prefix naming convention. Signed-off-by: Vivien Didelot

[PATCH RESEND net-next] net: dsa: mv88e6xxx: debug ATU Age Time

2017-03-29 Thread Vivien Didelot
5000 ms)" while on 6390 we get "AgeTime set to 0x05 (18750 ms)". Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- drivers/net/dsa/mv88e6xxx/global1_atu.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/dsa/mv88e6

[PATCH RESEND net-next] net: dsa: mv88e6xxx: debug ATU Age Time

2017-03-29 Thread Vivien Didelot
5000 ms)" while on 6390 we get "AgeTime set to 0x05 (18750 ms)". Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/global1_atu.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/dsa/mv88e6xxx/global1_atu.c b/drivers/net/dsa

Re: [PATCH] ARM: dts: vf610-zii-dev-rev-b: change switch2 label

2017-03-28 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: > You might need to rebase this onto > > git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git > > There have been a few other changes to the ZII dts files this cycle. This patch applies correctly on shawnguo/for-next. Is it the correct

Re: [PATCH] ARM: dts: vf610-zii-dev-rev-b: change switch2 label

2017-03-28 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: > You might need to rebase this onto > > git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git > > There have been a few other changes to the ZII dts files this cycle. This patch applies correctly on shawnguo/for-next. Is it the correct branch to

[PATCH] ARM: dts: vf610-zii-dev-rev-b: change switch2 label

2017-03-28 Thread Vivien Didelot
Rename the switch2@0 label of the switch2 node to switch@0 to respect the general unit@address DTS rule, and be consistent with the other switch nodes of the DTS file. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- arch/arm/boot/dts/vf610-zii-dev-rev-b.dts | 2 +-

[PATCH] ARM: dts: vf610-zii-dev-rev-b: change switch2 label

2017-03-28 Thread Vivien Didelot
Rename the switch2@0 label of the switch2 node to switch@0 to respect the general unit@address DTS rule, and be consistent with the other switch nodes of the DTS file. Signed-off-by: Vivien Didelot --- arch/arm/boot/dts/vf610-zii-dev-rev-b.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion

Re: [PATCH net-next] ARM: dts: vf610-zii-dev-rev-b: change switch2 label

2017-03-28 Thread Vivien Didelot
Hi Florian, Florian Fainelli <f.faine...@gmail.com> writes: > On 03/28/2017 12:11 PM, Vivien Didelot wrote: >> Rename the switch2@0 label of the switch2 node to switch@0 to respect >> the general unit@address DTS rule, and be consistent with the other >> s

Re: [PATCH net-next] ARM: dts: vf610-zii-dev-rev-b: change switch2 label

2017-03-28 Thread Vivien Didelot
Hi Florian, Florian Fainelli writes: > On 03/28/2017 12:11 PM, Vivien Didelot wrote: >> Rename the switch2@0 label of the switch2 node to switch@0 to respect >> the general unit@address DTS rule, and be consistent with the other >> switch nodes of the DTS file. >>

[PATCH net-next] ARM: dts: vf610-zii-dev-rev-b: change switch2 label

2017-03-28 Thread Vivien Didelot
Rename the switch2@0 label of the switch2 node to switch@0 to respect the general unit@address DTS rule, and be consistent with the other switch nodes of the DTS file. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- arch/arm/boot/dts/vf610-zii-dev-rev-b.dts | 2 +-

[PATCH net-next] ARM: dts: vf610-zii-dev-rev-b: change switch2 label

2017-03-28 Thread Vivien Didelot
Rename the switch2@0 label of the switch2 node to switch@0 to respect the general unit@address DTS rule, and be consistent with the other switch nodes of the DTS file. Signed-off-by: Vivien Didelot --- arch/arm/boot/dts/vf610-zii-dev-rev-b.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH net-next] net: dsa: fix copyright holder

2017-03-28 Thread Vivien Didelot
I do not hold the copyright of the DSA core and drivers source files, since these changes have been written as an initiative of my day job. Fix this. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- drivers/net/dsa/mv88e6xxx/chip.c| 3 +++ drivers/net/dsa/mv8

[PATCH net-next] net: dsa: fix copyright holder

2017-03-28 Thread Vivien Didelot
I do not hold the copyright of the DSA core and drivers source files, since these changes have been written as an initiative of my day job. Fix this. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c| 3 +++ drivers/net/dsa/mv88e6xxx/global1.c | 3 ++- drivers/net/dsa

[PATCH net-next] net: dsa: mv88e6xxx: unconditionally set ATU trunk

2017-03-28 Thread Vivien Didelot
Set the trunk member of the mv88e6xxx_atu_entry structure regardless its value, so that uninitialized structures gets the correct boolean value. Note that no mainline code is affected by the current behavior. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- drive

[PATCH net-next] net: dsa: mv88e6xxx: unconditionally set ATU trunk

2017-03-28 Thread Vivien Didelot
Set the trunk member of the mv88e6xxx_atu_entry structure regardless its value, so that uninitialized structures gets the correct boolean value. Note that no mainline code is affected by the current behavior. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/global1_atu.c | 4 +--- 1

Re: [PATCH net-next] net: dsa: mv88e6xxx: debug ATU Age Time

2017-03-28 Thread Vivien Didelot
Hi David, Vivien Didelot <vivien.dide...@savoirfairelinux.com> writes: > The ATU ageing time value programmed in the switch is rounded up to the > nearest multiple of its coefficient (variable depending on the model.) > > Add a debug message to inform the user about the exac

Re: [PATCH net-next] net: dsa: mv88e6xxx: debug ATU Age Time

2017-03-28 Thread Vivien Didelot
Hi David, Vivien Didelot writes: > The ATU ageing time value programmed in the switch is rounded up to the > nearest multiple of its coefficient (variable depending on the model.) > > Add a debug message to inform the user about the exact programmed value. > > On 6352, "

[PATCH net-next 4/4] net: dsa: mv88e6xxx: remove 88E6391 ops

2017-03-28 Thread Vivien Didelot
We don't support 88E6391 anywhere in the code, so remove the unused mv88e6391_ops structure. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- drivers/net/dsa/mv88e6xxx/chip.c | 30 -- 1 file changed, 30 deletions(-) diff --git a/drivers/n

[PATCH net-next 4/4] net: dsa: mv88e6xxx: remove 88E6391 ops

2017-03-28 Thread Vivien Didelot
We don't support 88E6391 anywhere in the code, so remove the unused mv88e6391_ops structure. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c | 30 -- 1 file changed, 30 deletions(-) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa

[PATCH net-next 2/4] net: dsa: mv88e6xxx: reorder 88E6341 definitions

2017-03-28 Thread Vivien Didelot
The related mv88e6xxx_ops structure was misplaced. Reorder it correctly to fix this. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- drivers/net/dsa/mv88e6xxx/chip.c | 62 1 file changed, 31 insertions(+), 31 deletions(-)

[PATCH net-next 2/4] net: dsa: mv88e6xxx: reorder 88E6341 definitions

2017-03-28 Thread Vivien Didelot
The related mv88e6xxx_ops structure was misplaced. Reorder it correctly to fix this. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c | 62 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c

[PATCH net-next 0/4] net: dsa: fix chip definitions

2017-03-28 Thread Vivien Didelot
The definitions of some of the mv88e6xxx_ops and mv88e6xxx_info structures are misordered and erroneous for 88E6191 and 88E6391. This patch series cleans that up. Vivien Didelot (4): net: dsa: mv88e6xxx: reorder 88E6141 definitions net: dsa: mv88e6xxx: reorder 88E6341 definitions net: dsa

[PATCH net-next 3/4] net: dsa: mv88e6xxx: fix 88E6191 ops

2017-03-28 Thread Vivien Didelot
The mv88e6xxx_info structure for the 88E6191 chip was pointing the mv88e6391_ops definition instead of mv88e6191_ops. Fix this. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- drivers/net/dsa/mv88e6xxx/chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH net-next 0/4] net: dsa: fix chip definitions

2017-03-28 Thread Vivien Didelot
The definitions of some of the mv88e6xxx_ops and mv88e6xxx_info structures are misordered and erroneous for 88E6191 and 88E6391. This patch series cleans that up. Vivien Didelot (4): net: dsa: mv88e6xxx: reorder 88E6141 definitions net: dsa: mv88e6xxx: reorder 88E6341 definitions net: dsa

[PATCH net-next 3/4] net: dsa: mv88e6xxx: fix 88E6191 ops

2017-03-28 Thread Vivien Didelot
The mv88e6xxx_info structure for the 88E6191 chip was pointing the mv88e6391_ops definition instead of mv88e6191_ops. Fix this. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c

[PATCH net-next 1/4] net: dsa: mv88e6xxx: reorder 88E6141 definitions

2017-03-28 Thread Vivien Didelot
The related mv88e6xxx_ops and mv88e6xxx_info structure were misplaced. Reorder them correctly to fix this. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- drivers/net/dsa/mv88e6xxx/chip.c | 92 1 file changed, 46 insertions(

[PATCH net-next 1/4] net: dsa: mv88e6xxx: reorder 88E6141 definitions

2017-03-28 Thread Vivien Didelot
The related mv88e6xxx_ops and mv88e6xxx_info structure were misplaced. Reorder them correctly to fix this. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c | 92 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/drivers

[PATCH net-next v2 0/3] net: dsa: check out-of-range ageing time

2017-03-15 Thread Vivien Didelot
[ 8530.257852] br0: failed (err=-34) to set attribute (id=5) This patchset fixes this by adding ageing_time_min and ageing_time_max fields to the dsa_switch structure, which can optionally be set by a DSA driver. If provided, the DSA core will check for out-of-range values in the SWITCHDE

[PATCH net-next v2 1/3] net: dsa: dsa_fastest_ageing_time return unsigned

2017-03-15 Thread Vivien Didelot
The ageing time is defined as unsigned int, so make dsa_fastest_ageing_time return an unsigned int instead of int. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- net/dsa/slave.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/dsa/slave.c

[PATCH net-next v2 2/3] net: dsa: check out-of-range ageing time value

2017-03-15 Thread Vivien Didelot
time limits. The DSA core will now check for provided ageing time limits and return -ERANGE from the switchdev prepare phase if the value is out-of-range. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- include/net/dsa.h | 4 net/dsa/slave.c | 8 ++-- 2

[PATCH net-next v2 1/3] net: dsa: dsa_fastest_ageing_time return unsigned

2017-03-15 Thread Vivien Didelot
The ageing time is defined as unsigned int, so make dsa_fastest_ageing_time return an unsigned int instead of int. Signed-off-by: Vivien Didelot --- net/dsa/slave.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/dsa/slave.c b/net/dsa/slave.c index c34872e1febc

[PATCH net-next v2 2/3] net: dsa: check out-of-range ageing time value

2017-03-15 Thread Vivien Didelot
time limits. The DSA core will now check for provided ageing time limits and return -ERANGE from the switchdev prepare phase if the value is out-of-range. Signed-off-by: Vivien Didelot --- include/net/dsa.h | 4 net/dsa/slave.c | 8 ++-- 2 files changed, 10 insertions(+), 2 deletions

[PATCH net-next v2 0/3] net: dsa: check out-of-range ageing time

2017-03-15 Thread Vivien Didelot
[ 8530.257852] br0: failed (err=-34) to set attribute (id=5) This patchset fixes this by adding ageing_time_min and ageing_time_max fields to the dsa_switch structure, which can optionally be set by a DSA driver. If provided, the DSA core will check for out-of-range values in the SWITCHDE

[PATCH net-next v2 3/3] net: dsa: mv88e6xxx: specify ageing time limits

2017-03-15 Thread Vivien Didelot
Now that DSA has ageing time limits, specify them when registering a switch so that out-of-range values are handled correctly by the core. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> Reported-by: Jason Cobham <jcob...@questertangent.com> --- drivers/net/d

[PATCH net-next v2 3/3] net: dsa: mv88e6xxx: specify ageing time limits

2017-03-15 Thread Vivien Didelot
Now that DSA has ageing time limits, specify them when registering a switch so that out-of-range values are handled correctly by the core. Signed-off-by: Vivien Didelot Reported-by: Jason Cobham --- drivers/net/dsa/mv88e6xxx/chip.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers

Re: [PATCH net-next] net: dsa: mv88e6xxx: debug ATU Age Time

2017-03-14 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: >> The never ever seeing R/W failure on MDIO bus is not exactly accurate. >> We had with art (atheros calibration tool) the problem that interrupts >> were being disabled which lead to MDIO operations running into >> timout/failing. > > Yes, i've

Re: [PATCH net-next] net: dsa: mv88e6xxx: debug ATU Age Time

2017-03-14 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: >> The never ever seeing R/W failure on MDIO bus is not exactly accurate. >> We had with art (atheros calibration tool) the problem that interrupts >> were being disabled which lead to MDIO operations running into >> timout/failing. > > Yes, i've seen similar with

Re: [PATCH net-next 2/4] net-next: dsa: add Mediatek tag RX/TX handler

2017-03-14 Thread Vivien Didelot
Hi Sean, Sean Wang writes: >> This won't apply, the port index in now stored in p->dp->index. > > It seems that I need to upgrade to newer kernel to verify this Correct. In fact every time you send patches to net-next (or any other subsystem branch), you must rebase

Re: [PATCH net-next 2/4] net-next: dsa: add Mediatek tag RX/TX handler

2017-03-14 Thread Vivien Didelot
Hi Sean, Sean Wang writes: >> This won't apply, the port index in now stored in p->dp->index. > > It seems that I need to upgrade to newer kernel to verify this Correct. In fact every time you send patches to net-next (or any other subsystem branch), you must rebase your patch series onto the

[PATCH net-next] net: dsa: mv88e6xxx: debug ATU Age Time

2017-03-13 Thread Vivien Didelot
5000 ms)" while on 6390 we get "AgeTime set to 0x05 (18750 ms)". Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- drivers/net/dsa/mv88e6xxx/global1_atu.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/dsa/mv88e6

[PATCH net-next] net: dsa: mv88e6xxx: debug ATU Age Time

2017-03-13 Thread Vivien Didelot
5000 ms)" while on 6390 we get "AgeTime set to 0x05 (18750 ms)". Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/global1_atu.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/dsa/mv88e6xxx/global1_atu.c b/drivers/net/dsa

[PATCH net-next] net: dsa: mv88e6xxx: set out of range ageing time

2017-03-13 Thread Vivien Didelot
-- [ 8530.257852] br0: failed (err=-34) to set attribute (id=5) Fix this in the mv88e6xxx driver by limiting the 8-bit AgeTime value to its minimum or maximum for out-of-range values. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> Reported-by: Jason Cobham <jcob..

[PATCH net-next] net: dsa: mv88e6xxx: set out of range ageing time

2017-03-13 Thread Vivien Didelot
-- [ 8530.257852] br0: failed (err=-34) to set attribute (id=5) Fix this in the mv88e6xxx driver by limiting the 8-bit AgeTime value to its minimum or maximum for out-of-range values. Signed-off-by: Vivien Didelot Reported-by: Jason Cobham --- drivers/net/dsa/mv88e6xxx/global1_atu.c | 1

Re: [PATCH net-next 2/4] net-next: dsa: add Mediatek tag RX/TX handler

2017-03-13 Thread Vivien Didelot
Hi Sean, sean.w...@mediatek.com writes: > + mtk_tag[1] = (1 << p->port) & MTK_HDR_XMIT_DP_BIT_MASK; This won't apply, the port index in now stored in p->dp->index. Thanks, Vivien

Re: [PATCH net-next 2/4] net-next: dsa: add Mediatek tag RX/TX handler

2017-03-13 Thread Vivien Didelot
Hi Sean, sean.w...@mediatek.com writes: > + mtk_tag[1] = (1 << p->port) & MTK_HDR_XMIT_DP_BIT_MASK; This won't apply, the port index in now stored in p->dp->index. Thanks, Vivien

Re: [PATCH net-next 04/14] net: dsa: mv88e6xxx: rework ATU Load/Purge

2017-03-13 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: > It does result in more patches, more to review, but it is much easier > to review, because it should be obviously correct. The overall lines > of code at the end is the same. So overall there is no harm is having > lots of small patches. Your

Re: [PATCH net-next 04/14] net: dsa: mv88e6xxx: rework ATU Load/Purge

2017-03-13 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: > It does result in more patches, more to review, but it is much easier > to review, because it should be obviously correct. The overall lines > of code at the end is the same. So overall there is no harm is having > lots of small patches. Your concerns are dully

Re: [PATCH net-next v2 12/17] net: dsa: add dsa_is_normal_port helper

2017-03-13 Thread Vivien Didelot
Hi Florian, Florian Fainelli <f.faine...@gmail.com> writes: > Le 03/11/17 à 13:12, Vivien Didelot a écrit : >> Introduce a dsa_is_normal_port helper to check if a given port is a >> normal user port as opposed to a CPU port or DSA link. > > net/dsa/dsa2.c uses the &

Re: [PATCH net-next v2 12/17] net: dsa: add dsa_is_normal_port helper

2017-03-13 Thread Vivien Didelot
Hi Florian, Florian Fainelli writes: > Le 03/11/17 à 13:12, Vivien Didelot a écrit : >> Introduce a dsa_is_normal_port helper to check if a given port is a >> normal user port as opposed to a CPU port or DSA link. > > net/dsa/dsa2.c uses the "user" terminolo

Re: [PATCH net-next v2 00/17] net: dsa: mv88e6xxx: rework ATU support

2017-03-13 Thread Vivien Didelot
Hi Florian, Florian Fainelli writes: > Just some general note on the way the driver seems to be going there > seems to be a multiplication of new ops being introduced, and most of > them seem to default to the mv88e6xxx (generic) ones. Should you do > something like: > >

Re: [PATCH net-next v2 00/17] net: dsa: mv88e6xxx: rework ATU support

2017-03-13 Thread Vivien Didelot
Hi Florian, Florian Fainelli writes: > Just some general note on the way the driver seems to be going there > seems to be a multiplication of new ops being introduced, and most of > them seem to default to the mv88e6xxx (generic) ones. Should you do > something like: > > if (!ops->foo) >

[PATCH net-next v2 17/17] etherdevice: remove unused eth_addr_greater

2017-03-11 Thread Vivien Didelot
eth_addr_greater() was introduced for the mv88e6xxx driver, but is not used anymore. There is no other user, thus remove this function. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- include/linux/etherdevice.h | 15 --- 1 file changed, 15 deletions(-)

[PATCH net-next v2 17/17] etherdevice: remove unused eth_addr_greater

2017-03-11 Thread Vivien Didelot
eth_addr_greater() was introduced for the mv88e6xxx driver, but is not used anymore. There is no other user, thus remove this function. Signed-off-by: Vivien Didelot --- include/linux/etherdevice.h | 15 --- 1 file changed, 15 deletions(-) diff --git a/include/linux/etherdevice.h b

[PATCH net-next v2 03/17] net: dsa: mv88e6xxx: add ATU setup helper

2017-03-11 Thread Vivien Didelot
Move the configuration of the default ageing time in a new mv88e6xxx_atu_setup function. That function will be extended later to contain all ATU related configuration bits. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- drivers/net/dsa/mv88e6xxx/chip.

[PATCH net-next v2 02/17] net: dsa: mv88e6xxx: move ATU ageing time setter

2017-03-11 Thread Vivien Didelot
Move the ATU ageing time setter code in a new global1_atu.c file, which will be extended in future patches to contains all consequent Global (1) ATU support code. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- drivers/net/dsa/mv88e6xxx/Makefile | 1 + drive

[PATCH net-next v2 03/17] net: dsa: mv88e6xxx: add ATU setup helper

2017-03-11 Thread Vivien Didelot
Move the configuration of the default ageing time in a new mv88e6xxx_atu_setup function. That function will be extended later to contain all ATU related configuration bits. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/chip.c | 13 + 1 file changed, 9 insertions(+), 4

[PATCH net-next v2 02/17] net: dsa: mv88e6xxx: move ATU ageing time setter

2017-03-11 Thread Vivien Didelot
Move the ATU ageing time setter code in a new global1_atu.c file, which will be extended in future patches to contains all consequent Global (1) ATU support code. Signed-off-by: Vivien Didelot --- drivers/net/dsa/mv88e6xxx/Makefile | 1 + drivers/net/dsa/mv88e6xxx/chip.c| 31

[PATCH net-next v2 06/17] net: dsa: mv88e6xxx: rework ATU Load/Purge

2017-03-11 Thread Vivien Didelot
{fid_write,op_wait,op,data_write,mac_write} functions won't need to be exposed in the end so for the moment keep their counterparts _mv88e6xxx_atu_{wait,cmd,data_write,mac_write} as is, since they are still used by other ATU operations. Signed-off-by: Vivien Didelot <vivien.dide...@savoirfairelinux.

<    8   9   10   11   12   13   14   15   16   17   >