Repository navigation
ramips: mt7620: fix jumbo frame mode - #24242
Conversation
|
Tested successfully on Mercusys AC12G v1 - 8M (similar to TP-Link Archer C5 v4) in DSA mode. |
openwrt-ai
left a comment
There was a problem hiding this comment.
Reviewed 1 new commit. The core fix is correct: the MT7530 encoding the commit relies on defines value 0x3 as jumbo and 0x2 as the 1552-byte limit, and gsw_mt7620.c consumes GMACCR_MAX_RX_PKT_LEN_JUMBO directly so the value change takes effect. The Fixes: d083212e1105 tag resolves to the correct mainline commit. One nit inline on the field-description comment.
Generated by Claude Code
1d90fe9 to
bd76a78
Compare
bd76a78 to
8bcc901
Compare
openwrt-ai
left a comment
There was a problem hiding this comment.
Reviewed 1 updated commit; no new issues found. The only change since the last review is the reformatting of the MAX_RX_PKT_LEN field-description comment into per-value kernel style, which resolves both prior review threads (value-0 1518/1522 provenance and the layout suggestion). No functional change.
Generated by Claude Code
MAX_RX_PKT_LEN value 2 selects 1552-byte frames, not jumbo mode. Select value 3 so the configured 2 KiB frames are actually accepted by the switch. Tested on a ZBT-WE826 (MT7620). With value 2, 1534-byte IPv4 packets pass while 1535-byte packets are dropped. With value 3, 1792-byte and 1800-byte DF IPv4 packets pass. Fixes: d083212 ("ramips: ethernet: ralink: mt7620 enable jumbo frames") Signed-off-by: Gleb Pesin <[email protected]> Link: openwrt#24242 Signed-off-by: Jonas Jelonek <[email protected]>
8bcc901 to
4c85dfa
Compare
|
Thanks! Rebased on top of main and merged! |
MAX_RX_PKT_LEN value 2 selects 1552-byte frames, not jumbo mode.
Select value 3 so the configured 2 KiB frames are actually accepted by
the switch.
Tested on a ZBT-WE826 (MT7620). With value 2, 1534-byte IPv4
packets pass while 1535-byte packets are dropped. With value 3,
1792-byte and 1800-byte DF IPv4 packets pass.
Fixes: d083212e1105 ("ramips: ethernet: ralink: mt7620 enable jumbo frames")
Signed-off-by: Gleb Pesin <[email protected]>
Link: openwrt/openwrt#24242
Signed-off-by: Jonas Jelonek <[email protected]>
Add a DSA driver for the seven-port switch integrated in MT7620. Keep the existing swconfig path for device trees without a DSA ports node. Use RXD4 source-port and TXD4 forced-port metadata with the Ralink DSA tagger. Implement bridge isolation and STP, VLAN filtering, FDB and MDB offload, ageing, flood controls, phylink, MTU limits, and software-extended hardware MIB counters. Register DSA through a bound child of the frame-engine device. This gives the managed conduit device link the correct lifetime across driver unbind and reprobe while the switch registers remain owned by the existing GSW platform device. Also make MDIO and frame-engine teardown safe for deferred probes and runtime reprobes, and reset a still-busy frame engine before freeing its DMA rings. Tested on an MT7620N rev 2 eco 6 with 100BASE-T traffic, VLAN-aware hardware bridging, 2026-byte MTU, FDB/MDB offload, repeated warm reboots, and driver unbind/rebind. Link: https://lists.infradead.org/pipermail/openwrt-devel/2021-December/037379.html Link: openwrt#23933 Link: openwrt#24242 Signed-off-by: Gleb Pesin <[email protected]>
Add a DSA driver for the seven-port switch integrated in MT7620. Keep the existing swconfig path for device trees without a DSA ports node. Use RXD4 source-port and TXD4 forced-port metadata with the Ralink DSA tagger. Implement bridge isolation and STP, VLAN filtering, FDB and MDB offload, ageing, flood controls, phylink, MTU limits, and software-extended hardware MIB counters. Register DSA through a bound child of the frame-engine device. This gives the managed conduit device link the correct lifetime across driver unbind and reprobe while the switch registers remain owned by the existing GSW platform device. Also make MDIO and frame-engine teardown safe for deferred probes and runtime reprobes, and reset a still-busy frame engine before freeing its DMA rings. Tested on an MT7620N rev 2 eco 6 with 100BASE-T traffic, VLAN-aware hardware bridging, 2026-byte MTU, FDB/MDB offload, repeated warm reboots, and driver unbind/rebind. Link: https://lists.infradead.org/pipermail/openwrt-devel/2021-December/037379.html Link: openwrt#23933 Link: openwrt#24242 Signed-off-by: Gleb Pesin <[email protected]>
Add a DSA driver for the seven-port switch integrated in MT7620. Keep the existing swconfig path for device trees without a DSA ports node. Use RXD4 source-port and TXD4 forced-port metadata with the Ralink DSA tagger. Implement bridge isolation and STP, VLAN filtering, FDB and MDB offload, ageing, flood controls, phylink, MTU limits, and software-extended hardware MIB counters. Register DSA through a bound child of the frame-engine device. This gives the managed conduit device link the correct lifetime across driver unbind and reprobe while the switch registers remain owned by the existing GSW platform device. Package the driver and tagger as kmod-dsa-mt7620 for per-device opt-in. This keeps DSA and switchdev out of swconfig-only MT7620 images and prevents installing the DSA package together with swconfig. Also make MDIO and frame-engine teardown safe for deferred probes and runtime reprobes, and reset a still-busy frame engine before freeing its DMA rings. Tested on an MT7620N rev 2 eco 6 with 100BASE-T traffic, VLAN-aware hardware bridging, 2026-byte MTU, FDB/MDB offload, repeated warm reboots, and driver unbind/rebind. The modular driver, tagger, package contents, DSA image composition, and swconfig-only kernel configuration were also verified. Link: https://lists.infradead.org/pipermail/openwrt-devel/2021-December/037379.html Link: openwrt#23933 Link: openwrt#24242 Signed-off-by: Gleb Pesin <[email protected]>
Add a DSA driver for the seven-port switch integrated in MT7620. Keep the existing swconfig path for device trees without a DSA ports node. Use RXD4 source-port and TXD4 forced-port metadata with the Ralink DSA tagger. Implement bridge isolation and STP, VLAN filtering, FDB and MDB offload, ageing, flood controls, phylink, MTU limits, and software-extended hardware MIB counters. Register DSA through a bound child of the frame-engine device. This gives the managed conduit device link the correct lifetime across driver unbind and reprobe while the switch registers remain owned by the existing GSW platform device. Package the driver and tagger as kmod-dsa-mt7620 for per-device opt-in. This keeps DSA and switchdev out of swconfig-only MT7620 images and prevents installing the DSA package together with swconfig. Also make MDIO and frame-engine teardown safe for deferred probes and runtime reprobes, and reset a still-busy frame engine before freeing its DMA rings. Tested on an MT7620N rev 2 eco 6 with 100BASE-T traffic, VLAN-aware hardware bridging, 2026-byte MTU, FDB/MDB offload, repeated warm reboots, and driver unbind/rebind. The modular driver, tagger, package contents, DSA image composition, and swconfig-only kernel configuration were also verified. Link: https://lists.infradead.org/pipermail/openwrt-devel/2021-December/037379.html Link: openwrt#23933 Link: openwrt#24242 Signed-off-by: Gleb Pesin <[email protected]>
Add a DSA driver for the seven-port switch integrated in MT7620. Keep the existing swconfig path for device trees without a DSA ports node. Use RXD4 source-port and TXD4 forced-port metadata with the Ralink DSA tagger. Implement bridge isolation and STP, VLAN filtering, FDB and MDB offload, ageing, flood controls, phylink, MTU limits, and software-extended hardware MIB counters. Register DSA through a bound child of the frame-engine device. This gives the managed conduit device link the correct lifetime across driver unbind and reprobe while the switch registers remain owned by the existing GSW platform device. Package the driver and tagger as kmod-dsa-mt7620 for per-device opt-in. This keeps DSA and switchdev out of swconfig-only MT7620 images and prevents installing the DSA package together with swconfig. Also make MDIO and frame-engine teardown safe for deferred probes and runtime reprobes, and reset a still-busy frame engine before freeing its DMA rings. Tested on an MT7620N rev 2 eco 6 with 100BASE-T traffic, VLAN-aware hardware bridging, 2026-byte MTU, FDB/MDB offload, repeated warm reboots, and driver unbind/rebind. The modular driver, tagger, package contents, DSA image composition, and swconfig-only kernel configuration were also verified. Link: https://lists.infradead.org/pipermail/openwrt-devel/2021-December/037379.html Link: openwrt#23933 Link: openwrt#24242 Signed-off-by: Gleb Pesin <[email protected]>
Add a DSA driver for the seven-port switch integrated in MT7620. Keep the existing swconfig path for device trees without a DSA ports node. Use RXD4 source-port and TXD4 forced-port metadata with the Ralink DSA tagger. Implement bridge isolation and STP, VLAN filtering, FDB and MDB offload, ageing, flood controls, phylink, MTU limits, and software-extended hardware MIB counters. Register DSA through a bound child of the frame-engine device. This gives the managed conduit device link the correct lifetime across driver unbind and reprobe while the switch registers remain owned by the existing GSW platform device. Package the driver and tagger as kmod-dsa-mt7620 for per-device opt-in. This keeps DSA and switchdev out of swconfig-only MT7620 images and prevents installing the DSA package together with swconfig. Also make MDIO and frame-engine teardown safe for deferred probes and runtime reprobes, and reset a still-busy frame engine before freeing its DMA rings. Tested on an MT7620N rev 2 eco 6 with 100BASE-T traffic, VLAN-aware hardware bridging, 2026-byte MTU, FDB/MDB offload, repeated warm reboots, and driver unbind/rebind. The modular driver, tagger, package contents, DSA image composition, and swconfig-only kernel configuration were also verified. Link: https://lists.infradead.org/pipermail/openwrt-devel/2021-December/037379.html Link: openwrt#23933 Link: openwrt#24242 Signed-off-by: Gleb Pesin <[email protected]>
Add a DSA driver for the seven-port switch integrated in MT7620. Keep the existing swconfig path for device trees without a DSA ports node. Use RXD4 source-port and TXD4 forced-port metadata with the Ralink DSA tagger. Implement bridge isolation and STP, VLAN filtering, FDB and MDB offload, ageing, flood controls, phylink, MTU limits, and software-extended hardware MIB counters. Register DSA through a bound child of the frame-engine device. This gives the managed conduit device link the correct lifetime across driver unbind and reprobe while the switch registers remain owned by the existing GSW platform device. Package the driver and tagger as kmod-dsa-mt7620 for per-device opt-in. This keeps DSA and switchdev out of swconfig-only MT7620 images and prevents installing the DSA package together with swconfig. Also make MDIO and frame-engine teardown safe for deferred probes and runtime reprobes, and reset a still-busy frame engine before freeing its DMA rings. Tested on an MT7620N rev 2 eco 6 with 100BASE-T traffic, VLAN-aware hardware bridging, 2026-byte MTU, FDB/MDB offload, repeated warm reboots, and driver unbind/rebind. The modular driver, tagger, package contents, DSA image composition, and swconfig-only kernel configuration were also verified. Link: https://lists.infradead.org/pipermail/openwrt-devel/2021-December/037379.html Link: openwrt#23933 Link: openwrt#24242 Signed-off-by: Gleb Pesin <[email protected]>
Add a DSA driver for the seven-port switch integrated in MT7620. Keep the existing swconfig path for device trees without a DSA ports node. Use RXD4 source-port and TXD4 forced-port metadata with the Ralink DSA tagger. Implement bridge isolation and STP, VLAN filtering, FDB and MDB offload, ageing, flood controls, phylink, MTU limits, and software-extended hardware MIB counters. Register DSA through a bound child of the frame-engine device. This gives the managed conduit device link the correct lifetime across driver unbind and reprobe while the switch registers remain owned by the existing GSW platform device. Package the driver and tagger as kmod-dsa-mt7620 for per-device opt-in. This keeps DSA and switchdev out of swconfig-only MT7620 images and prevents installing the DSA package together with swconfig. Also make MDIO and frame-engine teardown safe for deferred probes and runtime reprobes, and reset a still-busy frame engine before freeing its DMA rings. Tested on an MT7620N rev 2 eco 6 with 100BASE-T traffic, VLAN-aware hardware bridging, 2026-byte MTU, FDB/MDB offload, repeated warm reboots, and driver unbind/rebind. The modular driver, tagger, package contents, DSA image composition, and swconfig-only kernel configuration were also verified. Link: https://lists.infradead.org/pipermail/openwrt-devel/2021-December/037379.html Link: openwrt#23933 Link: openwrt#24242 Signed-off-by: Gleb Pesin <[email protected]>
Add a DSA driver for the seven-port switch integrated in MT7620. Keep the existing swconfig path for device trees without a DSA ports node. Use RXD4 source-port and TXD4 forced-port metadata with the Ralink DSA tagger. Implement bridge isolation and STP, VLAN filtering, FDB and MDB offload, ageing, flood controls, phylink, MTU limits, and software-extended hardware MIB counters. Register DSA through a bound child of the frame-engine device. This gives the managed conduit device link the correct lifetime across driver unbind and reprobe while the switch registers remain owned by the existing GSW platform device. Package the driver and tagger as kmod-dsa-mt7620 for per-device opt-in. This keeps DSA and switchdev out of swconfig-only MT7620 images and prevents installing the DSA package together with swconfig. Also make MDIO and frame-engine teardown safe for deferred probes and runtime reprobes, and reset a still-busy frame engine before freeing its DMA rings. Tested on an MT7620N rev 2 eco 6 with 100BASE-T traffic, VLAN-aware hardware bridging, 2026-byte MTU, FDB/MDB offload, repeated warm reboots, and driver unbind/rebind. The modular driver, tagger, package contents, DSA image composition, and swconfig-only kernel configuration were also verified. Link: https://lists.infradead.org/pipermail/openwrt-devel/2021-December/037379.html Link: openwrt#23933 Link: openwrt#24242 Signed-off-by: Gleb Pesin <[email protected]>
Add a DSA driver for the seven-port switch integrated in MT7620. Keep the existing swconfig path for device trees without a DSA ports node. Use RXD4 source-port and TXD4 forced-port metadata with the Ralink DSA tagger. Implement bridge isolation and STP, VLAN filtering, FDB and MDB offload, ageing, flood controls, phylink, MTU limits, and software-extended hardware MIB counters. Correct the shared switch MIB enable register and enable all seven port counters. The old address was inside port 0 counter space, so this also fixes legacy swconfig initialization. Register DSA through a bound child of the frame-engine device. This gives the managed conduit device link the correct lifetime across driver unbind and reprobe while the switch registers remain owned by the existing GSW platform device. Package the driver and tagger as kmod-dsa-mt7620 for per-device opt-in. This keeps DSA and switchdev out of swconfig-only MT7620 images and prevents installing the DSA package together with swconfig. Also make MDIO and frame-engine teardown safe for deferred probes and runtime reprobes, and reset a still-busy frame engine before freeing its DMA rings. Resolve FE and ESW resets by name so recovery can reset FE alone, and warn if a switch node provides neither named reset. The netdev is devm-managed, so leave NAPI deletion to free_netdev after unregister instead of deleting NAPI from fe_remove while the netdev is still registered. Tested on an MT7620N rev 2 eco 6 with 100BASE-T traffic, VLAN-aware hardware bridging, 2026-byte MTU, FDB/MDB offload, repeated warm reboots, and driver unbind/rebind. The modular driver, tagger, package contents, DSA image composition, and swconfig-only kernel configuration were also verified. Link: https://lists.infradead.org/pipermail/openwrt-devel/2021-December/037379.html Link: openwrt#23933 Link: openwrt#24242 Signed-off-by: Gleb Pesin <[email protected]>
Add a DSA driver for the seven-port switch integrated in MT7620. Keep the existing swconfig path for device trees without a DSA ports node. Use RXD4 source-port and TXD4 forced-port metadata with the Ralink DSA tagger. Implement bridge isolation and STP, VLAN filtering, FDB and MDB offload, ageing, flood controls, phylink, MTU limits, and software-extended hardware MIB counters. Correct the shared switch MIB enable register and enable all seven port counters. The old address was inside port 0 counter space, so this also fixes legacy swconfig initialization. Register DSA through a bound child of the frame-engine device. This gives the managed conduit device link the correct lifetime across driver unbind and reprobe while the switch registers remain owned by the existing GSW platform device. Package the driver and tagger as kmod-dsa-mt7620 for per-device opt-in. This keeps DSA and switchdev out of swconfig-only MT7620 images and prevents installing the DSA package together with swconfig. Also make MDIO and frame-engine teardown safe for deferred probes and runtime reprobes, and reset a still-busy frame engine before freeing its DMA rings. Resolve FE and ESW resets by name so recovery can reset FE alone, and warn if a switch node provides neither named reset. The netdev is devm-managed, so leave NAPI deletion to free_netdev after unregister instead of deleting NAPI from fe_remove while the netdev is still registered. Tested on an MT7620N rev 2 eco 6 with 100BASE-T traffic, VLAN-aware hardware bridging, 2026-byte MTU, FDB/MDB offload, repeated warm reboots, and driver unbind/rebind. The modular driver, tagger, package contents, DSA image composition, and swconfig-only kernel configuration were also verified. Link: https://lists.infradead.org/pipermail/openwrt-devel/2021-December/037379.html Link: openwrt#23933 Link: openwrt#24242 Signed-off-by: Gleb Pesin <[email protected]>
Add a DSA driver for the seven-port switch integrated in MT7620. Keep the existing swconfig path for device trees without a DSA ports node. Use RXD4 source-port and TXD4 forced-port metadata with the Ralink DSA tagger. Implement bridge isolation and STP, VLAN filtering, FDB and MDB offload, ageing, flood controls, phylink, MTU limits, and software-extended hardware MIB counters. Correct the shared switch MIB enable register and enable all seven port counters. The old address was inside port 0 counter space, so this also fixes legacy swconfig initialization. Register DSA through a bound child of the frame-engine device. This gives the managed conduit device link the correct lifetime across driver unbind and reprobe while the switch registers remain owned by the existing GSW platform device. Package the driver and tagger as kmod-dsa-mt7620 for per-device opt-in. This keeps DSA and switchdev out of swconfig-only MT7620 images and prevents installing the DSA package together with swconfig. Also make MDIO and frame-engine teardown safe for deferred probes and runtime reprobes, and reset a still-busy frame engine before freeing its DMA rings. Resolve FE and ESW resets by name so recovery can reset FE alone, and warn if a switch node provides neither named reset. The netdev is devm-managed, so leave NAPI deletion to free_netdev after unregister instead of deleting NAPI from fe_remove while the netdev is still registered. Tested on an MT7620N rev 2 eco 6 with 100BASE-T traffic, VLAN-aware hardware bridging, 2026-byte MTU, FDB/MDB offload, repeated warm reboots, and driver unbind/rebind. The modular driver, tagger, package contents, DSA image composition, and swconfig-only kernel configuration were also verified. Link: https://lists.infradead.org/pipermail/openwrt-devel/2021-December/037379.html Link: openwrt#23933 Link: openwrt#24242 Signed-off-by: Gleb Pesin <[email protected]>
Add a DSA driver for the seven-port switch integrated in MT7620. Keep the existing swconfig path for device trees without a DSA ports node. Use RXD4 source-port and TXD4 forced-port metadata with the Ralink DSA tagger. Implement bridge isolation and STP, VLAN filtering, FDB and MDB offload, ageing, flood controls, phylink, MTU limits, and software-extended hardware MIB counters. Correct the shared switch MIB enable register and enable all seven port counters. The old address was inside port 0 counter space, so this also fixes legacy swconfig initialization. Register DSA through a bound child of the frame-engine device. This gives the managed conduit device link the correct lifetime across driver unbind and reprobe while the switch registers remain owned by the existing GSW platform device. Package the driver and tagger as kmod-dsa-mt7620 for per-device opt-in. This keeps DSA and switchdev out of swconfig-only MT7620 images and prevents installing the DSA package together with swconfig. Also make MDIO and frame-engine teardown safe for deferred probes and runtime reprobes, and reset a still-busy frame engine before freeing its DMA rings. Resolve FE and ESW resets by name so recovery can reset FE alone, and warn if a switch node provides neither named reset. The netdev is devm-managed, so leave NAPI deletion to free_netdev after unregister instead of deleting NAPI from fe_remove while the netdev is still registered. Tested on an MT7620N rev 2 eco 6 with 100BASE-T traffic, VLAN-aware hardware bridging, 2026-byte MTU, FDB/MDB offload, repeated warm reboots, and driver unbind/rebind. The modular driver, tagger, package contents, DSA image composition, and swconfig-only kernel configuration were also verified. Link: https://lists.infradead.org/pipermail/openwrt-devel/2021-December/037379.html Link: openwrt#23933 Link: openwrt#24242 Signed-off-by: Gleb Pesin <[email protected]>
Add a DSA driver for the seven-port switch integrated in MT7620. Keep the existing swconfig path for device trees without a DSA ports node. Use RXD4 source-port and TXD4 forced-port metadata with the Ralink DSA tagger. The programming guide places TXD4 FP_BMAP at bits 27:20; use that layout instead of the stale unused bits 26:19 definition. Implement bridge isolation and STP, VLAN filtering, FDB and MDB offload, ageing, flood controls, phylink, MTU limits, and software-extended hardware MIB counters. DSA invokes port_stp_state_set() before updating its cached state, so pass the pending callback state as an override when recalculating port matrices instead of leaving hardware one transition behind. Correct the shared switch MIB enable register and enable all seven port counters. The old address was inside port 0 counter space, so this also fixes legacy swconfig initialization. Register DSA through a bound child of the frame-engine device. This gives the managed conduit device link the correct lifetime across driver unbind and reprobe while the switch registers remain owned by the existing GSW platform device. Package the driver and tagger as kmod-dsa-mt7620 for per-device opt-in. This keeps DSA and switchdev out of swconfig-only MT7620 images and prevents installing the DSA package together with swconfig. Also make MDIO and frame-engine teardown safe for deferred probes and runtime reprobes. Replace the legacy MDIO busy loop and -1 return with readl_poll_timeout_atomic() and its real error, and reset a still-busy frame engine before freeing DMA rings. Resolve FE and ESW resets by name so recovery can reset FE alone, and warn if a switch node provides neither named reset. The netdev is devm-managed, so leave NAPI deletion to free_netdev after unregister instead of deleting NAPI from fe_remove while the netdev is still registered. Tested on an MT7620N rev 2 eco 6 with 100BASE-T traffic, VLAN-aware hardware bridging, 2026-byte MTU, FDB/MDB offload, pending STP state, repeated warm reboots, and driver unbind/rebind. The modular driver, tagger, package contents, DSA image composition, and swconfig-only kernel configuration were also verified. An independent TP-Link Archer C5 v4 test found no regression with an external RTL8367S DSA switch using the RTL8_4t tagger. Link: https://lists.infradead.org/pipermail/openwrt-devel/2021-December/037379.html Link: openwrt#23933 Link: openwrt#24242 Signed-off-by: Gleb Pesin <[email protected]>
Add a DSA driver for the seven-port switch integrated in MT7620. Keep the existing swconfig path for device trees without a DSA ports node. Use RXD4 source-port and TXD4 forced-port metadata with the Ralink DSA tagger. The programming guide places TXD4 FP_BMAP at bits 27:20; use that layout instead of the stale unused bits 26:19 definition. Implement bridge isolation and STP, VLAN filtering, FDB and MDB offload, ageing, flood controls, phylink, MTU limits, and software-extended hardware MIB counters. DSA invokes port_stp_state_set() before updating its cached state, so pass the pending callback state as an override when recalculating port matrices instead of leaving hardware one transition behind. Correct the shared switch MIB enable register and enable all seven port counters. The old address was inside port 0 counter space, so this also fixes legacy swconfig initialization. Register DSA through a bound child of the frame-engine device. This gives the managed conduit device link the correct lifetime across driver unbind and reprobe while the switch registers remain owned by the existing GSW platform device. Package the driver and tagger as kmod-dsa-mt7620 for per-device opt-in. This keeps DSA and switchdev out of swconfig-only MT7620 images and prevents installing the DSA package together with swconfig. Also make MDIO and frame-engine teardown safe for deferred probes and runtime reprobes. Replace the legacy MDIO busy loop and -1 return with readl_poll_timeout_atomic() and its real error, and reset a still-busy frame engine before freeing DMA rings. Resolve FE and ESW resets by name so recovery can reset FE alone, and warn if a switch node provides neither named reset. The netdev is devm-managed, so leave NAPI deletion to free_netdev after unregister instead of deleting NAPI from fe_remove while the netdev is still registered. Tested on an MT7620N rev 2 eco 6 with 100BASE-T traffic, VLAN-aware hardware bridging, 2026-byte MTU, FDB/MDB offload, pending STP state, repeated warm reboots, and driver unbind/rebind. The modular driver, tagger, package contents, DSA image composition, and swconfig-only kernel configuration were also verified. An independent TP-Link Archer C5 v4 test found no regression with an external RTL8367S DSA switch using the RTL8_4t tagger. Link: https://lists.infradead.org/pipermail/openwrt-devel/2021-December/037379.html Link: openwrt#23933 Link: openwrt#24242 Signed-off-by: Gleb Pesin <[email protected]>
Add a DSA driver for the seven-port switch integrated in MT7620. Keep the existing swconfig path for device trees without a DSA ports node. Use RXD4 source-port and TXD4 forced-port metadata with the Ralink DSA tagger. The programming guide places TXD4 FP_BMAP at bits 27:20; use that layout instead of the stale unused bits 26:19 definition. Implement bridge isolation and STP, VLAN filtering, FDB and MDB offload, ageing, flood controls, phylink, MTU limits, and software-extended hardware MIB counters. DSA invokes port_stp_state_set() before updating its cached state, so pass the pending callback state as an override when recalculating port matrices instead of leaving hardware one transition behind. Correct the shared switch MIB enable register and enable all seven port counters. The old address was inside port 0 counter space, so this also fixes legacy swconfig initialization. Register DSA through a bound child of the frame-engine device. This gives the managed conduit device link the correct lifetime across driver unbind and reprobe while the switch registers remain owned by the existing GSW platform device. Package the driver and tagger as kmod-dsa-mt7620 for per-device opt-in. This keeps DSA and switchdev out of swconfig-only MT7620 images and prevents installing the DSA package together with swconfig. Also make MDIO and frame-engine teardown safe for deferred probes and runtime reprobes. Replace the legacy MDIO busy loop and -1 return with readl_poll_timeout_atomic() and its real error, and reset a still-busy frame engine before freeing DMA rings. Resolve FE and ESW resets by name so recovery can reset FE alone, and warn if a switch node provides neither named reset. The netdev is devm-managed, so leave NAPI deletion to free_netdev after unregister instead of deleting NAPI from fe_remove while the netdev is still registered. Tested on an MT7620N rev 2 eco 6 with 100BASE-T traffic, VLAN-aware hardware bridging, 2026-byte MTU, FDB/MDB offload, pending STP state, repeated warm reboots, and driver unbind/rebind. The modular driver, tagger, package contents, DSA image composition, and swconfig-only kernel configuration were also verified. An independent TP-Link Archer C5 v4 test found no regression with an external RTL8367S DSA switch using the RTL8_4t tagger. Link: https://lists.infradead.org/pipermail/openwrt-devel/2021-December/037379.html Link: openwrt#23933 Link: openwrt#24242 Signed-off-by: Gleb Pesin <[email protected]>
Add a DSA driver for the seven-port switch integrated in MT7620. Keep the existing swconfig path for device trees without a DSA ports node. Use RXD4 source-port and TXD4 forced-port metadata with the Ralink DSA tagger. The programming guide places TXD4 FP_BMAP at bits 27:20; use that layout instead of the stale unused bits 26:19 definition. Implement bridge isolation and STP, VLAN filtering, FDB and MDB offload, ageing, flood controls, phylink, MTU limits, and software-extended hardware MIB counters. DSA invokes port_stp_state_set() before updating its cached state, so pass the pending callback state as an override when recalculating port matrices instead of leaving hardware one transition behind. Correct the shared switch MIB enable register and enable all seven port counters. The old address was inside port 0 counter space, so this also fixes legacy swconfig initialization. Register DSA through a bound child of the frame-engine device. This gives the managed conduit device link the correct lifetime across driver unbind and reprobe while the switch registers remain owned by the existing GSW platform device. Package the driver and tagger as kmod-dsa-mt7620 for per-device opt-in. This keeps DSA and switchdev out of swconfig-only MT7620 images and prevents installing the DSA package together with swconfig. Also make MDIO and frame-engine teardown safe for deferred probes and runtime reprobes. Replace the legacy MDIO busy loop and -1 return with readl_poll_timeout_atomic() and its real error, and reset a still-busy frame engine before freeing DMA rings. Resolve FE and ESW resets by name so recovery can reset FE alone, and warn if a switch node provides neither named reset. The netdev is devm-managed, so leave NAPI deletion to free_netdev after unregister instead of deleting NAPI from fe_remove while the netdev is still registered. Tested on an MT7620N rev 2 eco 6 with 100BASE-T traffic, VLAN-aware hardware bridging, 2026-byte MTU, FDB/MDB offload, pending STP state, repeated warm reboots, and driver unbind/rebind. The modular driver, tagger, package contents, DSA image composition, and swconfig-only kernel configuration were also verified. An independent TP-Link Archer C5 v4 test found no regression with an external RTL8367S DSA switch using the RTL8_4t tagger. Link: https://lists.infradead.org/pipermail/openwrt-devel/2021-December/037379.html Link: openwrt#23933 Link: openwrt#24242 Signed-off-by: Gleb Pesin <[email protected]>
Add a DSA driver for the seven-port switch integrated in MT7620. Keep the existing swconfig path for device trees without a DSA ports node. Use RXD4 source-port and TXD4 forced-port metadata with the Ralink DSA tagger. The programming guide places TXD4 FP_BMAP at bits 27:20; use that layout instead of the stale unused bits 26:19 definition. Implement bridge isolation and STP, VLAN filtering, FDB and MDB offload, ageing, flood controls, phylink, MTU limits, and software-extended hardware MIB counters. DSA invokes port_stp_state_set() before updating its cached state, so pass the pending callback state as an override when recalculating port matrices instead of leaving hardware one transition behind. Correct the shared switch MIB enable register and enable all seven port counters. The old address was inside port 0 counter space, so this also fixes legacy swconfig initialization. Register DSA through a bound child of the frame-engine device. This gives the managed conduit device link the correct lifetime across driver unbind and reprobe while the switch registers remain owned by the existing GSW platform device. Package the driver and tagger as kmod-dsa-mt7620 for per-device opt-in. This keeps DSA and switchdev out of swconfig-only MT7620 images and prevents installing the DSA package together with swconfig. Also make MDIO and frame-engine teardown safe for deferred probes and runtime reprobes. Replace the legacy MDIO busy loop and -1 return with readl_poll_timeout_atomic() and its real error, and reset a still-busy frame engine before freeing DMA rings. Resolve FE and ESW resets by name so recovery can reset FE alone, and warn if a switch node provides neither named reset. The netdev is devm-managed, so leave NAPI deletion to free_netdev after unregister instead of deleting NAPI from fe_remove while the netdev is still registered. Tested on an MT7620N rev 2 eco 6 with 100BASE-T traffic, VLAN-aware hardware bridging, 2026-byte MTU, FDB/MDB offload, pending STP state, repeated warm reboots, and driver unbind/rebind. The modular driver, tagger, package contents, DSA image composition, and swconfig-only kernel configuration were also verified. An independent TP-Link Archer C5 v4 test found no regression with an external RTL8367S DSA switch using the RTL8_4t tagger. Link: https://lists.infradead.org/pipermail/openwrt-devel/2021-December/037379.html Link: openwrt#23933 Link: openwrt#24242 Signed-off-by: Gleb Pesin <[email protected]>
Add a DSA driver for the seven-port switch integrated in MT7620. Keep the existing swconfig path for device trees without a DSA ports node. Use RXD4 source-port and TXD4 forced-port metadata with the Ralink DSA tagger. The programming guide places TXD4 FP_BMAP at bits 27:20; use that layout instead of the stale unused bits 26:19 definition. Implement bridge isolation and STP, VLAN filtering, FDB and MDB offload, ageing, flood controls, phylink, MTU limits, and software-extended hardware MIB counters. DSA invokes port_stp_state_set() before updating its cached state, so pass the pending callback state as an override when recalculating port matrices instead of leaving hardware one transition behind. Correct the shared switch MIB enable register and enable all seven port counters. The old address was inside port 0 counter space, so this also fixes legacy swconfig initialization. Register DSA through a bound child of the frame-engine device. This gives the managed conduit device link the correct lifetime across driver unbind and reprobe while the switch registers remain owned by the existing GSW platform device. Package the driver and tagger as kmod-dsa-mt7620 for per-device opt-in. This keeps DSA and switchdev out of swconfig-only MT7620 images and prevents installing the DSA package together with swconfig. Also make MDIO and frame-engine teardown safe for deferred probes and runtime reprobes. Replace the legacy MDIO busy loop and -1 return with readl_poll_timeout_atomic() and its real error, and reset a still-busy frame engine before freeing DMA rings. Resolve FE and ESW resets by name so recovery can reset FE alone, and warn if a switch node provides neither named reset. The netdev is devm-managed, so leave NAPI deletion to free_netdev after unregister instead of deleting NAPI from fe_remove while the netdev is still registered. Tested on an MT7620N rev 2 eco 6 with 100BASE-T traffic, VLAN-aware hardware bridging, 2026-byte MTU, FDB/MDB offload, pending STP state, repeated warm reboots, and driver unbind/rebind. The modular driver, tagger, package contents, DSA image composition, and swconfig-only kernel configuration were also verified. An independent TP-Link Archer C5 v4 test found no regression with an external RTL8367S DSA switch using the RTL8_4t tagger. Link: https://lists.infradead.org/pipermail/openwrt-devel/2021-December/037379.html Link: openwrt#23933 Link: openwrt#24242 Signed-off-by: Gleb Pesin <[email protected]>
Add a DSA driver for the seven-port switch integrated in MT7620. Keep the existing swconfig path for device trees without a DSA ports node. Use RXD4 source-port and TXD4 forced-port metadata with the Ralink DSA tagger. The programming guide places TXD4 FP_BMAP at bits 27:20; use that layout instead of the stale unused bits 26:19 definition. Implement bridge isolation and STP, VLAN filtering, FDB and MDB offload, ageing, flood controls, phylink, MTU limits, and software-extended hardware MIB counters. DSA invokes port_stp_state_set() before updating its cached state, so pass the pending callback state as an override when recalculating port matrices instead of leaving hardware one transition behind. Correct the shared switch MIB enable register and enable all seven port counters. The old address was inside port 0 counter space, so this also fixes legacy swconfig initialization. Register DSA through a bound child of the frame-engine device. This gives the managed conduit device link the correct lifetime across driver unbind and reprobe while the switch registers remain owned by the existing GSW platform device. Package the driver and tagger as kmod-dsa-mt7620 for per-device opt-in. This keeps DSA and switchdev out of swconfig-only MT7620 images and prevents installing the DSA package together with swconfig. Also make MDIO and frame-engine teardown safe for deferred probes and runtime reprobes. Replace the legacy MDIO busy loop and -1 return with readl_poll_timeout_atomic() and its real error, and reset a still-busy frame engine before freeing DMA rings. Resolve FE and ESW resets by name so recovery can reset FE alone, and warn if a switch node provides neither named reset. The netdev is devm-managed, so leave NAPI deletion to free_netdev after unregister instead of deleting NAPI from fe_remove while the netdev is still registered. Tested on an MT7620N rev 2 eco 6 with 100BASE-T traffic, VLAN-aware hardware bridging, 2026-byte MTU, FDB/MDB offload, pending STP state, repeated warm reboots, and driver unbind/rebind. The modular driver, tagger, package contents, DSA image composition, and swconfig-only kernel configuration were also verified. An independent TP-Link Archer C5 v4 test found no regression with an external RTL8367S DSA switch using the RTL8_4t tagger. Link: https://lists.infradead.org/pipermail/openwrt-devel/2021-December/037379.html Link: openwrt#23933 Link: openwrt#24242 Signed-off-by: Gleb Pesin <[email protected]>
Add a DSA driver for the seven-port switch integrated in MT7620. Keep the existing swconfig path for device trees without a DSA ports node. Use RXD4 source-port and TXD4 forced-port metadata with the Ralink DSA tagger. The programming guide places TXD4 FP_BMAP at bits 27:20; use that layout instead of the stale unused bits 26:19 definition. Implement bridge isolation and STP, VLAN filtering, FDB and MDB offload, ageing, flood controls, phylink, MTU limits, and software-extended hardware MIB counters. DSA invokes port_stp_state_set() before updating its cached state, so pass the pending callback state as an override when recalculating port matrices instead of leaving hardware one transition behind. Correct the shared switch MIB enable register and enable all seven port counters. The old address was inside port 0 counter space, so this also fixes legacy swconfig initialization. Register DSA through a bound child of the frame-engine device. This gives the managed conduit device link the correct lifetime across driver unbind and reprobe while the switch registers remain owned by the existing GSW platform device. Package the driver and tagger as kmod-dsa-mt7620 for per-device opt-in. This keeps DSA and switchdev out of swconfig-only MT7620 images and prevents installing the DSA package together with swconfig. Also make MDIO and frame-engine teardown safe for deferred probes and runtime reprobes. Replace the legacy MDIO busy loop and -1 return with readl_poll_timeout_atomic() and its real error, and reset a still-busy frame engine before freeing DMA rings. Resolve FE and ESW resets by name so recovery can reset FE alone, and warn if a switch node provides neither named reset. The netdev is devm-managed, so leave NAPI deletion to free_netdev after unregister instead of deleting NAPI from fe_remove while the netdev is still registered. Tested on an MT7620N rev 2 eco 6 with 100BASE-T traffic, VLAN-aware hardware bridging, 2026-byte MTU, FDB/MDB offload, pending STP state, repeated warm reboots, and driver unbind/rebind. The modular driver, tagger, package contents, DSA image composition, and swconfig-only kernel configuration were also verified. An independent TP-Link Archer C5 v4 test found no regression with an external RTL8367S DSA switch using the RTL8_4t tagger. Link: https://lists.infradead.org/pipermail/openwrt-devel/2021-December/037379.html Link: openwrt#23933 Link: openwrt#24242 Signed-off-by: Gleb Pesin <[email protected]>
Add a DSA driver for the seven-port switch integrated in MT7620. Keep the existing swconfig path for device trees without a DSA ports node. Use RXD4 source-port and TXD4 forced-port metadata with the Ralink DSA tagger. The programming guide places TXD4 FP_BMAP at bits 27:20; use that layout instead of the stale unused bits 26:19 definition. Implement bridge isolation and STP, VLAN filtering, FDB and MDB offload, ageing, flood controls, phylink, MTU limits, and software-extended hardware MIB counters. DSA invokes port_stp_state_set() before updating its cached state, so pass the pending callback state as an override when recalculating port matrices instead of leaving hardware one transition behind. Correct the shared switch MIB enable register and enable all seven port counters. The old address was inside port 0 counter space, so this also fixes legacy swconfig initialization. Register DSA through a bound child of the frame-engine device. This gives the managed conduit device link the correct lifetime across driver unbind and reprobe while the switch registers remain owned by the existing GSW platform device. Package the driver and tagger as kmod-dsa-mt7620 for per-device opt-in. This keeps DSA and switchdev out of swconfig-only MT7620 images and prevents installing the DSA package together with swconfig. Also make MDIO and frame-engine teardown safe for deferred probes and runtime reprobes. Replace the legacy MDIO busy loop and -1 return with readl_poll_timeout_atomic() and its real error, and reset a still-busy frame engine before freeing DMA rings. Resolve FE and ESW resets by name so recovery can reset FE alone, and warn if a switch node provides neither named reset. The netdev is devm-managed, so leave NAPI deletion to free_netdev after unregister instead of deleting NAPI from fe_remove while the netdev is still registered. Tested on an MT7620N rev 2 eco 6 with 100BASE-T traffic, VLAN-aware hardware bridging, 2026-byte MTU, FDB/MDB offload, pending STP state, repeated warm reboots, and driver unbind/rebind. The modular driver, tagger, package contents, DSA image composition, and swconfig-only kernel configuration were also verified. An independent TP-Link Archer C5 v4 test found no regression with an external RTL8367S DSA switch using the RTL8_4t tagger. Link: https://lists.infradead.org/pipermail/openwrt-devel/2021-December/037379.html Link: openwrt#23933 Link: openwrt#24242 Signed-off-by: Gleb Pesin <[email protected]>
Add a DSA driver for the seven-port switch integrated in MT7620. Keep the existing swconfig path for device trees without a DSA ports node. Use RXD4 source-port and TXD4 forced-port metadata with the Ralink DSA tagger. The programming guide places TXD4 FP_BMAP at bits 27:20; use that layout instead of the stale unused bits 26:19 definition. Implement bridge isolation and STP, VLAN filtering, FDB and MDB offload, ageing, flood controls, phylink, MTU limits, and software-extended hardware MIB counters. DSA invokes port_stp_state_set() before updating its cached state, so pass the pending callback state as an override when recalculating port matrices instead of leaving hardware one transition behind. Correct the shared switch MIB enable register and enable all seven port counters. The old address was inside port 0 counter space, so this also fixes legacy swconfig initialization. Register DSA through a bound child of the frame-engine device. This gives the managed conduit device link the correct lifetime across driver unbind and reprobe while the switch registers remain owned by the existing GSW platform device. Package the driver and tagger as kmod-dsa-mt7620 for per-device opt-in. This keeps DSA and switchdev out of swconfig-only MT7620 images and prevents installing the DSA package together with swconfig. Also make MDIO and frame-engine teardown safe for deferred probes and runtime reprobes. Replace the legacy MDIO busy loop and -1 return with readl_poll_timeout_atomic() and its real error, and reset a still-busy frame engine before freeing DMA rings. Resolve FE and ESW resets by name so recovery can reset FE alone, and warn if a switch node provides neither named reset. The FE-only reset is a stop-path fallback when DMA fails to quiesce before its rings are freed. It does not recover network blocks left stale across a system restart; that separate condition is handled by the reset change linked below. The netdev is devm-managed, so leave NAPI deletion to free_netdev after unregister instead of deleting NAPI from fe_remove while the netdev is still registered. Tested on an MT7620N rev 2 eco 6 with 100BASE-T traffic, VLAN-aware hardware bridging, 2026-byte MTU, FDB/MDB offload, pending STP state, and driver unbind/rebind. The modular driver, tagger, package contents, DSA image composition, and swconfig-only kernel configuration were also verified. An independent TP-Link Archer C5 v4 test found no regression with an external RTL8367S DSA switch using the RTL8_4t tagger. Warm-reboot recovery was tested with the separate reset change applied and is not claimed by this DSA commit alone. Link: https://lists.infradead.org/pipermail/openwrt-devel/2021-December/037379.html Link: openwrt#23933 Link: openwrt#24242 Link: openwrt#24724 Signed-off-by: Gleb Pesin <[email protected]>
Add a DSA driver for the seven-port switch integrated in MT7620. Keep the existing swconfig path for device trees without a DSA ports node. Use RXD4 source-port and TXD4 forced-port metadata with the Ralink DSA tagger. The programming guide places TXD4 FP_BMAP at bits 27:20; use that layout instead of the stale unused bits 26:19 definition. Implement bridge isolation and STP, VLAN filtering, FDB and MDB offload, ageing, flood controls, phylink, MTU limits, and software-extended hardware MIB counters. DSA invokes port_stp_state_set() before updating its cached state, so pass the pending callback state as an override when recalculating port matrices instead of leaving hardware one transition behind. Correct the shared switch MIB enable register and enable all seven port counters. The old address was inside port 0 counter space, so this also fixes legacy swconfig initialization. Register DSA through a bound child of the frame-engine device. This gives the managed conduit device link the correct lifetime across driver unbind and reprobe while the switch registers remain owned by the existing GSW platform device. Package the driver and tagger as kmod-dsa-mt7620 for per-device opt-in. This keeps DSA and switchdev out of swconfig-only MT7620 images and prevents installing the DSA package together with swconfig. Also make MDIO and frame-engine teardown safe for deferred probes and runtime reprobes. Replace the legacy MDIO busy loop and -1 return with readl_poll_timeout_atomic() and its real error, and reset a still-busy frame engine before freeing DMA rings. Resolve FE and ESW resets by name so recovery can reset FE alone, and warn if a switch node provides neither named reset. The FE-only reset is a stop-path fallback when DMA fails to quiesce before its rings are freed. It does not recover network blocks left stale across a system restart; that separate condition is handled by the reset change linked below. The netdev is devm-managed, so leave NAPI deletion to free_netdev after unregister instead of deleting NAPI from fe_remove while the netdev is still registered. Tested on an MT7620N rev 2 eco 6 with 100BASE-T traffic, VLAN-aware hardware bridging, 2026-byte MTU, FDB/MDB offload, pending STP state, and driver unbind/rebind. The modular driver, tagger, package contents, DSA image composition, and swconfig-only kernel configuration were also verified. An independent TP-Link Archer C5 v4 test exercised an external RTL8367S DSA switch using the RTL8_4t tagger as a regression check on the shared dsa_tag_protocol enum. It found no collision or external-switch regression; it does not validate the MT7620 integrated-switch path. Warm-reboot recovery was tested with the separate reset change from openwrt#24724 applied and is not claimed by this DSA commit. Link: openwrt#24242 Link: openwrt#24724 Signed-off-by: Gleb Pesin <[email protected]>
Add a DSA driver for the seven-port switch integrated in MT7620. Keep the existing swconfig path for device trees without a DSA ports node. Use RXD4 source-port and TXD4 forced-port metadata with the Ralink DSA tagger. The programming guide places TXD4 FP_BMAP at bits 27:20; use that layout instead of the stale unused bits 26:19 definition. Implement bridge isolation and STP, VLAN filtering, FDB and MDB offload, ageing, flood controls, phylink, MTU limits, and software-extended hardware MIB counters. DSA invokes port_stp_state_set() before updating its cached state, so pass the pending callback state as an override when recalculating port matrices instead of leaving hardware one transition behind. Correct the shared switch MIB enable register and enable all seven port counters. The old address was inside port 0 counter space, so this also fixes legacy swconfig initialization. Register DSA through a bound child of the frame-engine device. This gives the managed conduit device link the correct lifetime across driver unbind and reprobe while the switch registers remain owned by the existing GSW platform device. Package the driver and tagger as kmod-dsa-mt7620 for per-device opt-in. This keeps DSA and switchdev out of swconfig-only MT7620 images and prevents installing the DSA package together with swconfig. Also make MDIO and frame-engine teardown safe for deferred probes and runtime reprobes. Replace the legacy MDIO busy loop and -1 return with readl_poll_timeout_atomic() and its real error, and reset a still-busy frame engine before freeing DMA rings. Resolve FE and ESW resets by name so recovery can reset FE alone, and warn if a switch node provides neither named reset. The FE-only reset is a stop-path fallback when DMA fails to quiesce before its rings are freed. It does not recover network blocks left stale across a system restart; that separate condition is handled by the reset change linked below. The netdev is devm-managed, so leave NAPI deletion to free_netdev after unregister instead of deleting NAPI from fe_remove while the netdev is still registered. Tested on an MT7620N rev 2 eco 6 with 100BASE-T traffic, VLAN-aware hardware bridging, 2026-byte MTU, FDB/MDB offload, pending STP state, and driver unbind/rebind. The modular driver, tagger, package contents, DSA image composition, and swconfig-only kernel configuration were also verified. An independent TP-Link Archer C5 v4 test exercised an external RTL8367S DSA switch using the RTL8_4t tagger as a regression check on the shared dsa_tag_protocol enum. It found no collision or external-switch regression; it does not validate the MT7620 integrated-switch path. Warm-reboot recovery was tested with the separate reset change from openwrt#24724 applied and is not claimed by this DSA commit. Link: openwrt#24242 Link: openwrt#24724 Signed-off-by: Gleb Pesin <[email protected]>
MAX_RX_PKT_LEN value 2 selects 1552-byte frames, not jumbo mode. Select value 3 so the configured 2 KiB frames are actually accepted by the switch. Tested on a ZBT-WE826 (MT7620). With value 2, 1534-byte IPv4 packets pass while 1535-byte packets are dropped. With value 3, 1792-byte and 1800-byte DF IPv4 packets pass. Fixes: d083212 ("ramips: ethernet: ralink: mt7620 enable jumbo frames") Signed-off-by: Gleb Pesin <[email protected]> Link: openwrt#24242 Signed-off-by: Jonas Jelonek <[email protected]>
MAX_RX_PKT_LEN value 2 selects 1552-byte frames, not jumbo mode. Select value 3 so the configured 2 KiB frames are actually accepted by the switch. Tested on a ZBT-WE826 (MT7620). With value 2, 1534-byte IPv4 packets pass while 1535-byte packets are dropped. With value 3, 1792-byte and 1800-byte DF IPv4 packets pass. Fixes: bb0d9ca ("ramips: ethernet: ralink: mt7620 enable jumbo frames") Signed-off-by: Gleb Pesin <[email protected]> Link: openwrt/openwrt#24242 Signed-off-by: Jonas Jelonek <[email protected]>
What changed
Select
MAX_RX_PKT_LENvalue 3 for jumbo mode and correct the fielddescription.
Why
The affected MT7620 jumbo-frame setup was added by the
ramips: ethernet: ralink: mt7620 enable jumbo framescommitin OpenWrt PR #23933. That PR adds support for external DSA switches,
while this register programming applies to the MT7620 internal switch.
Value 2 selects a 1552-byte receive limit, while value 3 selects jumbo
mode. The current code therefore advertises an MTU up to 2048 but the
internal switch drops larger frames. The encoding matches the upstream
MT7530 definitions.
Validation
Tested on a ZBT-WE826 with an MT7620:
GMACCR=0x00003f0a; IPv4 packets with atotal length of 1534 bytes passed, while 1535 bytes were dropped.
GMACCR=0x00003f0b;1792-byte and 1800-byte DF IPv4 packets passed with no loss.
GMACCR=0x00003f0band repeated the 1792/1800-byte tests successfully.
echo requests at that limit completed without loss:
scripts/checkpatch.pl: 0 errors, 0 warnings.