Re: [PATCH 0/2] net: dsa: lan9303: check error value from devm_gpiod_get_optional()

2018-01-06 Thread Egil Hjelmeland
Den 13. nov. 2017 09:07, skrev Phil Reid: Replaces Pan Bian patch "net: dsa: lan9303: correctly check return value of devm_gpiod_get_optional" Errors need to be prograted back from probe. Note: I have only compile tested the code as I don't have the hardware. Phil Reid

Re: [PATCH 0/2] net: dsa: lan9303: check error value from devm_gpiod_get_optional()

2018-01-06 Thread Egil Hjelmeland
Den 13. nov. 2017 09:07, skrev Phil Reid: Replaces Pan Bian patch "net: dsa: lan9303: correctly check return value of devm_gpiod_get_optional" Errors need to be prograted back from probe. Note: I have only compile tested the code as I don't have the hardware. Phil Reid (2): net: dsa:

[PATCH net-next 1/2] net: dsa: lan9303: phy_addr_sel_strap rename and retype

2017-12-29 Thread Egil Hjelmeland
chip->phy_addr_sel_strap is declared as a bool, but is also used as an integer address base. Rename 'phy_addr_sel_strap' to 'phy_addr_base', and change type to int. Signed-off-by: Egil Hjelmeland <pri...@egil-hjelmeland.no> --- drivers/net/dsa/lan9303-core.c | 20 ++--

[PATCH net-next 1/2] net: dsa: lan9303: phy_addr_sel_strap rename and retype

2017-12-29 Thread Egil Hjelmeland
chip->phy_addr_sel_strap is declared as a bool, but is also used as an integer address base. Rename 'phy_addr_sel_strap' to 'phy_addr_base', and change type to int. Signed-off-by: Egil Hjelmeland --- drivers/net/dsa/lan9303-core.c | 20 ++-- include/linux/dsa/lan9303.h|

[PATCH net-next 0/2] net: dsa: lan9303: phy_addr_sel_strap rename and retype

2017-12-29 Thread Egil Hjelmeland
Non functional cleanups involving chip->phy_addr_sel_strap. As promised in https://lkml.org/lkml/2017/11/6/273 Egil Hjelmeland (2): net: dsa: lan9303: phy_addr_sel_strap rename and retype net: dsa: lan9303: Adjust phy_addr_base expressions drivers/net/dsa/lan9303-core.c |

[PATCH net-next 0/2] net: dsa: lan9303: phy_addr_sel_strap rename and retype

2017-12-29 Thread Egil Hjelmeland
Non functional cleanups involving chip->phy_addr_sel_strap. As promised in https://lkml.org/lkml/2017/11/6/273 Egil Hjelmeland (2): net: dsa: lan9303: phy_addr_sel_strap rename and retype net: dsa: lan9303: Adjust phy_addr_base expressions drivers/net/dsa/lan9303-core.c |

[PATCH net-next 2/2] net: dsa: lan9303: Adjust phy_addr_base expressions

2017-12-29 Thread Egil Hjelmeland
Simplify calculation of chip->phy_addr_base in lan9303_detect_phy_setup(). Use GENMASK to calculate phys_mii_mask from LAN9303_NUM_PORTS and phy_addr_base. Signed-off-by: Egil Hjelmeland <pri...@egil-hjelmeland.no> --- drivers/net/dsa/lan9303-core.c | 10 +- 1 file changed, 5 i

[PATCH net-next 2/2] net: dsa: lan9303: Adjust phy_addr_base expressions

2017-12-29 Thread Egil Hjelmeland
Simplify calculation of chip->phy_addr_base in lan9303_detect_phy_setup(). Use GENMASK to calculate phys_mii_mask from LAN9303_NUM_PORTS and phy_addr_base. Signed-off-by: Egil Hjelmeland --- drivers/net/dsa/lan9303-core.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) d

[PATCH v2 net-next] net: dsa: lan9303: lan9303_csr_reg_wait cleanups

2017-12-21 Thread Egil Hjelmeland
Non-functional cleanups in lan9303_csr_reg_wait(): - Change type of param 'mask' from int to u32. - Remove param 'value' (will probably never be used) - Reduced retries from 1000 to 25, consistent with lan9303_read_wait. - Removed comments Signed-off-by: Egil Hjelmeland <pri...@e

[PATCH v2 net-next] net: dsa: lan9303: lan9303_csr_reg_wait cleanups

2017-12-21 Thread Egil Hjelmeland
Non-functional cleanups in lan9303_csr_reg_wait(): - Change type of param 'mask' from int to u32. - Remove param 'value' (will probably never be used) - Reduced retries from 1000 to 25, consistent with lan9303_read_wait. - Removed comments Signed-off-by: Egil Hjelmeland Changes v1 ->

[PATCH net-next] net: dsa: lan9303: lan9303_csr_reg_wait cleanups

2017-12-15 Thread Egil Hjelmeland
Non-functional cleanups in lan9303_csr_reg_wait(): - Change type of param 'mask' from int to u32. - Remove param 'value' (will probably never be used) - Reduced retries from 1000 to 25, consistent with lan9303_read_wait. - Corrected comments Signed-off-by: Egil Hjelmeland <pri...@e

[PATCH net-next] net: dsa: lan9303: lan9303_csr_reg_wait cleanups

2017-12-15 Thread Egil Hjelmeland
Non-functional cleanups in lan9303_csr_reg_wait(): - Change type of param 'mask' from int to u32. - Remove param 'value' (will probably never be used) - Reduced retries from 1000 to 25, consistent with lan9303_read_wait. - Corrected comments Signed-off-by: Egil Hjelmeland --- drivers/net

[PATCH v2 net-next] net: dsa: lan9303: Introduce lan9303_read_wait

2017-12-13 Thread Egil Hjelmeland
Simplify lan9303_indirect_phy_wait_for_completion() and lan9303_switch_wait_for_completion() by using a new function lan9303_read_wait() Changes v1 -> v2: - param 'mask' type u32 - removed param 'value' (will probably never be used) - add newline before return Signed-off-by: Egil Hjelmel

[PATCH v2 net-next] net: dsa: lan9303: Introduce lan9303_read_wait

2017-12-13 Thread Egil Hjelmeland
Simplify lan9303_indirect_phy_wait_for_completion() and lan9303_switch_wait_for_completion() by using a new function lan9303_read_wait() Changes v1 -> v2: - param 'mask' type u32 - removed param 'value' (will probably never be used) - add newline before return Signed-off-by: Egil Hjelmel

Re: [PATCH net-next] net: dsa: lan9303: Introduce lan9303_read_wait

2017-12-12 Thread Egil Hjelmeland
Hi Vivien. Den 12. des. 2017 19:08, skrev Vivien Didelot: Hi Egil, Egil Hjelmeland <pri...@egil-hjelmeland.no> writes: Simplify lan9303_indirect_phy_wait_for_completion() and lan9303_switch_wait_for_completion() by using a new function lan9303_read_wait() Signed-off-by: Egil Hjelmelan

Re: [PATCH net-next] net: dsa: lan9303: Introduce lan9303_read_wait

2017-12-12 Thread Egil Hjelmeland
Hi Vivien. Den 12. des. 2017 19:08, skrev Vivien Didelot: Hi Egil, Egil Hjelmeland writes: Simplify lan9303_indirect_phy_wait_for_completion() and lan9303_switch_wait_for_completion() by using a new function lan9303_read_wait() Signed-off-by: Egil Hjelmeland --- drivers/net/dsa/lan9303

[PATCH net-next] net: dsa: lan9303: Introduce lan9303_read_wait

2017-12-12 Thread Egil Hjelmeland
Simplify lan9303_indirect_phy_wait_for_completion() and lan9303_switch_wait_for_completion() by using a new function lan9303_read_wait() Signed-off-by: Egil Hjelmeland <pri...@egil-hjelmeland.no> --- drivers/net/dsa/lan9303-core.c | 59 +++--- 1 file c

[PATCH net-next] net: dsa: lan9303: Introduce lan9303_read_wait

2017-12-12 Thread Egil Hjelmeland
Simplify lan9303_indirect_phy_wait_for_completion() and lan9303_switch_wait_for_completion() by using a new function lan9303_read_wait() Signed-off-by: Egil Hjelmeland --- drivers/net/dsa/lan9303-core.c | 59 +++--- 1 file changed, 27 insertions(+), 32

[PATCH net-next] net: dsa: lan9303: Protect ALR operations with mutex

2017-12-07 Thread Egil Hjelmeland
ALR table operations are a sequence of related register operations which should be protected from concurrent access. The alr_cache should also be protected. Add alr_mutex doing that. Signed-off-by: Egil Hjelmeland <pri...@egil-hjelmeland.no> --- drivers/net/dsa/lan9303-core.

[PATCH net-next] net: dsa: lan9303: Protect ALR operations with mutex

2017-12-07 Thread Egil Hjelmeland
ALR table operations are a sequence of related register operations which should be protected from concurrent access. The alr_cache should also be protected. Add alr_mutex doing that. Signed-off-by: Egil Hjelmeland --- drivers/net/dsa/lan9303-core.c | 14 -- include/linux/dsa/lan9303

[PATCH net-next] net: dsa: lan9303: calculate offload_fwd_mark from tag

2017-11-13 Thread Egil Hjelmeland
The lan9303 set bits in the host CPU tag indicating if a ingress frame is a trapped IGMP or STP frame. Use these bits to calculate skb->offload_fwd_mark more efficiently. Signed-off-by: Egil Hjelmeland <pri...@egil-hjelmeland.no> --- net/dsa/tag_lan9303.c | 24 ---

[PATCH net-next] net: dsa: lan9303: calculate offload_fwd_mark from tag

2017-11-13 Thread Egil Hjelmeland
The lan9303 set bits in the host CPU tag indicating if a ingress frame is a trapped IGMP or STP frame. Use these bits to calculate skb->offload_fwd_mark more efficiently. Signed-off-by: Egil Hjelmeland --- net/dsa/tag_lan9303.c | 24 1 file changed, 8 insertions(+),

Re: [PATCH net-next 2/2] net: dsa: lan9303: Clear offload_fwd_mark for IGMP

2017-11-13 Thread Egil Hjelmeland
On 13. nov. 2017 14:02, Andrew Lunn wrote: RTFM, my bad. The lan9303 has both STP and IGMP bits in the receive tag. It is as simple as: u16 lan9303_tag1 = ntohs(lan9303_tag[1]); skb->offload_fwd_mark = !(lan9303_tag1 & 0x18); Hi Egil That is much nicer. But please add a couple of #defines

Re: [PATCH net-next 2/2] net: dsa: lan9303: Clear offload_fwd_mark for IGMP

2017-11-13 Thread Egil Hjelmeland
On 13. nov. 2017 14:02, Andrew Lunn wrote: RTFM, my bad. The lan9303 has both STP and IGMP bits in the receive tag. It is as simple as: u16 lan9303_tag1 = ntohs(lan9303_tag[1]); skb->offload_fwd_mark = !(lan9303_tag1 & 0x18); Hi Egil That is much nicer. But please add a couple of #defines

Re: [PATCH 0/2] net: dsa: lan9303: check error value from devm_gpiod_get_optional()

2017-11-13 Thread Egil Hjelmeland
On 13. nov. 2017 09:07, Phil Reid wrote: Replaces Pan Bian patch "net: dsa: lan9303: correctly check return value of devm_gpiod_get_optional" Errors need to be prograted back from probe. Note: I have only compile tested the code as I don't have the hardware. Phil Reid

Re: [PATCH 0/2] net: dsa: lan9303: check error value from devm_gpiod_get_optional()

2017-11-13 Thread Egil Hjelmeland
On 13. nov. 2017 09:07, Phil Reid wrote: Replaces Pan Bian patch "net: dsa: lan9303: correctly check return value of devm_gpiod_get_optional" Errors need to be prograted back from probe. Note: I have only compile tested the code as I don't have the hardware. Phil Reid (2): net: dsa:

Re: [PATCH net-next 2/2] net: dsa: lan9303: Clear offload_fwd_mark for IGMP

2017-11-13 Thread Egil Hjelmeland
On 10. nov. 2017 12:54, Egil Hjelmeland wrote: Now that IGMP packets no longer is flooded in HW, we want the SW bridge to forward packets based on bridge configuration. To make that happen, IGMP packets must have skb->offload_fwd_mark = 0. Signed-off-by: Egil Hjelmeland <pri..

Re: [PATCH net-next 2/2] net: dsa: lan9303: Clear offload_fwd_mark for IGMP

2017-11-13 Thread Egil Hjelmeland
On 10. nov. 2017 12:54, Egil Hjelmeland wrote: Now that IGMP packets no longer is flooded in HW, we want the SW bridge to forward packets based on bridge configuration. To make that happen, IGMP packets must have skb->offload_fwd_mark = 0. Signed-off-by: Egil Hjelmeland --- net/

Re: [PATCH net-next 0/2] net: dsa: lan9303: IGMP handling

2017-11-10 Thread Egil Hjelmeland
Den 10. nov. 2017 15:07, skrev Andrew Lunn: skb->offload_fwd_mark calculation is a candidate for consolidation into the DSA core. The calculation can probably be more polished when done at a point where DSA has updated skb. Hi Egil Yes, at some point we should do this. But at the moment it

Re: [PATCH net-next 0/2] net: dsa: lan9303: IGMP handling

2017-11-10 Thread Egil Hjelmeland
Den 10. nov. 2017 15:07, skrev Andrew Lunn: skb->offload_fwd_mark calculation is a candidate for consolidation into the DSA core. The calculation can probably be more polished when done at a point where DSA has updated skb. Hi Egil Yes, at some point we should do this. But at the moment it

[PATCH net-next 2/2] net: dsa: lan9303: Clear offload_fwd_mark for IGMP

2017-11-10 Thread Egil Hjelmeland
Now that IGMP packets no longer is flooded in HW, we want the SW bridge to forward packets based on bridge configuration. To make that happen, IGMP packets must have skb->offload_fwd_mark = 0. Signed-off-by: Egil Hjelmeland <pri...@egil-hjelmeland.no> --- net/dsa/tag_lan93

[PATCH net-next 2/2] net: dsa: lan9303: Clear offload_fwd_mark for IGMP

2017-11-10 Thread Egil Hjelmeland
Now that IGMP packets no longer is flooded in HW, we want the SW bridge to forward packets based on bridge configuration. To make that happen, IGMP packets must have skb->offload_fwd_mark = 0. Signed-off-by: Egil Hjelmeland --- net/dsa/tag_lan9303.c | 13 + 1 file changed,

[PATCH net-next 0/2] net: dsa: lan9303: IGMP handling

2017-11-10 Thread Egil Hjelmeland
SA has updated skb. Egil Hjelmeland (2): net: dsa: lan9303: Set up trapping of IGMP to CPU port net: dsa: lan9303: Clear offload_fwd_mark for IGMP drivers/net/dsa/lan9303-core.c | 26 ++ net/dsa/tag_lan9303.c | 13 + 2 files changed, 39 inse

[PATCH net-next 1/2] net: dsa: lan9303: Set up trapping of IGMP to CPU port

2017-11-10 Thread Egil Hjelmeland
9303_setup. Signed-off-by: Egil Hjelmeland <pri...@egil-hjelmeland.no> --- drivers/net/dsa/lan9303-core.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9303-core.c index 320651a57c6f..6d7dee67d822 100644 -

[PATCH net-next 0/2] net: dsa: lan9303: IGMP handling

2017-11-10 Thread Egil Hjelmeland
SA has updated skb. Egil Hjelmeland (2): net: dsa: lan9303: Set up trapping of IGMP to CPU port net: dsa: lan9303: Clear offload_fwd_mark for IGMP drivers/net/dsa/lan9303-core.c | 26 ++ net/dsa/tag_lan9303.c | 13 + 2 files changed, 39 inse

[PATCH net-next 1/2] net: dsa: lan9303: Set up trapping of IGMP to CPU port

2017-11-10 Thread Egil Hjelmeland
9303_setup. Signed-off-by: Egil Hjelmeland --- drivers/net/dsa/lan9303-core.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9303-core.c index 320651a57c6f..6d7dee67d822 100644 --- a/drivers/net/dsa/lan9303-co

Re: [PATCH net-next 1/6] net: dsa: remove trans argument from mdb ops

2017-11-09 Thread Egil Hjelmeland
On 08. nov. 2017 18:19, Vivien Didelot wrote: The DSA switch MDB ops pass the switchdev_trans structure down to the drivers, but no one is using them and they aren't supposed to anyway. Remove the trans argument from MDB prepare and add operations. - int (*port_mdb_prepare)(struct

Re: [PATCH net-next 1/6] net: dsa: remove trans argument from mdb ops

2017-11-09 Thread Egil Hjelmeland
On 08. nov. 2017 18:19, Vivien Didelot wrote: The DSA switch MDB ops pass the switchdev_trans structure down to the drivers, but no one is using them and they aren't supposed to anyway. Remove the trans argument from MDB prepare and add operations. - int (*port_mdb_prepare)(struct

Re: [PATCH net-next 2/6] net: dsa: return after mdb prepare phase

2017-11-09 Thread Egil Hjelmeland
On 08. nov. 2017 18:19, Vivien Didelot wrote: The current code does not return after successfully preparing the MDB addition on every ports member of a multicast group. Fix this. Fixes: a1a6b7ea7f2d ("net: dsa: add cross-chip multicast support") Reported-by: Egil Hjelmeland &l

Re: [PATCH net-next 2/6] net: dsa: return after mdb prepare phase

2017-11-09 Thread Egil Hjelmeland
On 08. nov. 2017 18:19, Vivien Didelot wrote: The current code does not return after successfully preparing the MDB addition on every ports member of a multicast group. Fix this. Fixes: a1a6b7ea7f2d ("net: dsa: add cross-chip multicast support") Reported-by: Egil Hjelmeland

[PATCH net-next] net: dsa: lan9303: Documentation: Add missing word "Mbps"

2017-11-08 Thread Egil Hjelmeland
Signed-off-by: Egil Hjelmeland <pri...@egil-hjelmeland.no> --- Documentation/networking/dsa/lan9303.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/networking/dsa/lan9303.txt b/Documentation/networking/dsa/lan9303.txt index ec28683d107d..144b02

[PATCH net-next] net: dsa: lan9303: Documentation: Add missing word "Mbps"

2017-11-08 Thread Egil Hjelmeland
Signed-off-by: Egil Hjelmeland --- Documentation/networking/dsa/lan9303.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/networking/dsa/lan9303.txt b/Documentation/networking/dsa/lan9303.txt index ec28683d107d..144b02b95207 100644 --- a/Documentation

[PATCH net-next] net: dsa: lan9303: Fix lan9303_alr_del_port()

2017-11-08 Thread Egil Hjelmeland
Fix embarrassing bug in lan9303_alr_del_port(): Instead of zeroing entr->mac_addr, I destroyed the next cache entry. Affected .port_fdb_del and .port_mdb_del. Fixes: 0620427ea0d6 ("net: dsa: lan9303: Add fdb/mdb manipulation") Signed-off-by: Egil Hjelmeland <pri...@eg

[PATCH net-next] net: dsa: lan9303: Fix lan9303_alr_del_port()

2017-11-08 Thread Egil Hjelmeland
Fix embarrassing bug in lan9303_alr_del_port(): Instead of zeroing entr->mac_addr, I destroyed the next cache entry. Affected .port_fdb_del and .port_mdb_del. Fixes: 0620427ea0d6 ("net: dsa: lan9303: Add fdb/mdb manipulation") Signed-off-by: Egil Hjelmeland --- drivers/net/dsa/l

Re: [PATCH net-next] net: dsa: lan9303: Drop port range check

2017-11-06 Thread Egil Hjelmeland
On 06. nov. 2017 15:19, Egil Hjelmeland wrote: Now that ds->num_ports is 3, there is no need to check range of "port" parameter. + lan9303_disable_processing_port(chip, port); + lan9303_phy_write(ds, chip->phy_addr_sel_strap + port, + MII_

Re: [PATCH net-next] net: dsa: lan9303: Drop port range check

2017-11-06 Thread Egil Hjelmeland
On 06. nov. 2017 15:19, Egil Hjelmeland wrote: Now that ds->num_ports is 3, there is no need to check range of "port" parameter. + lan9303_disable_processing_port(chip, port); + lan9303_phy_write(ds, chip->phy_addr_sel_strap + port, + MII_

[PATCH net-next] net: dsa: lan9303: Drop port range check

2017-11-06 Thread Egil Hjelmeland
Now that ds->num_ports is 3, there is no need to check range of "port" parameter. Signed-off-by: Egil Hjelmeland <pri...@egil-hjelmeland.no> --- drivers/net/dsa/lan9303-core.c | 27 --- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/driv

[PATCH net-next] net: dsa: lan9303: Drop port range check

2017-11-06 Thread Egil Hjelmeland
Now that ds->num_ports is 3, there is no need to check range of "port" parameter. Signed-off-by: Egil Hjelmeland --- drivers/net/dsa/lan9303-core.c | 27 --- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/drivers/net/dsa/lan9303-core.c b/dr

Re: [PATCH net-next 4/5] net: dsa: lan9303: Remove unnecessary parentheses

2017-11-06 Thread Egil Hjelmeland
On 03. nov. 2017 15:54, Vivien Didelot wrote: Hi Egil, Egil Hjelmeland <pri...@egil-hjelmeland.no> writes: If you send a v2, you may want to address the other parenthesis alignment issues found when running ./scripts/checkpatch -f on the lan9303* files. There is just one remaining ali

Re: [PATCH net-next 4/5] net: dsa: lan9303: Remove unnecessary parentheses

2017-11-06 Thread Egil Hjelmeland
On 03. nov. 2017 15:54, Vivien Didelot wrote: Hi Egil, Egil Hjelmeland writes: If you send a v2, you may want to address the other parenthesis alignment issues found when running ./scripts/checkpatch -f on the lan9303* files. There is just one remaining alignment issue. Removing that would

[PATCH v2 net-next 3/4] net: dsa: lan9303: Replace msleep(1) with usleep_range()

2017-11-06 Thread Egil Hjelmeland
Remove scripts/checkpatch.pl WARNING by replacing msleep(1) with usleep_range() Signed-off-by: Egil Hjelmeland <pri...@egil-hjelmeland.no> Reviewed-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- drivers/net/dsa/lan9303-core.c | 4 ++-- 1 file changed, 2 insertions(+),

[PATCH v2 net-next 3/4] net: dsa: lan9303: Replace msleep(1) with usleep_range()

2017-11-06 Thread Egil Hjelmeland
Remove scripts/checkpatch.pl WARNING by replacing msleep(1) with usleep_range() Signed-off-by: Egil Hjelmeland Reviewed-by: Vivien Didelot --- drivers/net/dsa/lan9303-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa

[PATCH v2 net-next 0/4] net: dsa: lan9303: Linting

2017-11-06 Thread Egil Hjelmeland
dressed later Egil Hjelmeland (4): net: dsa: lan9303: Correct register names in comments net: dsa: lan9303: Fix syntax errors in device tree examples net: dsa: lan9303: Replace msleep(1) with usleep_range() net: dsa: lan9303: Adjust indenting Documentation/devicetree/bindings/net/dsa/la

[PATCH v2 net-next 1/4] net: dsa: lan9303: Correct register names in comments

2017-11-06 Thread Egil Hjelmeland
Two comments refer to registers, but lack the LAN9303_ prefix. Fix that. Signed-off-by: Egil Hjelmeland <pri...@egil-hjelmeland.no> Reviewed-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- include/linux/dsa/lan9303.h | 8 +--- 1 file changed, 5 insertions(+),

[PATCH v2 net-next 0/4] net: dsa: lan9303: Linting

2017-11-06 Thread Egil Hjelmeland
dressed later Egil Hjelmeland (4): net: dsa: lan9303: Correct register names in comments net: dsa: lan9303: Fix syntax errors in device tree examples net: dsa: lan9303: Replace msleep(1) with usleep_range() net: dsa: lan9303: Adjust indenting Documentation/devicetree/bindings/net/dsa/la

[PATCH v2 net-next 1/4] net: dsa: lan9303: Correct register names in comments

2017-11-06 Thread Egil Hjelmeland
Two comments refer to registers, but lack the LAN9303_ prefix. Fix that. Signed-off-by: Egil Hjelmeland Reviewed-by: Vivien Didelot --- include/linux/dsa/lan9303.h | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/linux/dsa/lan9303.h b/include/linux/dsa

[PATCH v2 net-next 2/4] net: dsa: lan9303: Fix syntax errors in device tree examples

2017-11-06 Thread Egil Hjelmeland
Signed-off-by: Egil Hjelmeland <pri...@egil-hjelmeland.no> Reviewed-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- Documentation/devicetree/bindings/net/dsa/lan9303.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bind

[PATCH v2 net-next 4/4] net: dsa: lan9303: Adjust indenting

2017-11-06 Thread Egil Hjelmeland
Remove scripts/checkpatch.pl CHECKs by adjusting indenting. Signed-off-by: Egil Hjelmeland <pri...@egil-hjelmeland.no> Reviewed-by: Vivien Didelot <vivien.dide...@savoirfairelinux.com> --- drivers/net/dsa/lan9303_i2c.c | 2 +- drivers/net/dsa/lan9303_mdio.c | 2 +- net/dsa/t

[PATCH v2 net-next 2/4] net: dsa: lan9303: Fix syntax errors in device tree examples

2017-11-06 Thread Egil Hjelmeland
Signed-off-by: Egil Hjelmeland Reviewed-by: Vivien Didelot --- Documentation/devicetree/bindings/net/dsa/lan9303.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/net/dsa/lan9303.txt b/Documentation/devicetree/bindings/net/dsa/lan9303

[PATCH v2 net-next 4/4] net: dsa: lan9303: Adjust indenting

2017-11-06 Thread Egil Hjelmeland
Remove scripts/checkpatch.pl CHECKs by adjusting indenting. Signed-off-by: Egil Hjelmeland Reviewed-by: Vivien Didelot --- drivers/net/dsa/lan9303_i2c.c | 2 +- drivers/net/dsa/lan9303_mdio.c | 2 +- net/dsa/tag_lan9303.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff

Re: [PATCH net-next 4/5] net: dsa: lan9303: Remove unnecessary parentheses

2017-11-06 Thread Egil Hjelmeland
On 03. nov. 2017 15:35, Egil Hjelmeland wrote: On 03. nov. 2017 15:11, Joe Perches wrote: On Fri, 2017-11-03 at 11:55 +0100, Egil Hjelmeland wrote: Remove scripts/checkpatch.pl CHECKs by remove unnecessary parentheses [] diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9303

Re: [PATCH net-next 4/5] net: dsa: lan9303: Remove unnecessary parentheses

2017-11-06 Thread Egil Hjelmeland
On 03. nov. 2017 15:35, Egil Hjelmeland wrote: On 03. nov. 2017 15:11, Joe Perches wrote: On Fri, 2017-11-03 at 11:55 +0100, Egil Hjelmeland wrote: Remove scripts/checkpatch.pl CHECKs by remove unnecessary parentheses [] diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9303

Re: [PATCH net-next 4/5] net: dsa: lan9303: Remove unnecessary parentheses

2017-11-03 Thread Egil Hjelmeland
On 03. nov. 2017 15:11, Joe Perches wrote: On Fri, 2017-11-03 at 11:55 +0100, Egil Hjelmeland wrote: Remove scripts/checkpatch.pl CHECKs by remove unnecessary parentheses [] diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9303-core.c [] @@ -483,7 +483,7 @@ static int

Re: [PATCH net-next 4/5] net: dsa: lan9303: Remove unnecessary parentheses

2017-11-03 Thread Egil Hjelmeland
On 03. nov. 2017 15:11, Joe Perches wrote: On Fri, 2017-11-03 at 11:55 +0100, Egil Hjelmeland wrote: Remove scripts/checkpatch.pl CHECKs by remove unnecessary parentheses [] diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9303-core.c [] @@ -483,7 +483,7 @@ static int

[PATCH net-next 4/5] net: dsa: lan9303: Remove unnecessary parentheses

2017-11-03 Thread Egil Hjelmeland
Remove scripts/checkpatch.pl CHECKs by remove unnecessary parentheses Signed-off-by: Egil Hjelmeland <pri...@egil-hjelmeland.no> --- drivers/net/dsa/lan9303-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9303-

[PATCH net-next 4/5] net: dsa: lan9303: Remove unnecessary parentheses

2017-11-03 Thread Egil Hjelmeland
Remove scripts/checkpatch.pl CHECKs by remove unnecessary parentheses Signed-off-by: Egil Hjelmeland --- drivers/net/dsa/lan9303-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9303-core.c index 70ecd18a5e7d

[PATCH net-next 0/5] net: dsa: lan9303: Linting

2017-11-03 Thread Egil Hjelmeland
This series is non-functional. - Correct some errors in comments and documentation. Remove scripts/checkpatch.pl WARNINGs and most CHECKs: - Replace msleep(1) with usleep_range() - Remove unnecessary parentheses - Adjust indenting Egil Hjelmeland (5): net: dsa: lan9303: Correct register

[PATCH net-next 0/5] net: dsa: lan9303: Linting

2017-11-03 Thread Egil Hjelmeland
This series is non-functional. - Correct some errors in comments and documentation. Remove scripts/checkpatch.pl WARNINGs and most CHECKs: - Replace msleep(1) with usleep_range() - Remove unnecessary parentheses - Adjust indenting Egil Hjelmeland (5): net: dsa: lan9303: Correct register

[PATCH net-next 2/5] net: dsa: lan9303: Fix syntax errors in device tree examples

2017-11-03 Thread Egil Hjelmeland
Signed-off-by: Egil Hjelmeland <pri...@egil-hjelmeland.no> --- Documentation/devicetree/bindings/net/dsa/lan9303.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/net/dsa/lan9303.txt b/Documentation/devicetree/bindings/net/dsa/l

[PATCH net-next 2/5] net: dsa: lan9303: Fix syntax errors in device tree examples

2017-11-03 Thread Egil Hjelmeland
Signed-off-by: Egil Hjelmeland --- Documentation/devicetree/bindings/net/dsa/lan9303.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/net/dsa/lan9303.txt b/Documentation/devicetree/bindings/net/dsa/lan9303.txt index 4448d063ddf6

[PATCH net-next 1/5] net: dsa: lan9303: Correct register names in comments

2017-11-03 Thread Egil Hjelmeland
Two comments refer to registers, but lack the LAN9303_ prefix. Fix that. Signed-off-by: Egil Hjelmeland <pri...@egil-hjelmeland.no> --- include/linux/dsa/lan9303.h | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/linux/dsa/lan9303.h b/include/linux/dsa/l

[PATCH net-next 5/5] net: dsa: lan9303: Adjust indenting

2017-11-03 Thread Egil Hjelmeland
Remove scripts/checkpatch.pl CHECKs by adjusting indenting. Signed-off-by: Egil Hjelmeland <pri...@egil-hjelmeland.no> --- drivers/net/dsa/lan9303_i2c.c | 2 +- drivers/net/dsa/lan9303_mdio.c | 2 +- net/dsa/tag_lan9303.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)

[PATCH net-next 5/5] net: dsa: lan9303: Adjust indenting

2017-11-03 Thread Egil Hjelmeland
Remove scripts/checkpatch.pl CHECKs by adjusting indenting. Signed-off-by: Egil Hjelmeland --- drivers/net/dsa/lan9303_i2c.c | 2 +- drivers/net/dsa/lan9303_mdio.c | 2 +- net/dsa/tag_lan9303.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/dsa

[PATCH net-next 1/5] net: dsa: lan9303: Correct register names in comments

2017-11-03 Thread Egil Hjelmeland
Two comments refer to registers, but lack the LAN9303_ prefix. Fix that. Signed-off-by: Egil Hjelmeland --- include/linux/dsa/lan9303.h | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/linux/dsa/lan9303.h b/include/linux/dsa/lan9303.h index 05d8d136baab

[PATCH net-next 3/5] net: dsa: lan9303: Replace msleep(1) with usleep_range()

2017-11-03 Thread Egil Hjelmeland
Remove scripts/checkpatch.pl WARNING by replacing msleep(1) with usleep_range() Signed-off-by: Egil Hjelmeland <pri...@egil-hjelmeland.no> --- drivers/net/dsa/lan9303-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/n

[PATCH net-next 3/5] net: dsa: lan9303: Replace msleep(1) with usleep_range()

2017-11-03 Thread Egil Hjelmeland
Remove scripts/checkpatch.pl WARNING by replacing msleep(1) with usleep_range() Signed-off-by: Egil Hjelmeland --- drivers/net/dsa/lan9303-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9303-core.c index

[PATCH net-next] net: Define eth_stp_addr in linux/etherdevice.h

2017-11-02 Thread Egil Hjelmeland
to eth_reserved_addr_base as a definition of STP address. Clean up by: - Move the eth_stp_addr definition to linux/etherdevice.h - Use eth_stp_addr instead of eth_reserved_addr_base in br_dev_setup. Signed-off-by: Egil Hjelmeland <pri...@egil-hjelmeland.no> --- include/linux/dsa/lan9303

[PATCH net-next] net: Define eth_stp_addr in linux/etherdevice.h

2017-11-02 Thread Egil Hjelmeland
to eth_reserved_addr_base as a definition of STP address. Clean up by: - Move the eth_stp_addr definition to linux/etherdevice.h - Use eth_stp_addr instead of eth_reserved_addr_base in br_dev_setup. Signed-off-by: Egil Hjelmeland --- include/linux/dsa/lan9303.h | 2 -- include/linux/etherdevice.h | 1

[PATCH net-next] net: dsa: lan9303: Added Documentation/networking/dsa/lan9303.txt

2017-11-02 Thread Egil Hjelmeland
From: Egil Hjelmeland <egil.hjelmel...@zenitel.com> Provide a rough overview of the state of the driver. And explain that the driver operates in two modes: bridged and port-separated. Signed-off-by: Egil Hjelmeland <egil.hjelmel...@zenitel.com> --- Documentation/networking/dsa/lan9

[PATCH net-next] net: dsa: lan9303: Added Documentation/networking/dsa/lan9303.txt

2017-11-02 Thread Egil Hjelmeland
From: Egil Hjelmeland Provide a rough overview of the state of the driver. And explain that the driver operates in two modes: bridged and port-separated. Signed-off-by: Egil Hjelmeland --- Documentation/networking/dsa/lan9303.txt | 37 1 file changed, 37

Re: [PATCH net-next 0/3] net: dsa: lan9303: Fix STP and flooding issues

2017-11-02 Thread Egil Hjelmeland
On 01. nov. 2017 13:30, David Miller wrote: From: Egil Hjelmeland <pri...@egil-hjelmeland.no> Date: Tue, 31 Oct 2017 15:47:59 +0100 This patch set finishes the STP support, and fixes flooding issues. Series applied, thank you. Thanks! Based on happy testing on my desktop, I co

Re: [PATCH net-next 0/3] net: dsa: lan9303: Fix STP and flooding issues

2017-11-02 Thread Egil Hjelmeland
On 01. nov. 2017 13:30, David Miller wrote: From: Egil Hjelmeland Date: Tue, 31 Oct 2017 15:47:59 +0100 This patch set finishes the STP support, and fixes flooding issues. Series applied, thank you. Thanks! Based on happy testing on my desktop, I conclude that the net-next lan9303

[PATCH net-next 2/3] net: dsa: lan9303: Add STP ALR entry on port 0

2017-10-31 Thread Egil Hjelmeland
STP BPDUs arriving on user ports must sent to CPU port only, for processing by the SW bridge. Add an ALR entry with STP state override to fix that. Signed-off-by: Egil Hjelmeland <pri...@egil-hjelmeland.no> --- drivers/net/dsa/lan9303-core.c | 2 ++ include/linux/dsa/lan9303.h| 2 +

[PATCH net-next 2/3] net: dsa: lan9303: Add STP ALR entry on port 0

2017-10-31 Thread Egil Hjelmeland
STP BPDUs arriving on user ports must sent to CPU port only, for processing by the SW bridge. Add an ALR entry with STP state override to fix that. Signed-off-by: Egil Hjelmeland --- drivers/net/dsa/lan9303-core.c | 2 ++ include/linux/dsa/lan9303.h| 2 ++ net/dsa/tag_lan9303.c

[PATCH net-next 1/3] net: dsa: lan9303: Transmit using ALR when unicast

2017-10-31 Thread Egil Hjelmeland
that only unicast frames can be transmitted using ALR lookup. Signed-off-by: Egil Hjelmeland <pri...@egil-hjelmeland.no> --- net/dsa/tag_lan9303.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/dsa/tag_lan9303.c b/net/dsa/tag_lan9303.c index 64092325aac3..537ca991fafe

[PATCH net-next 1/3] net: dsa: lan9303: Transmit using ALR when unicast

2017-10-31 Thread Egil Hjelmeland
that only unicast frames can be transmitted using ALR lookup. Signed-off-by: Egil Hjelmeland --- net/dsa/tag_lan9303.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/dsa/tag_lan9303.c b/net/dsa/tag_lan9303.c index 64092325aac3..537ca991fafe 100644 --- a/net/dsa/tag_lan9303

[PATCH net-next 0/3] net: dsa: lan9303: Fix STP and flooding issues

2017-10-31 Thread Egil Hjelmeland
This patch set finishes the STP support, and fixes flooding issues. Patch 1 fixes a flooding issue in the previous patch set. Patch 2 finishes STP support by adding a ALR entry. Patch 3 prevent duplicate flooding in HW and SW bridge. Egil Hjelmeland (3): net: dsa: lan9303: Transmit using ALR

[PATCH net-next 0/3] net: dsa: lan9303: Fix STP and flooding issues

2017-10-31 Thread Egil Hjelmeland
This patch set finishes the STP support, and fixes flooding issues. Patch 1 fixes a flooding issue in the previous patch set. Patch 2 finishes STP support by adding a ALR entry. Patch 3 prevent duplicate flooding in HW and SW bridge. Egil Hjelmeland (3): net: dsa: lan9303: Transmit using ALR

[PATCH net-next 3/3] net: dsa: lan9303: lan9303_rcv set skb->offload_fwd_mark

2017-10-31 Thread Egil Hjelmeland
led. This is archived by not setting skb->offload_fwd_mark on STP BPDUs. Signed-off-by: Egil Hjelmeland <pri...@egil-hjelmeland.no> --- net/dsa/tag_lan9303.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/dsa/tag_lan9303.c b/net/dsa/tag_lan9303.c index 18f45cd9f625..e526c8967b98 100644 -

[PATCH net-next 3/3] net: dsa: lan9303: lan9303_rcv set skb->offload_fwd_mark

2017-10-31 Thread Egil Hjelmeland
led. This is archived by not setting skb->offload_fwd_mark on STP BPDUs. Signed-off-by: Egil Hjelmeland --- net/dsa/tag_lan9303.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/dsa/tag_lan9303.c b/net/dsa/tag_lan9303.c index 18f45cd9f625..e526c8967b98 100644 --- a/net/dsa/tag_lan9303.c +++ b/n

Re: [PATCH net-next 0/9] net: dsa: define port types

2017-10-28 Thread Egil Hjelmeland
Den 27. okt. 2017 21:37, skrev Andrew Lunn: On Fri, Oct 27, 2017 at 02:56:51PM +0200, Egil Hjelmeland wrote: The DSA code currently has 3 bitmaps in the dsa_switch structure: cpu_port_mask, dsa_port_mask and enabled_port_mask. Hi Vivien First I must apologize to everybody for not replying

Re: [PATCH net-next 0/9] net: dsa: define port types

2017-10-28 Thread Egil Hjelmeland
Den 27. okt. 2017 21:37, skrev Andrew Lunn: On Fri, Oct 27, 2017 at 02:56:51PM +0200, Egil Hjelmeland wrote: The DSA code currently has 3 bitmaps in the dsa_switch structure: cpu_port_mask, dsa_port_mask and enabled_port_mask. Hi Vivien First I must apologize to everybody for not replying

Re: [PATCH net-next 0/9] net: dsa: define port types

2017-10-27 Thread Egil Hjelmeland
> The DSA code currently has 3 bitmaps in the dsa_switch structure: > cpu_port_mask, dsa_port_mask and enabled_port_mask. Hi Vivien First I must apologize to everybody for not replying in-thread. Problem is that I was not subscribed to netdev. But now I am, so I promise it will not happen

Re: [PATCH net-next 0/9] net: dsa: define port types

2017-10-27 Thread Egil Hjelmeland
> The DSA code currently has 3 bitmaps in the dsa_switch structure: > cpu_port_mask, dsa_port_mask and enabled_port_mask. Hi Vivien First I must apologize to everybody for not replying in-thread. Problem is that I was not subscribed to netdev. But now I am, so I promise it will not happen

[PATCH v2 net-next 1/2] net: dsa: lan9303: Move struct lan9303 to include/linux/dsa/lan9303.h

2017-10-26 Thread Egil Hjelmeland
The next patch require net/dsa/tag_lan9303.c to access struct lan9303. Therefore move struct lan9303 definitions from drivers/net/dsa/lan9303.h to new file include/linux/dsa/lan9303.h. Signed-off-by: Egil Hjelmeland <pri...@egil-hjelmeland.no> Reviewed-by: Andrew Lunn <and..

[PATCH v2 net-next 1/2] net: dsa: lan9303: Move struct lan9303 to include/linux/dsa/lan9303.h

2017-10-26 Thread Egil Hjelmeland
The next patch require net/dsa/tag_lan9303.c to access struct lan9303. Therefore move struct lan9303 definitions from drivers/net/dsa/lan9303.h to new file include/linux/dsa/lan9303.h. Signed-off-by: Egil Hjelmeland Reviewed-by: Andrew Lunn --- MAINTAINERS | 1 + drivers/net

[PATCH v2 net-next 2/2] net: dsa: lan9303: Learn addresses on CPU port when bridged

2017-10-26 Thread Egil Hjelmeland
to allow ALR learning on CPU port. Otherwise transmit directly to port with STP state override. Signed-off-by: Egil Hjelmeland <pri...@egil-hjelmeland.no> --- net/dsa/tag_lan9303.c | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/net/dsa/tag_lan9303.c

[PATCH v2 net-next 2/2] net: dsa: lan9303: Learn addresses on CPU port when bridged

2017-10-26 Thread Egil Hjelmeland
to allow ALR learning on CPU port. Otherwise transmit directly to port with STP state override. Signed-off-by: Egil Hjelmeland --- net/dsa/tag_lan9303.c | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/net/dsa/tag_lan9303.c b/net/dsa/tag_lan9303.c index

[PATCH v2 net-next 0/2] net: dsa: lan9303: Learn addresses on CPU port when bridged

2017-10-26 Thread Egil Hjelmeland
nux/lan9303.h - include linux/if_ether.h in include/linux/dsa/lan9303.h - renamed lan9303_tx_use_arl to lan9303_xmit_use_arl for consistency. - removed inline keyword to lan9303_xmit_use_arl Egil Hjelmeland (2): net: dsa: lan9303: Move struct lan9303 to include/linux/dsa/lan9303.h net: dsa: lan9

[PATCH v2 net-next 0/2] net: dsa: lan9303: Learn addresses on CPU port when bridged

2017-10-26 Thread Egil Hjelmeland
nux/lan9303.h - include linux/if_ether.h in include/linux/dsa/lan9303.h - renamed lan9303_tx_use_arl to lan9303_xmit_use_arl for consistency. - removed inline keyword to lan9303_xmit_use_arl Egil Hjelmeland (2): net: dsa: lan9303: Move struct lan9303 to include/linux/dsa/lan9303.h net: dsa: lan9

  1   2   3   4   >