| f9822b4c | 09-Oct-2026 |
David Yang <mmyangfl@gmail.com> |
net: dsa: motorcomm: Add TC prio support
The HW orders ACL rules by the 9-bit ORD field (512 values, larger matching first), while TC priorities span 1..U16_MAX with the smallest meaning the highest
net: dsa: motorcomm: Add TC prio support
The HW orders ACL rules by the 9-bit ORD field (512 values, larger matching first), while TC priorities span 1..U16_MAX with the smallest meaning the highest. Map them as evenly as possible, and reject others which do not map onto a hardware order instead of silently colliding with a neighbouring one.
Signed-off-by: David Yang <mmyangfl@gmail.com> Link: https://patch.msgid.link/20261009165825.359259-5-mmyangfl@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 73db071a | 09-Oct-2026 |
David Yang <mmyangfl@gmail.com> |
net: dsa: motorcomm: Enable ACL on demand
Track the usage of ACL rules and enable it per port only when it is actually used. This is aligned with ODM recommendations and helps reduce latency.
Signe
net: dsa: motorcomm: Enable ACL on demand
Track the usage of ACL rules and enable it per port only when it is actually used. This is aligned with ODM recommendations and helps reduce latency.
Signed-off-by: David Yang <mmyangfl@gmail.com> Link: https://patch.msgid.link/20261009165825.359259-4-mmyangfl@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 4a8e05d6 | 09-Oct-2026 |
David Yang <mmyangfl@gmail.com> |
net: dsa: motorcomm: Use NSEC_PER_SEC
Get rid of magic numbers.
Signed-off-by: David Yang <mmyangfl@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/2026100916582
net: dsa: motorcomm: Use NSEC_PER_SEC
Get rid of magic numbers.
Signed-off-by: David Yang <mmyangfl@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20261009165825.359259-3-mmyangfl@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| ed445358 | 04-Oct-2026 |
David Yang <mmyangfl@gmail.com> |
net: dsa: motorcomm: Fix MIB synchronization
The previous MIB sync was based on the false assumption that 64-bit variables are always atomic. To fix that:
* .get_stats64() uses u64_stats_sync, to
net: dsa: motorcomm: Fix MIB synchronization
The previous MIB sync was based on the false assumption that 64-bit variables are always atomic. To fix that:
* .get_stats64() uses u64_stats_sync, together with u64_stats_t; * others take the free mutex lock if possible.
To minimize time of the write side of u64_stats_sync, a per-port buffer is used so that all the stat can be written back altogether after all IO operations.
The odds of this issue are very low and it does not affect the control flow, while fixing it would require a thorough refactoring (together with the previous commit), so it may not be worth backporting.
Signed-off-by: David Yang <mmyangfl@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20261004160622.948037-7-mmyangfl@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| e7b23688 | 04-Oct-2026 |
David Yang <mmyangfl@gmail.com> |
net: dsa: motorcomm: Use u64_stats_t for MIB stats
64-bit variables might not be atomic on 32-bit architectures, and could lead to load/store tearing.
This is a verbatim change that replaces every
net: dsa: motorcomm: Use u64_stats_t for MIB stats
64-bit variables might not be atomic on 32-bit architectures, and could lead to load/store tearing.
This is a verbatim change that replaces every u64 statistics into u64_stats_t. This is not a self-contained fix-all commit: u64_stats_sync is equipped in the next commit for easy reviewing.
Signed-off-by: David Yang <mmyangfl@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20261004160622.948037-6-mmyangfl@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 25265e7c | 04-Oct-2026 |
David Yang <mmyangfl@gmail.com> |
net: dsa: motorcomm: Split MIB module
yt922x is going to use a different MIB scheme, split it to reduce the length of chip.c.
Signed-off-by: David Yang <mmyangfl@gmail.com> Reviewed-by: Andrew Lunn
net: dsa: motorcomm: Split MIB module
yt922x is going to use a different MIB scheme, split it to reduce the length of chip.c.
Signed-off-by: David Yang <mmyangfl@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20261004160622.948037-5-mmyangfl@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| a219b5ea | 04-Oct-2026 |
David Yang <mmyangfl@gmail.com> |
net: dsa: motorcomm: Split MIB buffers
With MIB improvement introduced later, struct yt921x_priv will be over 20 KiB which is not very good for a single kmalloc(). Dynamically allocate the MIB struc
net: dsa: motorcomm: Split MIB buffers
With MIB improvement introduced later, struct yt921x_priv will be over 20 KiB which is not very good for a single kmalloc(). Dynamically allocate the MIB structures to reduce the size of struct yt921x_priv (and adjust polling work lifecycle), and do not waste memory on dummy ports.
Signed-off-by: David Yang <mmyangfl@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20261004160622.948037-4-mmyangfl@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 05a72073 | 04-Oct-2026 |
David Yang <mmyangfl@gmail.com> |
net: dsa: motorcomm: Rename MIB stuff
Rename them in preparation of major MIB refactor.
Signed-off-by: David Yang <mmyangfl@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.
net: dsa: motorcomm: Rename MIB stuff
Rename them in preparation of major MIB refactor.
Signed-off-by: David Yang <mmyangfl@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20261004160622.948037-3-mmyangfl@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 4b8fbb87 | 23-Sep-2026 |
David Yang <mmyangfl@gmail.com> |
net: dsa: motorcomm: Add SerDes PCS
Support in-band negotiation of the SerDes ports.
Signed-off-by: David Yang <mmyangfl@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msg
net: dsa: motorcomm: Add SerDes PCS
Support in-band negotiation of the SerDes ports.
Signed-off-by: David Yang <mmyangfl@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20260923021945.2203368-9-mmyangfl@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| b9eca1c2 | 23-Sep-2026 |
David Yang <mmyangfl@gmail.com> |
net: dsa: motorcomm: Split MDIO bus module
Split it in order to be used in other modules.
Signed-off-by: David Yang <mmyangfl@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patc
net: dsa: motorcomm: Split MDIO bus module
Split it in order to be used in other modules.
Signed-off-by: David Yang <mmyangfl@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20260923021945.2203368-8-mmyangfl@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| c9996cf7 | 23-Sep-2026 |
David Yang <mmyangfl@gmail.com> |
net: dsa: motorcomm: Hoist port_to_priv helper into chip.h
yt921x_poll_mib() open-codes the same container_of_const() expression that leds.c defines as to_yt921x_priv(). Move the macro to chip.h as
net: dsa: motorcomm: Hoist port_to_priv helper into chip.h
yt921x_poll_mib() open-codes the same container_of_const() expression that leds.c defines as to_yt921x_priv(). Move the macro to chip.h as yt921x_port_to_priv() so both files use one definition.
Signed-off-by: David Yang <mmyangfl@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20260923021945.2203368-7-mmyangfl@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 5423f892 | 23-Sep-2026 |
David Yang <mmyangfl@gmail.com> |
net: dsa: motorcomm: Introduce yt921x_speed
FIELD_PREP values cannot be used as case labels. Introduce enum for future use.
Signed-off-by: David Yang <mmyangfl@gmail.com> Reviewed-by: Andrew Lunn <
net: dsa: motorcomm: Introduce yt921x_speed
FIELD_PREP values cannot be used as case labels. Introduce enum for future use.
Signed-off-by: David Yang <mmyangfl@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20260923021945.2203368-6-mmyangfl@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| be5cdff0 | 23-Sep-2026 |
David Yang <mmyangfl@gmail.com> |
net: dsa: motorcomm: Fix register bit field names
Review and fix the incorrectness in the bit field names. No functional change.
Signed-off-by: David Yang <mmyangfl@gmail.com> Reviewed-by: Andrew L
net: dsa: motorcomm: Fix register bit field names
Review and fix the incorrectness in the bit field names. No functional change.
Signed-off-by: David Yang <mmyangfl@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20260923021945.2203368-5-mmyangfl@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 07b60e1b | 23-Sep-2026 |
David Yang <mmyangfl@gmail.com> |
net: dsa: motorcomm: Identify port type at runtime
The yt921x_port_is_internal/external() macros hardcoded the port layout: they treat ports 8 and 9 as external on every chip and count the dummy por
net: dsa: motorcomm: Identify port type at runtime
The yt921x_port_is_internal/external() macros hardcoded the port layout: they treat ports 8 and 9 as external on every chip and count the dummy ports as internal.
Identify the actual port capabilities using chip info and track configuration of external ports (although only SerDes is supported now). This is a hardening and cleanup step ahead of the SerDes PCS support, no behavior changes intended.
Signed-off-by: David Yang <mmyangfl@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20260923021945.2203368-4-mmyangfl@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 605597af | 23-Sep-2026 |
David Yang <mmyangfl@gmail.com> |
net: dsa: motorcomm: Split xMII and SERDES port masks
Replace external_mask with xmii_mask and serdes_mask, and advertise the interface modes it actually supports.
Also move struct yt921x_info into
net: dsa: motorcomm: Split xMII and SERDES port masks
Replace external_mask with xmii_mask and serdes_mask, and advertise the interface modes it actually supports.
Also move struct yt921x_info into chip.h for future use.
Signed-off-by: David Yang <mmyangfl@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20260923021945.2203368-3-mmyangfl@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|