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: lan93
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/linu
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 |
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
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 Hjelmelan
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 Hjelmela
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-
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
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
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
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(+),
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 for
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: lan930
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/
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 i
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,
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
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
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 dsa
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
Sig
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
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
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_
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
> 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 again
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
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
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
On 24. okt. 2017 18:31, Andrew Lunn wrote:
On Tue, Oct 24, 2017 at 11:35:14AM +0200, Egil Hjelmeland wrote:
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/lan9303.h
Hi Woojung!
On 24. okt. 2017 19:18, woojung@microchip.com wrote:
Hi Egil,
+static inline int lan9303_tx_use_arl(struct dsa_port *dp, u8 *dest_addr)
+{
+ struct lan9303 *chip = dp->ds->priv;
+
+ return chip->is_bridged && !ether_addr_equal(dest_addr,
eth_stp_addr);
+}
static
On 24. okt. 2017 18:33, Andrew Lunn wrote:
On Tue, Oct 24, 2017 at 11:35:15AM +0200, Egil Hjelmeland wrote:
+ */
+static inline int lan9303_tx_use_arl(struct dsa_port *dp, u8 *dest_addr)
Hi Egil
There is no need for the inline. The compiler will do that anyway, for
a function like this
: 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 87f919f0e641..4c412bd52319 100644
--- a/drivers/net/dsa/lan9303-core.c
+++ b/drivers/net/dsa/lan9303-core.c
lookup to allow ALR learning on CPU port.
Otherwise transmit directly to port with STP state override.
The first patch moves struct lan9303 to include/linux/lan9303.h in order
to prepare for the second patch.
Egil Hjelmeland (2):
net: dsa: lan9303: Move struct lan9303 to include/linux/lan9303.h
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
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/lan9303.h.
Signed-off-by: Egil Hjelmeland
---
MAINTAINERS | 1 +
drivers/net/dsa/lan9303.h | 34
On 20. okt. 2017 16:03, Vivien Didelot wrote:
Hi Egil,
It looks much cleaner, thanks!
Egil Hjelmeland writes:
This series add support for accessing and managing the lan9303 ALR
(Address Logic Resolution).
The first patch add low level functions for accessing the ALR, along
with
-off-by: Egil Hjelmeland
---
drivers/net/dsa/lan9303-core.c | 173 +
drivers/net/dsa/lan9303.h | 9 +++
2 files changed, 182 insertions(+)
diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9303-core.c
index 48cae87bdcb7..87f919f0e641
Add DSA method port_fast_age as a step to STP support.
Add low level functions for accessing the lan9303 ALR (Address Logic
Resolution).
Added DSA method port_fdb_dump
Signed-off-by: Egil Hjelmeland
---
drivers/net/dsa/lan9303-core.c | 160 +
drivers
r consistency.
- Patch 2: lan9303_port_fast_age() wrap the "port" into a struct for passing
as context to alr_loop_cb_del_port_learned. Safer in event of type change.
- Patch 2: Reviewed-by: Vivien Didelot
Changes v1 -> v2:
- Patch 2: Removed question comment
Egil Hjelmeland (2)
Den 19. okt. 2017 17:42, skrev Egil Hjelmeland:
On 19. okt. 2017 17:15, David Laight wrote:
From: Andrew Lunn
Sent: 19 October 2017 15:15
+/* Clear learned (non-static) entry on given port */
+static void alr_loop_cb_del_port_learned(struct lan9303 *chip, u32
dat0
On 19. okt. 2017 17:15, David Laight wrote:
From: Andrew Lunn
Sent: 19 October 2017 15:15
+/* Clear learned (non-static) entry on given port */
+static void alr_loop_cb_del_port_learned(struct lan9303 *chip, u32 dat0,
+u32 dat1, int portmap, void *ctx)
+{
On 19. okt. 2017 17:12, Vivien Didelot wrote:
Hi Egil,
Egil Hjelmeland writes:
Why is there different spacing and prefix with these defines?
The extra space is to set bit definitions apart from register offsets,
a convention that is used in the file. However, agree that the
bit defs should
On 19. okt. 2017 16:15, Andrew Lunn wrote:
+/* Clear learned (non-static) entry on given port */
+static void alr_loop_cb_del_port_learned(struct lan9303 *chip, u32 dat0,
+u32 dat1, int portmap, void *ctx)
+{
+ int *port = ctx;
You can get the value
On 19. okt. 2017 15:58, Vivien Didelot wrote:
Hi Egil,
Hi Vivien
Egil Hjelmeland writes:
Add DSA method port_fast_age as a step to STP support.
Add low level functions for accessing the lan9303 ALR (Address Logic
Resolution).
Added DSA method port_fdb_dump
Signed-off-by: Egil
Add DSA method port_fast_age as a step to STP support.
Add low level functions for accessing the lan9303 ALR (Address Logic
Resolution).
Added DSA method port_fdb_dump
Signed-off-by: Egil Hjelmeland
---
drivers/net/dsa/lan9303-core.c | 159 +
drivers
/mdb methods.
Note that to complete STP support, a special ALR entry with the STP eth
address must be added too. This must be addressed later.
Comments welcome!
Changes v1 -> v2:
- Patch 2: Removed question comment
Egil Hjelmeland (2):
net: dsa: lan9303: Add port_fast_age and port_fdb_d
-off-by: Egil Hjelmeland
---
drivers/net/dsa/lan9303-core.c | 172 +
drivers/net/dsa/lan9303.h | 9 +++
2 files changed, 181 insertions(+)
diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9303-core.c
index ae904242b001..71e91435e479
On 18. okt. 2017 16:38, Vivien Didelot wrote:
Hi Egil,
Egil Hjelmeland writes:
+/* Delete static port from ALR entry, delete entry if last port */
+static int lan9303_alr_del_port(struct lan9303 *chip, const u8 *mac,
+ int port)
+{
+ struct
/mdb methods.
Note I have have a question in the second patch, in lan9303_alr_del_port.
Note that to complete STP support, a special ALR entry with the STP eth
address must be added too. This must be addressed later.
Comments welcome!
Egil Hjelmeland (2):
net: dsa: lan9303: Add port_fast_age and
Add DSA method port_fast_age as a step to STP support.
Add low level functions for accessing the lan9303 ALR (Address Logic
Resolution).
Added DSA method port_fdb_dump
Signed-off-by: Egil Hjelmeland
---
drivers/net/dsa/lan9303-core.c | 159 +
drivers
-off-by: Egil Hjelmeland
---
drivers/net/dsa/lan9303-core.c | 175 +
drivers/net/dsa/lan9303.h | 9 +++
2 files changed, 184 insertions(+)
diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9303-core.c
index 8b5202f3c0b0..4177e9d2e8ae
On 10. okt. 2017 17:51, woojung@microchip.com wrote:
Specific reason to use val then using
LAN9303_BM_EGRSS_PORT_TYPE_SPECIAL_TAG_PORT0
like previous line?
Specific reason was to please a reviewer that did not like my
indenting in first version. I did not agree with him, but since
nobody
On 10. okt. 2017 17:14, woojung@microchip.com wrote:
+/* forward special tagged packets from port 0 to port 1 *or* port 2 */
+static int lan9303_setup_tagging(struct lan9303 *chip)
+{
+ int ret;
+ u32 val;
+ /* enable defining the destination port via special VLAN tagging
+
This series add basic offloading of unicast traffic to the lan9303
DSA driver.
Review welcome!
Changes v1 -> v2:
- Patch 1: Codestyle linting.
- Patch 2: Remember SWE_PORT_STATE while not bridged.
Added constant LAN9303_SWE_PORT_MIRROR_DISABLED.
Egil Hjelmeland (2):
net:
Prepare for next patch:
Move tag setup from lan9303_separate_ports() to new function
lan9303_setup_tagging()
Signed-off-by: Egil Hjelmeland
---
drivers/net/dsa/lan9303-core.c | 42 +-
1 file changed, 25 insertions(+), 17 deletions(-)
diff --git a/drivers
. Hence the condition
that both ports must join same bridge.
Add brigde methods port_bridge_join, port_bridge_leave and
port_stp_state_set.
Signed-off-by: Egil Hjelmeland
---
drivers/net/dsa/lan9303-core.c | 82 ++
drivers/net/dsa/lan9303.h | 2 ++
2
Den 23. sep. 2017 16:31, skrev Andrew Lunn:
The point is: Once both external ports are in "forwarding", I see no way
to prevent traffic flowing directly between the external ports.
Generally, there are port vectors. Port X can send frames only to Port
Y.
If you don't have that, there are possi
Den 22. sep. 2017 22:08, skrev Andrew Lunn:
I'm wondering how this is supposed to work. Please add a good comment
here, since the hardware is forcing you to do something odd.
Maybe it would be a good idea to save the STP state in chip. And then
when chip->is_bridged is set true, change the stat
Den 21. sep. 2017 16:26, skrev Vivien Didelot:
Hi Egil,
Egil Hjelmeland writes:
When both user ports are joined to the same bridge, the normal
HW MAC learning is enabled. This means that unicast traffic is forwarded
in HW.
If one of the user ports leave the bridge,
the ports goes back to
Den 21. sep. 2017 16:21, skrev Andrew Lunn:
Hi Egil
+static void lan9303_bridge_ports(struct lan9303 *chip)
+{
+ /* ports bridged: remove mirroring */
+ lan9303_write_switch_reg(chip, LAN9303_SWE_PORT_MIRROR, 0);
+}
Could you replace the 0 with something symbolic which makes this
. Hence the condition
that both ports must join same bridge.
Add brigde methods port_bridge_join, port_bridge_leave and
port_stp_state_set.
Signed-off-by: Egil Hjelmeland
---
drivers/net/dsa/lan9303-core.c | 88 ++
drivers/net/dsa/lan9303.h | 1 +
2
This series add basic offloading of unicast traffic to the lan9303
DSA driver.
Comments welcome!
Egil Hjelmeland (2):
net: dsa: lan9303: Move tag setup to new lan9303_setup_tagging
net: dsa: lan9303: Add basic offloading of unicast traffic
drivers/net/dsa/lan9303-core.c | 130
Prepare for next patch:
Move tag setup from lan9303_separate_ports() to new function
lan9303_setup_tagging()
Signed-off-by: Egil Hjelmeland
---
drivers/net/dsa/lan9303-core.c | 42 +-
1 file changed, 25 insertions(+), 17 deletions(-)
diff --git a/drivers
Make the driver react to device tree "fixed-link" declaration on CPU port.
- turn off autonegotiation
- force speed 10 or 100 mb/s
- force duplex mode
Signed-off-by: Egil Hjelmeland
---
drivers/net/dsa/lan9303-core.c | 40
1 file changed, 40
On 15. sep. 2017 07:51, Jiri Pirko wrote:
> Thu, Sep 14, 2017 at 11:01:32PM CEST, and...@lunn.ch wrote:
>>> Can you clarify what type of registers it is you are wanting to read?
>>> We already have ethtool which is meant to allow reading the device
>>> registers for a given netdev. As long as the p
Save 2628 bytes on arm eabi by allocate only the required 3 ports.
Now that ds->num_ports is correct: In net/dsa/tag_lan9303.c
eliminate duplicate LAN9303_MAX_PORTS, use ds->num_ports.
(Matching the pattern of other net/dsa/tag_xxx.c files.)
Signed-off-by: Egil Hjelmeland
---
drivers/n
: Egil Hjelmeland
Reviewed-by: Andrew Lunn
Reviewed-by: Florian Fainelli
---
drivers/net/dsa/lan9303-core.c | 46 +-
1 file changed, 23 insertions(+), 23 deletions(-)
diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9303-core.c
index
in first patch
- inserted LAN9303_NUM_PORTS patch
- Use LAN9303_NUM_PORTS in last patch. Plus whitespace change.
Egil Hjelmeland (5):
net: dsa: lan9303: Change lan9303_xxx_packet_processing() port param.
net: dsa: lan9303: define LAN9303_NUM_PORTS 3
net: dsa: lan9303:
Will be used instead of '3' in upcomming patches.
Signed-off-by: Egil Hjelmeland
Signed-off-by: Andrew Lunn
Reviewed-by: Florian Fainelli
---
drivers/net/dsa/lan9303-core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9
Simplify usage of lan9303_enable_packet_processing,
lan9303_disable_packet_processing()
Signed-off-by: Egil Hjelmeland
Reviewed-by: Andrew Lunn
Reviewed-by: Florian Fainelli
---
drivers/net/dsa/lan9303-core.c | 24 ++--
1 file changed, 10 insertions(+), 14 deletions
ing -> lan9303_disable_processing_port
Signed-off-by: Egil Hjelmeland
Reviewed-by: Andrew Lunn
Reviewed-by: Florian Fainelli
---
drivers/net/dsa/lan9303-core.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/l
In lan9303_get_ethtool_stats: Get rid of 0x400 constant magic
by using new lan9303_read_switch_reg() inside loop.
Reduced scope of two variables.
Signed-off-by: Egil Hjelmeland
Reviewed-by: Andrew Lunn
Reviewed-by: Florian Fainelli
---
drivers/net/dsa/lan9303-core.c | 26
Den 03. aug. 2017 20:04, skrev Florian Fainelli:
On 08/03/2017 02:45 AM, Egil Hjelmeland wrote:
In lan9303_get_ethtool_stats: Get rid of 0x400 constant magic
by using new lan9303_read_switch_reg() inside loop.
Reduced scope of two variables.
Signed-off-by: Egil Hjelmeland
---
drivers/net
Den 03. aug. 2017 20:06, skrev Florian Fainelli:
On 08/03/2017 02:45 AM, Egil Hjelmeland wrote:
Simplify usage of lan9303_enable_packet_processing,
lan9303_disable_packet_processing()
Signed-off-by: Egil Hjelmeland
Reviewed-by: Florian Fainelli
took a little while to figure out that we
On 01. aug. 2017 15:27, Andrew Lunn wrote:
On Tue, Aug 01, 2017 at 02:31:44PM +0200, Egil Hjelmeland wrote:
On 01. aug. 2017 13:49, Juergen Borleis wrote:
Hi Egil,
On Tuesday 01 August 2017 13:14:38 Egil Hjelmeland wrote:
Will be used instead of '3' in upcomming patches.
Simplify usage of lan9303_enable_packet_processing,
lan9303_disable_packet_processing()
Signed-off-by: Egil Hjelmeland
---
drivers/net/dsa/lan9303-core.c | 24 ++--
1 file changed, 10 insertions(+), 14 deletions(-)
diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net
serted LAN9303_NUM_PORTS patch
- Use LAN9303_NUM_PORTS in last patch. Plus whitespace change.
Egil Hjelmeland (5):
net: dsa: lan9303: Change lan9303_xxx_packet_processing() port param.
net: dsa: lan9303: define LAN9303_NUM_PORTS 3
net: dsa: lan9303: Simplify lan9303_xxx_packet_processing() usage
ne
ing -> lan9303_disable_processing_port
Signed-off-by: Egil Hjelmeland
---
drivers/net/dsa/lan9303-core.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9303-core.c
index 31fe66fbe39a..6f409755ba1a 100644
--- a/d
1 - 100 of 172 matches
Mail list logo