From fe1c47e107c9c55d2e62973fa7c37bfc1063088a Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Tue, 5 Nov 2024 19:30:09 +0100 Subject: [PATCH 01/14] .github: allow release job to create new discussions Signed-off-by: Joachim Wiberg --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 138bfa25b..6649b8dbb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -101,6 +101,7 @@ jobs: runs-on: [ self-hosted, release ] permissions: contents: write + discussions: write steps: - uses: actions/checkout@v4 with: From e25eb1966e37da0dded0f7c0cfacdb57002a6faf Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Thu, 7 Nov 2024 10:13:53 +0100 Subject: [PATCH 02/14] patches/linux: minor fix to 6393X led handling Signed-off-by: Joachim Wiberg --- ...-support-for-PHY-LEDs-polarity-modes.patch | 3 +- ...rt-setting-the-MDC-frequency-on-XSMI.patch | 3 +- ...x-Create-API-to-read-a-single-stat-c.patch | 3 +- ...sa-mv88e6xxx-Give-each-hw-stat-an-ID.patch | 3 +- ...xx-Add-eth-mac-counter-group-support.patch | 3 +- ...x-Limit-histogram-counters-to-ingres.patch | 3 +- ...e6xxx-Add-rmon-counter-group-support.patch | 3 +- ...dsa-mv88e6xxx-Add-LED-infrastructure.patch | 4 +- ...-mv88e6xxx-Add-LED-support-for-6393X.patch | 4 +- ...x-Fix-timeout-on-waiting-for-PPU-on-.patch | 4 +- ...MDB-memberships-whose-L2-addresses-o.patch | 4 +- ...0g-Support-firmware-loading-on-88X33.patch | 4 +- ...0g-Fix-power-up-when-strapped-to-sta.patch | 4 +- ...rvell10g-Add-LED-support-for-88X3310.patch | 4 +- ...0g-Support-LEDs-tied-to-a-single-med.patch | 4 +- ...ie-tlv-Let-device-probe-even-when-TL.patch | 4 +- ...-classifying-unknown-multicast-as-mr.patch | 2 +- ...e-router-ports-when-forwarding-L2-mu.patch | 2 +- ...t-EtherType-based-priority-overrides.patch | 3 +- ...x-Support-EtherType-based-priority-o.patch | 3 +- ...phy-Do-not-resume-PHY-when-attaching.patch | 4 +- ...x-Improve-indirect-register-access-p.patch | 4 +- ...delay-for-applying-strict-multicast-.patch | 2 +- ...x-Honor-ports-being-managed-via-in-b.patch | 4 +- ...6xxx-Fix-port-policy-config-on-6393X.patch | 3 +- ...x-Limit-rsvd2cpu-policy-to-user-port.patch | 4 +- ...t-log-level-for-unauthorized-devices.patch | 2 +- ...x-Grab-register-lock-during-counter-.patch | 4 +- ...rentiate-MDB-additions-from-modifica.patch | 4 +- ...Use-tag-priority-as-initial-skb-prio.patch | 4 +- ...a-mv88e6xxx-Add-mqprio-qdisc-support.patch | 4 +- ...x-Use-VLAN-prio-over-IP-when-both-ar.patch | 4 +- ...x-use-EOPNOTSUPP-for-unsupported-fla.patch | 43 +++++++++++++++++++ 33 files changed, 121 insertions(+), 32 deletions(-) create mode 100644 patches/linux/6.6.52/0034-net-dsa-mb88e6xxx-use-EOPNOTSUPP-for-unsupported-fla.patch diff --git a/patches/linux/6.6.52/0001-net-phy-add-support-for-PHY-LEDs-polarity-modes.patch b/patches/linux/6.6.52/0001-net-phy-add-support-for-PHY-LEDs-polarity-modes.patch index 697192ae8..8248d6728 100644 --- a/patches/linux/6.6.52/0001-net-phy-add-support-for-PHY-LEDs-polarity-modes.patch +++ b/patches/linux/6.6.52/0001-net-phy-add-support-for-PHY-LEDs-polarity-modes.patch @@ -1,7 +1,7 @@ From 4be3e500b670f7b98e3dd6696b8e51e83f122c65 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Thu, 25 Jan 2024 21:36:59 +0100 -Subject: [PATCH 01/33] net: phy: add support for PHY LEDs polarity modes +Subject: [PATCH 01/34] net: phy: add support for PHY LEDs polarity modes Organization: Addiva Elektronik Add support for PHY LEDs polarity modes. Some PHY require LED to be set @@ -22,6 +22,7 @@ Signed-off-by: Christian Marangi Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20240125203702.4552-4-ansuelsmth@gmail.com Signed-off-by: Jakub Kicinski +Signed-off-by: Joachim Wiberg --- drivers/net/phy/phy_device.c | 16 ++++++++++++++++ include/linux/phy.h | 22 ++++++++++++++++++++++ diff --git a/patches/linux/6.6.52/0002-net-mvmdio-Support-setting-the-MDC-frequency-on-XSMI.patch b/patches/linux/6.6.52/0002-net-mvmdio-Support-setting-the-MDC-frequency-on-XSMI.patch index 764cc8b4d..1aaa7e5ec 100644 --- a/patches/linux/6.6.52/0002-net-mvmdio-Support-setting-the-MDC-frequency-on-XSMI.patch +++ b/patches/linux/6.6.52/0002-net-mvmdio-Support-setting-the-MDC-frequency-on-XSMI.patch @@ -1,7 +1,7 @@ From 4833b140cd11a57dd9f59754cdacfd71bc564c8f Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Mon, 4 Dec 2023 11:08:11 +0100 -Subject: [PATCH 02/33] net: mvmdio: Support setting the MDC frequency on XSMI +Subject: [PATCH 02/34] net: mvmdio: Support setting the MDC frequency on XSMI controllers Organization: Addiva Elektronik @@ -14,6 +14,7 @@ Reviewed-by: Andrew Lunn Tested-by: Andrew Lunn Link: https://lore.kernel.org/r/20231204100811.2708884-4-tobias@waldekranz.com Signed-off-by: Jakub Kicinski +Signed-off-by: Joachim Wiberg --- drivers/net/ethernet/marvell/mvmdio.c | 44 +++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/patches/linux/6.6.52/0003-net-dsa-mv88e6xxx-Create-API-to-read-a-single-stat-c.patch b/patches/linux/6.6.52/0003-net-dsa-mv88e6xxx-Create-API-to-read-a-single-stat-c.patch index 894569058..b7014edc7 100644 --- a/patches/linux/6.6.52/0003-net-dsa-mv88e6xxx-Create-API-to-read-a-single-stat-c.patch +++ b/patches/linux/6.6.52/0003-net-dsa-mv88e6xxx-Create-API-to-read-a-single-stat-c.patch @@ -1,7 +1,7 @@ From 50a2973e8a520a82e9f9ec15a1f69e059ce7a334 Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Thu, 14 Dec 2023 14:50:23 +0100 -Subject: [PATCH 03/33] net: dsa: mv88e6xxx: Create API to read a single stat +Subject: [PATCH 03/34] net: dsa: mv88e6xxx: Create API to read a single stat counter Organization: Addiva Elektronik @@ -16,6 +16,7 @@ Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Tobias Waldekranz Signed-off-by: David S. Miller +Signed-off-by: Joachim Wiberg --- drivers/net/dsa/mv88e6xxx/chip.c | 162 ++++++++++++++++++------------- drivers/net/dsa/mv88e6xxx/chip.h | 27 +++--- diff --git a/patches/linux/6.6.52/0004-net-dsa-mv88e6xxx-Give-each-hw-stat-an-ID.patch b/patches/linux/6.6.52/0004-net-dsa-mv88e6xxx-Give-each-hw-stat-an-ID.patch index e3bccb8fd..d46ae1b9d 100644 --- a/patches/linux/6.6.52/0004-net-dsa-mv88e6xxx-Give-each-hw-stat-an-ID.patch +++ b/patches/linux/6.6.52/0004-net-dsa-mv88e6xxx-Give-each-hw-stat-an-ID.patch @@ -1,7 +1,7 @@ From 5916503e23e7f85796c1f927747e66b9535bac53 Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Thu, 14 Dec 2023 14:50:25 +0100 -Subject: [PATCH 04/33] net: dsa: mv88e6xxx: Give each hw stat an ID +Subject: [PATCH 04/34] net: dsa: mv88e6xxx: Give each hw stat an ID Organization: Addiva Elektronik With the upcoming standard counter group support, we are no longer @@ -16,6 +16,7 @@ Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Tobias Waldekranz Signed-off-by: David S. Miller +Signed-off-by: Joachim Wiberg --- drivers/net/dsa/mv88e6xxx/chip.c | 138 +++++++++++++++++-------------- 1 file changed, 75 insertions(+), 63 deletions(-) diff --git a/patches/linux/6.6.52/0005-net-dsa-mv88e6xxx-Add-eth-mac-counter-group-support.patch b/patches/linux/6.6.52/0005-net-dsa-mv88e6xxx-Add-eth-mac-counter-group-support.patch index 9a028dad7..ad465649e 100644 --- a/patches/linux/6.6.52/0005-net-dsa-mv88e6xxx-Add-eth-mac-counter-group-support.patch +++ b/patches/linux/6.6.52/0005-net-dsa-mv88e6xxx-Add-eth-mac-counter-group-support.patch @@ -1,7 +1,7 @@ From 32dda6562734ec8ee667bc546f3ef56794d5bf82 Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Thu, 14 Dec 2023 14:50:26 +0100 -Subject: [PATCH 05/33] net: dsa: mv88e6xxx: Add "eth-mac" counter group +Subject: [PATCH 05/34] net: dsa: mv88e6xxx: Add "eth-mac" counter group support Organization: Addiva Elektronik @@ -12,6 +12,7 @@ Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Tobias Waldekranz Signed-off-by: David S. Miller +Signed-off-by: Joachim Wiberg --- drivers/net/dsa/mv88e6xxx/chip.c | 39 ++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/patches/linux/6.6.52/0006-net-dsa-mv88e6xxx-Limit-histogram-counters-to-ingres.patch b/patches/linux/6.6.52/0006-net-dsa-mv88e6xxx-Limit-histogram-counters-to-ingres.patch index 9bb8a30de..6f63c2f06 100644 --- a/patches/linux/6.6.52/0006-net-dsa-mv88e6xxx-Limit-histogram-counters-to-ingres.patch +++ b/patches/linux/6.6.52/0006-net-dsa-mv88e6xxx-Limit-histogram-counters-to-ingres.patch @@ -1,7 +1,7 @@ From 36adbdd466ec550cab8b2ae54177f674c02cf631 Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Thu, 14 Dec 2023 14:50:27 +0100 -Subject: [PATCH 06/33] net: dsa: mv88e6xxx: Limit histogram counters to +Subject: [PATCH 06/34] net: dsa: mv88e6xxx: Limit histogram counters to ingress traffic Organization: Addiva Elektronik @@ -27,6 +27,7 @@ Reviewed-by: Andrew Lunn Reviewed-by: Vladimir Oltean Signed-off-by: Tobias Waldekranz Signed-off-by: David S. Miller +Signed-off-by: Joachim Wiberg --- drivers/net/dsa/mv88e6xxx/chip.c | 6 +++--- drivers/net/dsa/mv88e6xxx/global1.c | 7 +++---- diff --git a/patches/linux/6.6.52/0007-net-dsa-mv88e6xxx-Add-rmon-counter-group-support.patch b/patches/linux/6.6.52/0007-net-dsa-mv88e6xxx-Add-rmon-counter-group-support.patch index 5eb3ef0f4..78e1de5bd 100644 --- a/patches/linux/6.6.52/0007-net-dsa-mv88e6xxx-Add-rmon-counter-group-support.patch +++ b/patches/linux/6.6.52/0007-net-dsa-mv88e6xxx-Add-rmon-counter-group-support.patch @@ -1,7 +1,7 @@ From abfa532c1149525b128b8c76d80965f55e208240 Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Thu, 14 Dec 2023 14:50:28 +0100 -Subject: [PATCH 07/33] net: dsa: mv88e6xxx: Add "rmon" counter group support +Subject: [PATCH 07/34] net: dsa: mv88e6xxx: Add "rmon" counter group support Organization: Addiva Elektronik Report the applicable subset of an mv88e6xxx port's counters using @@ -11,6 +11,7 @@ Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Tobias Waldekranz Signed-off-by: David S. Miller +Signed-off-by: Joachim Wiberg --- drivers/net/dsa/mv88e6xxx/chip.c | 42 ++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/patches/linux/6.6.52/0009-net-dsa-mv88e6xxx-Add-LED-infrastructure.patch b/patches/linux/6.6.52/0009-net-dsa-mv88e6xxx-Add-LED-infrastructure.patch index a9338fad3..ac341bb56 100644 --- a/patches/linux/6.6.52/0009-net-dsa-mv88e6xxx-Add-LED-infrastructure.patch +++ b/patches/linux/6.6.52/0009-net-dsa-mv88e6xxx-Add-LED-infrastructure.patch @@ -1,11 +1,13 @@ From 4407b94b4a08536fccb6eea2826955ff12d63ec2 Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Thu, 16 Nov 2023 19:44:32 +0100 -Subject: [PATCH 09/33] net: dsa: mv88e6xxx: Add LED infrastructure +Subject: [PATCH 09/34] net: dsa: mv88e6xxx: Add LED infrastructure Organization: Addiva Elektronik Parse DT for LEDs and register them for devices that support it, though no actual implementations exist yet. + +Signed-off-by: Joachim Wiberg --- drivers/net/dsa/mv88e6xxx/Makefile | 1 + drivers/net/dsa/mv88e6xxx/chip.c | 5 +- diff --git a/patches/linux/6.6.52/0010-net-dsa-mv88e6xxx-Add-LED-support-for-6393X.patch b/patches/linux/6.6.52/0010-net-dsa-mv88e6xxx-Add-LED-support-for-6393X.patch index faec2ef07..e67f59985 100644 --- a/patches/linux/6.6.52/0010-net-dsa-mv88e6xxx-Add-LED-support-for-6393X.patch +++ b/patches/linux/6.6.52/0010-net-dsa-mv88e6xxx-Add-LED-support-for-6393X.patch @@ -1,13 +1,15 @@ From a5cf5c0353db07e74d7a29dd4d5c2cb7775d5bec Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Thu, 16 Nov 2023 21:59:35 +0100 -Subject: [PATCH 10/33] net: dsa: mv88e6xxx: Add LED support for 6393X +Subject: [PATCH 10/34] net: dsa: mv88e6xxx: Add LED support for 6393X Organization: Addiva Elektronik Trigger support: - "none" - "timer" - "netdev" + +Signed-off-by: Joachim Wiberg --- drivers/net/dsa/mv88e6xxx/chip.c | 1 + drivers/net/dsa/mv88e6xxx/leds.c | 226 +++++++++++++++++++++++++++++++ diff --git a/patches/linux/6.6.52/0011-net-dsa-mv88e6xxx-Fix-timeout-on-waiting-for-PPU-on-.patch b/patches/linux/6.6.52/0011-net-dsa-mv88e6xxx-Fix-timeout-on-waiting-for-PPU-on-.patch index 22df095af..d5b875318 100644 --- a/patches/linux/6.6.52/0011-net-dsa-mv88e6xxx-Fix-timeout-on-waiting-for-PPU-on-.patch +++ b/patches/linux/6.6.52/0011-net-dsa-mv88e6xxx-Fix-timeout-on-waiting-for-PPU-on-.patch @@ -1,13 +1,15 @@ From be94ec851dbb8e55c3f5e82f197b2dc59566aea2 Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Tue, 12 Mar 2024 10:27:24 +0100 -Subject: [PATCH 11/33] net: dsa: mv88e6xxx: Fix timeout on waiting for PPU on +Subject: [PATCH 11/34] net: dsa: mv88e6xxx: Fix timeout on waiting for PPU on 6393X Organization: Addiva Elektronik In a multi-chip setup, delays of up to 750ms are observed before the device (6393X) signals completion of PPU initialization (Global 1, register 0, bit 15). Therefore, increase the timeout threshold to 1s. + +Signed-off-by: Joachim Wiberg --- drivers/net/dsa/mv88e6xxx/chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patches/linux/6.6.52/0012-net-dsa-Support-MDB-memberships-whose-L2-addresses-o.patch b/patches/linux/6.6.52/0012-net-dsa-Support-MDB-memberships-whose-L2-addresses-o.patch index 096d61d2b..6ddcc6142 100644 --- a/patches/linux/6.6.52/0012-net-dsa-Support-MDB-memberships-whose-L2-addresses-o.patch +++ b/patches/linux/6.6.52/0012-net-dsa-Support-MDB-memberships-whose-L2-addresses-o.patch @@ -1,7 +1,7 @@ From 69092f83541e6539ab82eec3052325c403675de4 Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Tue, 16 Jan 2024 16:00:55 +0100 -Subject: [PATCH 12/33] net: dsa: Support MDB memberships whose L2 addresses +Subject: [PATCH 12/34] net: dsa: Support MDB memberships whose L2 addresses overlap Organization: Addiva Elektronik @@ -29,6 +29,8 @@ as long as the count is positive. Fortunately, all the infrastructure needed to do this is already in place, since it is also needed on CPU and DSA ports. Thus, "implement" this by simply removing the guards which previously skipped reference countung on user ports. + +Signed-off-by: Joachim Wiberg --- net/dsa/switch.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/patches/linux/6.6.52/0013-net-phy-marvell10g-Support-firmware-loading-on-88X33.patch b/patches/linux/6.6.52/0013-net-phy-marvell10g-Support-firmware-loading-on-88X33.patch index 58956f52c..6629947e9 100644 --- a/patches/linux/6.6.52/0013-net-phy-marvell10g-Support-firmware-loading-on-88X33.patch +++ b/patches/linux/6.6.52/0013-net-phy-marvell10g-Support-firmware-loading-on-88X33.patch @@ -1,7 +1,7 @@ From 7c19df77212d0728874515e97cf297863a6ff2cd Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Tue, 19 Sep 2023 18:38:10 +0200 -Subject: [PATCH 13/33] net: phy: marvell10g: Support firmware loading on +Subject: [PATCH 13/34] net: phy: marvell10g: Support firmware loading on 88X3310 Organization: Addiva Elektronik @@ -11,6 +11,8 @@ its RAM, ask userspace for the binary and load it over XMDIO. We have no choice but to bail out of the probe if firmware is not available, as the device does not have any built-in image on which to fall back. + +Signed-off-by: Joachim Wiberg --- drivers/net/phy/marvell10g.c | 161 +++++++++++++++++++++++++++++++++++ 1 file changed, 161 insertions(+) diff --git a/patches/linux/6.6.52/0014-net-phy-marvell10g-Fix-power-up-when-strapped-to-sta.patch b/patches/linux/6.6.52/0014-net-phy-marvell10g-Fix-power-up-when-strapped-to-sta.patch index 1e4722d25..a1f35edae 100644 --- a/patches/linux/6.6.52/0014-net-phy-marvell10g-Fix-power-up-when-strapped-to-sta.patch +++ b/patches/linux/6.6.52/0014-net-phy-marvell10g-Fix-power-up-when-strapped-to-sta.patch @@ -1,13 +1,15 @@ From 0c34b42b7a72ddf1af6f3534870d647801e493fa Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Tue, 21 Nov 2023 20:15:24 +0100 -Subject: [PATCH 14/33] net: phy: marvell10g: Fix power-up when strapped to +Subject: [PATCH 14/34] net: phy: marvell10g: Fix power-up when strapped to start powered down Organization: Addiva Elektronik On devices which are hardware strapped to start powered down (PDSTATE == 1), make sure that we clear the power-down bit on all units affected by this setting. + +Signed-off-by: Joachim Wiberg --- drivers/net/phy/marvell10g.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/patches/linux/6.6.52/0015-net-phy-marvell10g-Add-LED-support-for-88X3310.patch b/patches/linux/6.6.52/0015-net-phy-marvell10g-Add-LED-support-for-88X3310.patch index e83ccca01..6cd5ecc20 100644 --- a/patches/linux/6.6.52/0015-net-phy-marvell10g-Add-LED-support-for-88X3310.patch +++ b/patches/linux/6.6.52/0015-net-phy-marvell10g-Add-LED-support-for-88X3310.patch @@ -1,7 +1,7 @@ From 6576918d3348f8e20802379d568d7632228af4d7 Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Wed, 15 Nov 2023 20:58:42 +0100 -Subject: [PATCH 15/33] net: phy: marvell10g: Add LED support for 88X3310 +Subject: [PATCH 15/34] net: phy: marvell10g: Add LED support for 88X3310 Organization: Addiva Elektronik Pickup the LEDs from the state in which the hardware reset or @@ -17,6 +17,8 @@ Trigger support: software blinking - "netdev": Offload link or duplex information to the solid behavior; tx and/or rx activity to blink behavior. + +Signed-off-by: Joachim Wiberg --- drivers/net/phy/marvell10g.c | 422 +++++++++++++++++++++++++++++++++++ 1 file changed, 422 insertions(+) diff --git a/patches/linux/6.6.52/0016-net-phy-marvell10g-Support-LEDs-tied-to-a-single-med.patch b/patches/linux/6.6.52/0016-net-phy-marvell10g-Support-LEDs-tied-to-a-single-med.patch index aa40cec9f..6e50063b1 100644 --- a/patches/linux/6.6.52/0016-net-phy-marvell10g-Support-LEDs-tied-to-a-single-med.patch +++ b/patches/linux/6.6.52/0016-net-phy-marvell10g-Support-LEDs-tied-to-a-single-med.patch @@ -1,7 +1,7 @@ From 1ad7f010e46133c725df5cab4d85f71f689ca191 Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Tue, 12 Dec 2023 09:51:05 +0100 -Subject: [PATCH 16/33] net: phy: marvell10g: Support LEDs tied to a single +Subject: [PATCH 16/34] net: phy: marvell10g: Support LEDs tied to a single media side Organization: Addiva Elektronik @@ -14,6 +14,8 @@ tied to a particular media side, and use that information to refine the offloading of the "netdev" trigger, such that LEDs attached to the RJ45 jack only lights up when a copper link is established, and vice versa for the SFP cage. + +Signed-off-by: Joachim Wiberg --- drivers/net/phy/marvell10g.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/patches/linux/6.6.52/0017-nvmem-layouts-onie-tlv-Let-device-probe-even-when-TL.patch b/patches/linux/6.6.52/0017-nvmem-layouts-onie-tlv-Let-device-probe-even-when-TL.patch index 0ba2caabe..1471c411d 100644 --- a/patches/linux/6.6.52/0017-nvmem-layouts-onie-tlv-Let-device-probe-even-when-TL.patch +++ b/patches/linux/6.6.52/0017-nvmem-layouts-onie-tlv-Let-device-probe-even-when-TL.patch @@ -1,7 +1,7 @@ From 11b9a3e328241edede03b6615bb9b0f1a40b9b7d Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Fri, 24 Nov 2023 23:29:55 +0100 -Subject: [PATCH 17/33] nvmem: layouts: onie-tlv: Let device probe even when +Subject: [PATCH 17/34] nvmem: layouts: onie-tlv: Let device probe even when TLV is invalid Organization: Addiva Elektronik @@ -13,6 +13,8 @@ be successfully probed. Therefore, settle for reporting data corruption issues in the log, and simply refrain from registering any cells in those cases. + +Signed-off-by: Joachim Wiberg --- drivers/nvmem/layouts/onie-tlv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/patches/linux/6.6.52/0018-net-bridge-avoid-classifying-unknown-multicast-as-mr.patch b/patches/linux/6.6.52/0018-net-bridge-avoid-classifying-unknown-multicast-as-mr.patch index 82bd25559..22fb5aaf4 100644 --- a/patches/linux/6.6.52/0018-net-bridge-avoid-classifying-unknown-multicast-as-mr.patch +++ b/patches/linux/6.6.52/0018-net-bridge-avoid-classifying-unknown-multicast-as-mr.patch @@ -1,7 +1,7 @@ From ce1148b5c2e33541ad13ff2c4769d0b37d4e42b9 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Mon, 4 Mar 2024 16:47:28 +0100 -Subject: [PATCH 18/33] net: bridge: avoid classifying unknown multicast as +Subject: [PATCH 18/34] net: bridge: avoid classifying unknown multicast as mrouters_only Organization: Addiva Elektronik diff --git a/patches/linux/6.6.52/0019-net-bridge-Ignore-router-ports-when-forwarding-L2-mu.patch b/patches/linux/6.6.52/0019-net-bridge-Ignore-router-ports-when-forwarding-L2-mu.patch index 5b5baf0a4..a2fab31e8 100644 --- a/patches/linux/6.6.52/0019-net-bridge-Ignore-router-ports-when-forwarding-L2-mu.patch +++ b/patches/linux/6.6.52/0019-net-bridge-Ignore-router-ports-when-forwarding-L2-mu.patch @@ -1,7 +1,7 @@ From ce74ee8c5461cc53851ca323b4dfc9937cab0e41 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Tue, 5 Mar 2024 06:44:41 +0100 -Subject: [PATCH 19/33] net: bridge: Ignore router ports when forwarding L2 +Subject: [PATCH 19/34] net: bridge: Ignore router ports when forwarding L2 multicast Organization: Addiva Elektronik diff --git a/patches/linux/6.6.52/0020-net-dsa-Support-EtherType-based-priority-overrides.patch b/patches/linux/6.6.52/0020-net-dsa-Support-EtherType-based-priority-overrides.patch index ec3cd12be..ea8f8c14d 100644 --- a/patches/linux/6.6.52/0020-net-dsa-Support-EtherType-based-priority-overrides.patch +++ b/patches/linux/6.6.52/0020-net-dsa-Support-EtherType-based-priority-overrides.patch @@ -1,9 +1,10 @@ From 3c9b05198e0b7193f2dcddc1860cd77f0adbc3a2 Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Thu, 21 Mar 2024 19:12:15 +0100 -Subject: [PATCH 20/33] net: dsa: Support EtherType based priority overrides +Subject: [PATCH 20/34] net: dsa: Support EtherType based priority overrides Organization: Addiva Elektronik +Signed-off-by: Joachim Wiberg --- include/net/dsa.h | 4 ++++ net/dsa/slave.c | 56 +++++++++++++++++++++++++++++++++++++++++++++-- diff --git a/patches/linux/6.6.52/0021-net-dsa-mv88e6xxx-Support-EtherType-based-priority-o.patch b/patches/linux/6.6.52/0021-net-dsa-mv88e6xxx-Support-EtherType-based-priority-o.patch index 5623ccd4b..f8428e41a 100644 --- a/patches/linux/6.6.52/0021-net-dsa-mv88e6xxx-Support-EtherType-based-priority-o.patch +++ b/patches/linux/6.6.52/0021-net-dsa-mv88e6xxx-Support-EtherType-based-priority-o.patch @@ -1,10 +1,11 @@ From 333134a4ff2b8dd7fb00a75560254de96d1082ad Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Fri, 22 Mar 2024 16:15:43 +0100 -Subject: [PATCH 21/33] net: dsa: mv88e6xxx: Support EtherType based priority +Subject: [PATCH 21/34] net: dsa: mv88e6xxx: Support EtherType based priority overrides Organization: Addiva Elektronik +Signed-off-by: Joachim Wiberg --- drivers/net/dsa/mv88e6xxx/chip.c | 64 +++++++++++++++++++++++++++++ drivers/net/dsa/mv88e6xxx/chip.h | 21 ++++++++++ diff --git a/patches/linux/6.6.52/0022-net-phy-Do-not-resume-PHY-when-attaching.patch b/patches/linux/6.6.52/0022-net-phy-Do-not-resume-PHY-when-attaching.patch index ea5a2b758..a8cace3d2 100644 --- a/patches/linux/6.6.52/0022-net-phy-Do-not-resume-PHY-when-attaching.patch +++ b/patches/linux/6.6.52/0022-net-phy-Do-not-resume-PHY-when-attaching.patch @@ -1,7 +1,7 @@ From cdddc24c05cedc0d0fabc48da17ec26aeb7c1ef9 Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Wed, 27 Mar 2024 10:10:19 +0100 -Subject: [PATCH 22/33] net: phy: Do not resume PHY when attaching +Subject: [PATCH 22/34] net: phy: Do not resume PHY when attaching Organization: Addiva Elektronik The PHY should not start negotiating with its link-partner until @@ -15,6 +15,8 @@ Otherwise, drivers that attached to their PHYs during probing (e.g. DSA) would end up with a physical link being established, even though the corresponding interface was still administratively down. + +Signed-off-by: Joachim Wiberg --- drivers/net/phy/phy_device.c | 1 - 1 file changed, 1 deletion(-) diff --git a/patches/linux/6.6.52/0023-net-dsa-mv88e6xxx-Improve-indirect-register-access-p.patch b/patches/linux/6.6.52/0023-net-dsa-mv88e6xxx-Improve-indirect-register-access-p.patch index b03d84a14..a264a5a59 100644 --- a/patches/linux/6.6.52/0023-net-dsa-mv88e6xxx-Improve-indirect-register-access-p.patch +++ b/patches/linux/6.6.52/0023-net-dsa-mv88e6xxx-Improve-indirect-register-access-p.patch @@ -1,7 +1,7 @@ From 1ec21a3fc54fb447501fd7edbf692b00a31fe3ec Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Wed, 27 Mar 2024 15:52:43 +0100 -Subject: [PATCH 23/33] net: dsa: mv88e6xxx: Improve indirect register access +Subject: [PATCH 23/34] net: dsa: mv88e6xxx: Improve indirect register access perf on 6393 Organization: Addiva Elektronik @@ -13,6 +13,8 @@ previous families). Therefore, add a new set of SMI operations which remaps accesses to such registers to the corresponding directly addressable register. All other accesses use the regular indirect interface. + +Signed-off-by: Joachim Wiberg --- drivers/net/dsa/mv88e6xxx/chip.c | 7 +++ drivers/net/dsa/mv88e6xxx/global1.h | 3 ++ diff --git a/patches/linux/6.6.52/0024-net-bridge-drop-delay-for-applying-strict-multicast-.patch b/patches/linux/6.6.52/0024-net-bridge-drop-delay-for-applying-strict-multicast-.patch index c461c2a92..bb32c1490 100644 --- a/patches/linux/6.6.52/0024-net-bridge-drop-delay-for-applying-strict-multicast-.patch +++ b/patches/linux/6.6.52/0024-net-bridge-drop-delay-for-applying-strict-multicast-.patch @@ -1,7 +1,7 @@ From 5d7be493dcaa75ee69d521043062389d7772f8dc Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Thu, 4 Apr 2024 16:36:30 +0200 -Subject: [PATCH 24/33] net: bridge: drop delay for applying strict multicast +Subject: [PATCH 24/34] net: bridge: drop delay for applying strict multicast filtering Organization: Addiva Elektronik diff --git a/patches/linux/6.6.52/0025-net-dsa-mv88e6xxx-Honor-ports-being-managed-via-in-b.patch b/patches/linux/6.6.52/0025-net-dsa-mv88e6xxx-Honor-ports-being-managed-via-in-b.patch index 2f840f6cf..270f9a5b6 100644 --- a/patches/linux/6.6.52/0025-net-dsa-mv88e6xxx-Honor-ports-being-managed-via-in-b.patch +++ b/patches/linux/6.6.52/0025-net-dsa-mv88e6xxx-Honor-ports-being-managed-via-in-b.patch @@ -1,7 +1,7 @@ From 492a824661dbc188b5abeb7434b5cf67c2016415 Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Mon, 22 Apr 2024 23:18:01 +0200 -Subject: [PATCH 25/33] net: dsa: mv88e6xxx: Honor ports being managed via +Subject: [PATCH 25/34] net: dsa: mv88e6xxx: Honor ports being managed via in-band-status Organization: Addiva Elektronik @@ -13,6 +13,8 @@ USXGMII autoneg) This state is the default set up by mv88e6xxx_port_setup_mac(), so all we have to do is to make the phylink MAC callbacks no-ops in cases when in-band-status is being used. + +Signed-off-by: Joachim Wiberg --- drivers/net/dsa/mv88e6xxx/chip.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/patches/linux/6.6.52/0026-net-dsa-mv88e6xxx-Fix-port-policy-config-on-6393X.patch b/patches/linux/6.6.52/0026-net-dsa-mv88e6xxx-Fix-port-policy-config-on-6393X.patch index 012ea284e..ae828188f 100644 --- a/patches/linux/6.6.52/0026-net-dsa-mv88e6xxx-Fix-port-policy-config-on-6393X.patch +++ b/patches/linux/6.6.52/0026-net-dsa-mv88e6xxx-Fix-port-policy-config-on-6393X.patch @@ -1,7 +1,7 @@ From c9c9597a47b00b720f5223c83ab05bb89481eda8 Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Wed, 24 Apr 2024 21:35:26 +0200 -Subject: [PATCH 26/33] net: dsa: mv88e6xxx: Fix port policy config on 6393X +Subject: [PATCH 26/34] net: dsa: mv88e6xxx: Fix port policy config on 6393X Organization: Addiva Elektronik mv88e6393x_port_policy_{read,write} expect the `pointer` argument to @@ -16,6 +16,7 @@ never enabled on DSA ports, which broke standalone port isolation in multichip switch trees made up of 6393X decices. Fixes: 6584b26020fc ("net: dsa: mv88e6xxx: implement .port_set_policy for Amethyst") +Signed-off-by: Joachim Wiberg --- drivers/net/dsa/mv88e6xxx/port.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/linux/6.6.52/0027-net-dsa-mv88e6xxx-Limit-rsvd2cpu-policy-to-user-port.patch b/patches/linux/6.6.52/0027-net-dsa-mv88e6xxx-Limit-rsvd2cpu-policy-to-user-port.patch index 834a3c2c5..bf86c5474 100644 --- a/patches/linux/6.6.52/0027-net-dsa-mv88e6xxx-Limit-rsvd2cpu-policy-to-user-port.patch +++ b/patches/linux/6.6.52/0027-net-dsa-mv88e6xxx-Limit-rsvd2cpu-policy-to-user-port.patch @@ -1,7 +1,7 @@ From 4ff224b5f5de1347a1f686aa85cb918a7db18879 Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Wed, 24 Apr 2024 22:41:04 +0200 -Subject: [PATCH 27/33] net: dsa: mv88e6xxx: Limit rsvd2cpu policy to user +Subject: [PATCH 27/34] net: dsa: mv88e6xxx: Limit rsvd2cpu policy to user ports on 6393X Organization: Addiva Elektronik @@ -29,6 +29,8 @@ Before this change, due to rsvd2cpu being enabled on the CPU port, the switch would try to trap it back to the CPU. Given that the CPU is trusted, instead assume that it indeed meant for the packet to be forwarded like any other. + +Signed-off-by: Joachim Wiberg --- drivers/net/dsa/mv88e6xxx/port.c | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/patches/linux/6.6.52/0028-usb-core-adjust-log-level-for-unauthorized-devices.patch b/patches/linux/6.6.52/0028-usb-core-adjust-log-level-for-unauthorized-devices.patch index 49edf4150..7c0f4db77 100644 --- a/patches/linux/6.6.52/0028-usb-core-adjust-log-level-for-unauthorized-devices.patch +++ b/patches/linux/6.6.52/0028-usb-core-adjust-log-level-for-unauthorized-devices.patch @@ -1,7 +1,7 @@ From f0d4beabe769fec594b309c3f1ebb79cfdbede8b Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Mon, 29 Apr 2024 15:14:51 +0200 -Subject: [PATCH 28/33] usb: core: adjust log level for unauthorized devices +Subject: [PATCH 28/34] usb: core: adjust log level for unauthorized devices Organization: Addiva Elektronik The fact that a USB device currently is not authorized is not an error, diff --git a/patches/linux/6.6.52/0029-net-dsa-mv88e6xxx-Grab-register-lock-during-counter-.patch b/patches/linux/6.6.52/0029-net-dsa-mv88e6xxx-Grab-register-lock-during-counter-.patch index 32d603062..7a140a387 100644 --- a/patches/linux/6.6.52/0029-net-dsa-mv88e6xxx-Grab-register-lock-during-counter-.patch +++ b/patches/linux/6.6.52/0029-net-dsa-mv88e6xxx-Grab-register-lock-during-counter-.patch @@ -1,7 +1,7 @@ From 5f96d718c850084504c53ec0b8d9fcf75ea9996c Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Wed, 15 May 2024 13:50:58 +0200 -Subject: [PATCH 29/33] net: dsa: mv88e6xxx: Grab register lock during counter +Subject: [PATCH 29/34] net: dsa: mv88e6xxx: Grab register lock during counter snapshotting Organization: Addiva Elektronik @@ -9,6 +9,8 @@ This was missing for the standard counter groups. Since no caller already holds the lock, opt for pushing the locking down into mv88e6xxx_stats_snapshot() rather than having it duplicated at each call site. + +Signed-off-by: Joachim Wiberg --- drivers/net/dsa/mv88e6xxx/chip.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/patches/linux/6.6.52/0030-net-bridge-Differentiate-MDB-additions-from-modifica.patch b/patches/linux/6.6.52/0030-net-bridge-Differentiate-MDB-additions-from-modifica.patch index 344b69e2f..7bdf519ce 100644 --- a/patches/linux/6.6.52/0030-net-bridge-Differentiate-MDB-additions-from-modifica.patch +++ b/patches/linux/6.6.52/0030-net-bridge-Differentiate-MDB-additions-from-modifica.patch @@ -1,7 +1,7 @@ From 6d4c436335003259cc02a0f015fd3d1d54e988a2 Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Thu, 16 May 2024 14:51:54 +0200 -Subject: [PATCH 30/33] net: bridge: Differentiate MDB additions from +Subject: [PATCH 30/34] net: bridge: Differentiate MDB additions from modifications Organization: Addiva Elektronik @@ -21,6 +21,8 @@ generated. Therefore, discriminate new groups from changes to existing groups by introducing a RTM_SETMDB events to be used in the latter scenario. + +Signed-off-by: Joachim Wiberg --- include/uapi/linux/rtnetlink.h | 2 ++ net/bridge/br_mdb.c | 4 ++-- diff --git a/patches/linux/6.6.52/0031-net-dsa-tag_dsa-Use-tag-priority-as-initial-skb-prio.patch b/patches/linux/6.6.52/0031-net-dsa-tag_dsa-Use-tag-priority-as-initial-skb-prio.patch index d984d3852..285ec81df 100644 --- a/patches/linux/6.6.52/0031-net-dsa-tag_dsa-Use-tag-priority-as-initial-skb-prio.patch +++ b/patches/linux/6.6.52/0031-net-dsa-tag_dsa-Use-tag-priority-as-initial-skb-prio.patch @@ -1,7 +1,7 @@ From c333c612688d5e974b95fcf4b04f185d7cf4f80d Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Tue, 28 May 2024 10:38:42 +0200 -Subject: [PATCH 31/33] net: dsa: tag_dsa: Use tag priority as initial +Subject: [PATCH 31/34] net: dsa: tag_dsa: Use tag priority as initial skb->priority Organization: Addiva Elektronik @@ -19,6 +19,8 @@ Ideally we could then map this priority to an internal one, like we can do with an "ingress-qos-map" on VLAN interfaces. Until that is implemented, support the setup that is likely to be the most common; a 1:1 mapping from FPri to skb->priority. + +Signed-off-by: Joachim Wiberg --- net/dsa/tag_dsa.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/patches/linux/6.6.52/0032-net-dsa-mv88e6xxx-Add-mqprio-qdisc-support.patch b/patches/linux/6.6.52/0032-net-dsa-mv88e6xxx-Add-mqprio-qdisc-support.patch index 188a73b0a..db8c167e8 100644 --- a/patches/linux/6.6.52/0032-net-dsa-mv88e6xxx-Add-mqprio-qdisc-support.patch +++ b/patches/linux/6.6.52/0032-net-dsa-mv88e6xxx-Add-mqprio-qdisc-support.patch @@ -1,7 +1,7 @@ From 18c025745fd8b8c9b3e688e9d78668a56cf71217 Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Tue, 28 May 2024 11:04:22 +0200 -Subject: [PATCH 32/33] net: dsa: mv88e6xxx: Add mqprio qdisc support +Subject: [PATCH 32/34] net: dsa: mv88e6xxx: Add mqprio qdisc support Organization: Addiva Elektronik Add support for attaching mqprio qdisc's to mv88e6xxx ports and use @@ -24,6 +24,8 @@ are effectively only specifying the QPri. Since FPri is always a 3-bit field, even on older chips with only 4 physical queues, always report 8 queues and let the chip's policy handle the mapping down to the "real" number. + +Signed-off-by: Joachim Wiberg --- drivers/net/dsa/mv88e6xxx/chip.c | 70 ++++++++++++++++++++++++++++++++ net/dsa/tag_dsa.c | 4 +- diff --git a/patches/linux/6.6.52/0033-net-dsa-mv88e6xxx-Use-VLAN-prio-over-IP-when-both-ar.patch b/patches/linux/6.6.52/0033-net-dsa-mv88e6xxx-Use-VLAN-prio-over-IP-when-both-ar.patch index 527b5a895..910a90ff0 100644 --- a/patches/linux/6.6.52/0033-net-dsa-mv88e6xxx-Use-VLAN-prio-over-IP-when-both-ar.patch +++ b/patches/linux/6.6.52/0033-net-dsa-mv88e6xxx-Use-VLAN-prio-over-IP-when-both-ar.patch @@ -1,7 +1,7 @@ From f2d4ff12c7a0e644cbeac6675b755fb4a87b362a Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Wed, 29 May 2024 13:20:41 +0200 -Subject: [PATCH 33/33] net: dsa: mv88e6xxx: Use VLAN prio over IP when both +Subject: [PATCH 33/34] net: dsa: mv88e6xxx: Use VLAN prio over IP when both are available Organization: Addiva Elektronik @@ -22,6 +22,8 @@ main reasons for choosing the new default: packet's priority. As the packet then moves through the network core over trusted VLAN trunks, the packet should keep its original priority, independent of what inner protocol fields may indicate. + +Signed-off-by: Joachim Wiberg --- drivers/net/dsa/mv88e6xxx/chip.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/patches/linux/6.6.52/0034-net-dsa-mb88e6xxx-use-EOPNOTSUPP-for-unsupported-fla.patch b/patches/linux/6.6.52/0034-net-dsa-mb88e6xxx-use-EOPNOTSUPP-for-unsupported-fla.patch new file mode 100644 index 000000000..140220dab --- /dev/null +++ b/patches/linux/6.6.52/0034-net-dsa-mb88e6xxx-use-EOPNOTSUPP-for-unsupported-fla.patch @@ -0,0 +1,43 @@ +From ceaaa4f44f9b3ec82c4e0a24c2322aae58fa3aa0 Mon Sep 17 00:00:00 2001 +From: Joachim Wiberg +Date: Wed, 6 Nov 2024 15:39:33 +0100 +Subject: [PATCH 34/34] net: dsa: mb88e6xxx: use EOPNOTSUPP for unsupported + flags +Organization: Addiva Elektronik + +Make sure to return correct error code for unsupported flags, and +propagate any error. + +Follow-up to a5cf5c0 + +Signed-off-by: Joachim Wiberg +--- + drivers/net/dsa/mv88e6xxx/leds.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/drivers/net/dsa/mv88e6xxx/leds.c b/drivers/net/dsa/mv88e6xxx/leds.c +index b2a55d96b506..fe1ed3ed2a8a 100644 +--- a/drivers/net/dsa/mv88e6xxx/leds.c ++++ b/drivers/net/dsa/mv88e6xxx/leds.c +@@ -99,7 +99,7 @@ static int mv88e6393x_led_flags_to_mode(struct mv88e6xxx_led *led, unsigned long + return i; + } + +- return -EINVAL; ++ return -EOPNOTSUPP; + } + + static int mv88e6393x_led_mode_to_flags(struct mv88e6xxx_led *led, u8 mode, +@@ -216,6 +216,9 @@ static int mv88e6393x_led_hw_control_set(struct mv88e6xxx_led *led, + { + int mode = mv88e6393x_led_flags_to_mode(led, flags); + ++ if (mode < 0) ++ return mode; ++ + return mv88e6393x_led_set(led, mode); + } + +-- +2.43.0 + From 7052c54165804e7098225a613bc212fa3e5a266d Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Wed, 6 Nov 2024 10:27:09 +0100 Subject: [PATCH 03/14] board/common: probe: minor, pep8 fixes Signed-off-by: Joachim Wiberg --- .../rootfs/usr/libexec/infix/init.d/00-probe | 103 +++++++++++------- 1 file changed, 63 insertions(+), 40 deletions(-) diff --git a/board/common/rootfs/usr/libexec/infix/init.d/00-probe b/board/common/rootfs/usr/libexec/infix/init.d/00-probe index 68cf3acc4..bb3eebb5d 100755 --- a/board/common/rootfs/usr/libexec/infix/init.d/00-probe +++ b/board/common/rootfs/usr/libexec/infix/init.d/00-probe @@ -8,10 +8,11 @@ import struct import subprocess import sys -onieprom = importlib.machinery.SourceFileLoader("onieprom","/bin/onieprom").load_module() -SYSTEM_JSON = "/run/system.json" +onieprom = importlib.machinery.SourceFileLoader("onieprom", "/bin/onieprom").load_module() +SYSTEM_JSON = "/run/system.json" KKIT_IANA_PEM = 61046 + class DTSystem: BASE = "/sys/firmware/devicetree/base" INFIX = BASE + "/chosen/infix" @@ -28,7 +29,9 @@ class DTSystem: if not os.path.exists(phandle): continue - ph, = struct.unpack(">L", open(phandle, "rb").read()) + with open(phandle, "rb") as f: + data = f.read() + ph, = struct.unpack(">L", data) dt[ph] = root sys = {} @@ -40,14 +43,18 @@ class DTSystem: if not os.path.exists(phandle): continue - ph, = struct.unpack(">L", open(phandle, "rb").read()) + with open(phandle, "rb") as f: + data = f.read() + ph, = struct.unpack(">L", data) if ph not in sys: sys[ph] = [] sys[ph].append(root) phs = set(list(dt.keys()) + list(sys.keys())) - self.devs = { ph: [Device(ph, dt.get(ph), s if s is not None else "") for s in (sys.get(ph) or []) if ph is not None] for ph in phs } + self.devs = {ph: [Device(ph, dt.get(ph), s if s is not None else "") + for s in (sys.get(ph) or []) if ph is not None] + for ph in phs} self.base = Device(0, None, DTSystem.BASE) self.infix = Device(0, None, DTSystem.INFIX) @@ -56,7 +63,8 @@ class DTSystem: if not os.path.exists(path): return () - data = open(path, "rb").read() + with open(path, "rb") as f: + data = f.read() elems = len(data) // struct.calcsize(">L") return struct.unpack(">" + elems * "L", data) @@ -69,7 +77,8 @@ class DTSystem: return {} try: - data = onieprom.from_tlv(open(dev.attrpath("nvmem"), "rb", 0)) + with open(dev.attrpath("nvmem"), "rb", 0) as f: + data = onieprom.from_tlv(f) except: data = {} @@ -84,14 +93,18 @@ class DTSystem: } def infix_usb_devices(self, out): - names=self.infix.str_array("usb-port-names", ()) - phs=self.__get_phandle_array("usb-ports") - data=dict(zip(names,phs)) + names = self.infix.str_array("usb-port-names", ()) + phs = self.__get_phandle_array("usb-ports") + data = dict(zip(names, phs)) if data != {}: out["usb-ports"] = [] - for name,ph in data.items(): - [out["usb-ports"].extend([{"name": name, "path": dev.attrpath("authorized")}, {"name": name, "path": dev.attrpath("authorized_default")}]) for dev in self.devices_from_ph(ph)] - + for name, ph in data.items(): + [out["usb-ports"].extend([{ + "name": name, + "path": dev.attrpath("authorized")}, { + "name": name, + "path": dev.attrpath("authorized_default") + }]) for dev in self.devices_from_ph(ph)] def infix_devices(self, kind): phs = self.__get_phandle_array(kind) @@ -101,6 +114,7 @@ class DTSystem: flat_devices = [device for sublist in self.infix_devices("vpds") for device in sublist] return [self.into_vpd(device) for device in flat_devices] + class QEMUSystem: BASE = "/sys/firmware/qemu_fw_cfg" REV = BASE + "/rev" @@ -110,7 +124,8 @@ class QEMUSystem: data = {} if os.path.exists(QEMUSystem.VPD): try: - data = onieprom.from_tlv(open(QEMUSystem.VPD, "rb", 0)) + with open(QEMUSystem.VPD, "rb", 0) as f: + data = onieprom.from_tlv(f) except: pass @@ -127,31 +142,27 @@ class QEMUSystem: def usb_ports(self): ports = [ { - "name": "USB", - "path": "/sys/bus/usb/devices/usb1/authorized" - - }, - { - "name": "USB", - "path": "/sys/bus/usb/devices/usb1/authorized_default" - - }, - { - "name": "USB2", - "path": "/sys/bus/usb/devices/usb2/authorized" - }, - { - "name": "USB2", - "path": "/sys/bus/usb/devices/usb2/authorized_default" - - }] + "name": "USB", + "path": "/sys/bus/usb/devices/usb1/authorized" + }, { + "name": "USB", + "path": "/sys/bus/usb/devices/usb1/authorized_default" + }, { + "name": "USB2", + "path": "/sys/bus/usb/devices/usb2/authorized" + }, { + "name": "USB2", + "path": "/sys/bus/usb/devices/usb2/authorized_default" + }] return ports + + class Device: def __init__(self, ph, dtpath, syspath): self.ph, self.dtpath, self.syspath = ph, dtpath, syspath def available(self): - return self.syspath != None + return self.syspath is not None def __getitem__(self, attr): return self.attr(attr).decode("utf-8").strip("\0") @@ -159,7 +170,6 @@ class Device: def __setitem__(self, attr, value): return self.attr(attr, val=value.encode("utf-8")) - def attrpath(self, attr): return os.path.join(self.syspath, attr) @@ -168,13 +178,16 @@ class Device: def attr(self, attr, default=None, val=None): if not self.hasattr(attr): - return default if val == None else False + return default if val is None else False if val: - open(self.attrpath(attr), "wb").write(value) + with open(self.attrpath(attr), "wb") as f: + f.write(val) return True - return open(self.attrpath(attr), "rb").read() + with open(self.attrpath(attr), "rb") as f: + data = f.read() + return data def str(self, attr, default=None): val = self.attr(attr) @@ -194,7 +207,9 @@ class Device: if not self.hasdtattr(attr): return default - return open(self.dtattrpath(attr), "rb").read() + with open(self.dtattrpath(attr), "rb") as f: + data = f.read() + return data def dtstr(self, attr, default=None): val = self.dtattr(attr) @@ -212,6 +227,7 @@ def vpd_get_json_ve(vpd, pem): return out + def vpd_get_pwhash(vpd): if not vpd.get("trusted"): return None @@ -219,8 +235,9 @@ def vpd_get_pwhash(vpd): kkit = vpd_get_json_ve(vpd, KKIT_IANA_PEM) return kkit.get("pwhash") + def vpd_inject(out, vpds): - out["vpd"] = { vpd["board"]: vpd for vpd in vpds } + out["vpd"] = {vpd["board"]: vpd for vpd in vpds} product = out["vpd"].get("product", {}).get("data", {}) hoistattrs = ("vendor", "product-name", "part-number", "serial-number", "mac-address") @@ -234,6 +251,7 @@ def vpd_inject(out, vpds): out["factory-password-hash"] = pwhash break + def qemu_base_mac(): """Find MAC address of first non-loopback interface, subtract with 1""" base_path = '/sys/class/net' @@ -244,7 +262,8 @@ def qemu_base_mac(): continue try: # pylint: disable=invalid-name - with open(os.path.join(base_path, iface, 'address'), 'r', encoding='ascii') as f: + fn = os.path.join(base_path, iface, 'address') + with open(fn, 'r', encoding='ascii') as f: mac = f.read().strip() interfaces.append((mac, iface)) except FileNotFoundError: @@ -261,6 +280,7 @@ def qemu_base_mac(): return None + def probe_qemusystem(out): """Probe Qemu based test systems and 'make run'""" admin_hash = "$5$mI/zpOAqZYKLC2WU$i7iPzZiIjOjrBF3NyftS9CCq8dfYwHwrmUK097Jca9A" @@ -288,6 +308,7 @@ def probe_qemusystem(out): subprocess.run("initctl -nbq cond set qemu".split(), check=False) return 0 + def probe_dtsystem(out): """Probe DTS based system, expects a VPD in ONIE PROM format.""" dtsys = DTSystem() @@ -304,6 +325,7 @@ def probe_dtsystem(out): vpd_inject(out, vpds) return 0 + def main(): out = { "vendor": None, @@ -338,5 +360,6 @@ def main(): shutil.chown(SYSTEM_JSON, user="root", group="wheel") return err + if __name__ == "__main__": sys.exit(main()) From d5d487070fc0827db0cf1ae42fed4a558c96e194 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Wed, 6 Nov 2024 11:02:03 +0100 Subject: [PATCH 04/14] board/common: probe: add compatible array to /run/system.json Signed-off-by: Joachim Wiberg --- board/common/rootfs/usr/libexec/infix/init.d/00-probe | 2 ++ 1 file changed, 2 insertions(+) diff --git a/board/common/rootfs/usr/libexec/infix/init.d/00-probe b/board/common/rootfs/usr/libexec/infix/init.d/00-probe index bb3eebb5d..a73012112 100755 --- a/board/common/rootfs/usr/libexec/infix/init.d/00-probe +++ b/board/common/rootfs/usr/libexec/infix/init.d/00-probe @@ -318,6 +318,8 @@ def probe_dtsystem(out): if model: out["product-name"] = model + out["compatible"] = dtsys.base.str_array("compatible") + staticpw = dtsys.infix.str("factory-password-hash") if not out["factory-password-hash"]: out["factory-password-hash"] = staticpw From dc741bb567fd21d34713cb3a84a5a933d1be1d3e Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Wed, 6 Nov 2024 15:02:00 +0100 Subject: [PATCH 05/14] board/common: use compatible string to install and run overrides This patch use the new compatible array in /run/system.json, installing in order, least to most significant product overrides. We also introduce a new way to run product specific scripts at init, to override default behavior in Infix, e.g., LED control. Signed-off-by: Joachim Wiberg --- .../usr/libexec/infix/init.d/05-product | 39 ++++++++++++++----- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/board/common/rootfs/usr/libexec/infix/init.d/05-product b/board/common/rootfs/usr/libexec/infix/init.d/05-product index e99aca3b4..ad631ed87 100755 --- a/board/common/rootfs/usr/libexec/infix/init.d/05-product +++ b/board/common/rootfs/usr/libexec/infix/init.d/05-product @@ -1,22 +1,41 @@ #!/bin/sh -# Find and install any product specific files in /etc before bootstrap +# Find, install, and run product specific files and script in /etc +# before resuming bootstrap. +# +# Use /etc/product/init.d/S01-myscript for scripts, may be a symlink, it +# will be called with `start` as its only argument. +# +# The compatible array is listed in the same order as the device tree, +# most significant to least. Hence the reverse.[], to ensure overrides +# are applied in order of significance. ident=$(basename "$0") +PRODUCT_INIT=/etc/product/init.d PREFIXD=/usr/share/product -PRODUCT=$(jq -r '."product-name" | ascii_downcase' /run/system.json) +COMPATIBLES=$(jq -r '.compatible | reverse.[] | ascii_downcase' /run/system.json) note() { logger -I $$ -k -p user.notice -t "$ident" "$1" } -DIR="$PREFIXD/$PRODUCT" -if [ -z "$PRODUCT" ] || [ ! -d "$DIR" ]; then - note "No vendor/product specific directory found, using built-in defaults." - exit 0 +found=false +for PRODUCT in $COMPATIBLES; do + DIR="$PREFIXD/$PRODUCT" + if [ -d "$DIR" ]; then + note "Using vendor/product-specific defaults for $PRODUCT." + for dir in "$DIR"/*; do + [ -d "$dir" ] && cp -a "$dir" / + done + found=true + fi +done + +if [ "$found" = false ]; then + note "No vendor/product-specific directory found, using built-in defaults." fi -note "Using vendor/product specific defaults." -for dir in "$DIR"/*; do - [ -d "$dir" ] && cp -a "$dir" / -done +note "Calling runparts $PRODUCT_INIT/S[0-9]+.* start" +/usr/libexec/finit/runparts -bsp "$PRODUCT_INIT" + +exit 0 From 4e2458e18ab594d4360501f164627021f2f65380 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Thu, 7 Nov 2024 08:30:42 +0100 Subject: [PATCH 06/14] board/common: introduce conditions for bootstrap services Some services launched at bootstrap must be possible to override per product. One such service is iitod, which manages the LEDs in Infix. This change makes allows a product specific init script to clear the led condtion, preventing Finit from lauching iitod. Also, rename the ixinit-done condition to match the nomenclature used already. Signed-off-by: Joachim Wiberg --- board/common/rootfs/usr/libexec/infix/init.d/05-product | 7 +++++++ board/common/rootfs/usr/libexec/infix/init.d/99-done | 2 +- package/confd/confd.conf | 2 +- package/iito/iitod.svc | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/board/common/rootfs/usr/libexec/infix/init.d/05-product b/board/common/rootfs/usr/libexec/infix/init.d/05-product index ad631ed87..6cf9db6d1 100755 --- a/board/common/rootfs/usr/libexec/infix/init.d/05-product +++ b/board/common/rootfs/usr/libexec/infix/init.d/05-product @@ -35,7 +35,14 @@ if [ "$found" = false ]; then note "No vendor/product-specific directory found, using built-in defaults." fi +# Conditions for bootstrap services, this enables product specific +# init scripts to prevent select services from starting. +initctl -nbq cond set led + note "Calling runparts $PRODUCT_INIT/S[0-9]+.* start" /usr/libexec/finit/runparts -bsp "$PRODUCT_INIT" +# Product specific init done. +initctl -nbq cond set product + exit 0 diff --git a/board/common/rootfs/usr/libexec/infix/init.d/99-done b/board/common/rootfs/usr/libexec/infix/init.d/99-done index 84954e6dc..c2b018a58 100755 --- a/board/common/rootfs/usr/libexec/infix/init.d/99-done +++ b/board/common/rootfs/usr/libexec/infix/init.d/99-done @@ -1,2 +1,2 @@ #!/bin/sh -exec initctl -bq cond set ixinit-done +exec initctl -bq cond set ixinit diff --git a/package/confd/confd.conf b/package/confd/confd.conf index 036375aec..dc62a60b0 100644 --- a/package/confd/confd.conf +++ b/package/confd/confd.conf @@ -1,6 +1,6 @@ #set DEBUG=1 -run name:bootstrap log:prio:user.notice norestart \ +run name:bootstrap log:prio:user.notice norestart \ [S] /usr/libexec/confd/bootstrap \ -- Bootstrapping YANG datastore diff --git a/package/iito/iitod.svc b/package/iito/iitod.svc index d4a0af5b9..1aa229688 100644 --- a/package/iito/iitod.svc +++ b/package/iito/iitod.svc @@ -1 +1 @@ -service [S0123456789] iitod -- LED daemon +service [S0123456789] iitod -- LED daemon From 3b01f2d806a6b6251b0341b768be8c591216900f Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Tue, 5 Nov 2024 14:48:56 +0100 Subject: [PATCH 07/14] Revert "board/aarch64: styx: Remove unconnected LED" This reverts commit 7d1a70827441314c60af9901d717be820d892314. Turns out the second LED is actually connected. Signed-off-by: Joachim Wiberg --- board/aarch64/dts/styx/dcp-sc-28p.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/board/aarch64/dts/styx/dcp-sc-28p.dtsi b/board/aarch64/dts/styx/dcp-sc-28p.dtsi index ae5ff48b2..bcd67a4bc 100644 --- a/board/aarch64/dts/styx/dcp-sc-28p.dtsi +++ b/board/aarch64/dts/styx/dcp-sc-28p.dtsi @@ -276,6 +276,12 @@ color = ; \ default-state = "keep"; \ }; \ + led@1 { \ + reg = <1>; \ + function = _func; \ + color = ; \ + default-state = "off"; \ + }; \ } #define XSWP(_n, _label, _mac_offs, _sfp) \ From 4c1de659cbb5126901d0b7ac5fa02b1a60e44d2e Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Tue, 5 Nov 2024 19:01:11 +0100 Subject: [PATCH 08/14] board/aarch64: styx: rename second green led and drop second sfp led On Rev. B, the second LED on the copper ports is green instead of yellow. This patch renames them from yellow -> aux => :aux:tp Also on Rev. B, the second LED for SFP ports do not work at all. This patch drops them from the device tree to avoid confusion. Signed-off-by: Joachim Wiberg --- board/aarch64/dts/styx/dcp-sc-28p.dtsi | 30 ++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/board/aarch64/dts/styx/dcp-sc-28p.dtsi b/board/aarch64/dts/styx/dcp-sc-28p.dtsi index bcd67a4bc..7185e06fe 100644 --- a/board/aarch64/dts/styx/dcp-sc-28p.dtsi +++ b/board/aarch64/dts/styx/dcp-sc-28p.dtsi @@ -265,25 +265,43 @@ }; }; -#define SWP_LED(_func) \ +#define SWP_LED \ leds { \ #address-cells = <1>; \ #size-cells = <0>; \ \ led@0 { \ reg = <0>; \ - function = _func; \ + function = "tp"; \ color = ; \ default-state = "keep"; \ }; \ led@1 { \ reg = <1>; \ - function = _func; \ - color = ; \ + function = "aux"; \ + color = ; \ default-state = "off"; \ }; \ } +/* SFP LEDs + * Rev A. LEDs do not work at all + * Rev B. only outer-most (green) LEDs work + */ + +#define SFP_LED \ + leds { \ + #address-cells = <1>; \ + #size-cells = <0>; \ + \ + led@0 { \ + reg = <0>; \ + function = "sfp"; \ + color = ; \ + default-state = "keep"; \ + }; \ + } + #define XSWP(_n, _label, _mac_offs, _sfp) \ port@_n { \ reg = <0x ## _n>; \ @@ -293,7 +311,7 @@ phy-mode = "10gbase-r"; \ managed = "in-band-status"; \ sfp = <_sfp>; \ - SWP_LED("sfp"); \ + SFP_LED; \ } #define XSWCPU(_n, _eth) \ @@ -327,7 +345,7 @@ nvmem-cell-names = "mac-address"; \ phy-mode = "gmii"; \ phy-handle = <_phy>; \ - SWP_LED("tp"); \ + SWP_LED; \ } #define GPHY(_n) \ From 5d524006a3b6f4328b167b37063195447f0c4cbf Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Tue, 5 Nov 2024 19:04:21 +0100 Subject: [PATCH 09/14] board/aarch64: styx: led setup using a plain script at boot After the initial probe, set up all port leds: - Disable all LEDs - Enable netdev trigger for all green LEDs (tp + sfp) - Enable link statux and rx/tx activity - Skip all aux LEDs Also in script, a neat little flash function that can be used both for a production test, to verify all LEDs work, and at runtime to locate the device in a rack of devicess. Signed-off-by: Joachim Wiberg --- board/aarch64/rootfs/usr/libexec/styx/led.sh | 111 ++++++++++++++++++ .../etc/product/init.d/S10-led | 1 + 2 files changed, 112 insertions(+) create mode 100755 board/aarch64/rootfs/usr/libexec/styx/led.sh create mode 120000 board/aarch64/rootfs/usr/share/product/styx,dcp-sc-28p/etc/product/init.d/S10-led diff --git a/board/aarch64/rootfs/usr/libexec/styx/led.sh b/board/aarch64/rootfs/usr/libexec/styx/led.sh new file mode 100755 index 000000000..5df940840 --- /dev/null +++ b/board/aarch64/rootfs/usr/libexec/styx/led.sh @@ -0,0 +1,111 @@ +#!/bin/sh +# Raw switch LED Control for systems that do not run iitod + + +LEDS=$(find /sys/class/leds -iname '*mdio-mii*') +LINK=$(find /sys/class/leds -iname '*mdio-mii*p') + +# Disable ALL switch port LEDs +clear() +{ + for led in $LEDS; do + echo 0 > "${led}/brightness" + done +} + +setup() +{ + for led in $LINK; do + echo netdev > "${led}/trigger" + done + + for led in $LINK; do + cd "$led" + # No sleep here, it's enough with the delay from previous loop + echo 1 > link + sleep 0.1 + echo 1 > rx + sleep 0.1 + echo 1 > tx + cd - >/dev/null + done +} + +leds() +{ + for led in $LINK; do + printf "%3s: %s\n" "$(cat "$led/device_name" 2>/dev/null)" "$led" + done +} + +list() +{ + leds | sort | while read -r port path; do + printf "%4s %s\n" "$port" "$(basename "$path")" + + aux=${path%%:tp}:aux + if [ -e "$aux" ]; then + printf "%3s: %s\n" "" "$(basename "$aux")" + fi + done +} + +flash() +{ + sec=$1 + + for led in $LEDS; do + echo timer > "${led}/trigger" + done + + for led in $LEDS; do + echo 84 > "${led}/delay_on" + echo 84 > "${led}/delay_off" + done + + sleep "$sec" + clear +} + +usage() +{ + echo "usage: $0 [command]" + echo + echo "flash [SEC] Flash all LEDs to locate device in rack, default: 5 sec" + echo "list List all LEDs" + echo "setup Set up and start normal operation" + echo "start Call at system init, clears all LEDs and sets up normal op" + echo "stop Clear all LEDs, may be called at system shutdown" + echo + echo "Please ensure no other tool or daemon is already managing the LEDs." +} + +cmd=$1; shift +case $cmd in + flash) + flash ${1:-5} + setup + ;; + help) + usage + exit 0 + ;; + list | ls) + list + ;; + setup) + setup + ;; + start) + initctl -nbq cond clear led + clear + setup + ;; + stop) + clear + ;; + *) + usage + exit 1 + ;; +esac diff --git a/board/aarch64/rootfs/usr/share/product/styx,dcp-sc-28p/etc/product/init.d/S10-led b/board/aarch64/rootfs/usr/share/product/styx,dcp-sc-28p/etc/product/init.d/S10-led new file mode 120000 index 000000000..2d56a2725 --- /dev/null +++ b/board/aarch64/rootfs/usr/share/product/styx,dcp-sc-28p/etc/product/init.d/S10-led @@ -0,0 +1 @@ +/usr/libexec/styx/led.sh \ No newline at end of file From 597da90b0533fb0ead181dda71dbc06ebb9f37e8 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Thu, 7 Nov 2024 11:37:26 +0100 Subject: [PATCH 10/14] board/commoon: use dbus machine-id as /etc/machine-id Bootstrapping a system with D-Bus using Finit will create the machine-id file /var/lib/dbus/machine-id, this can be used as the unique machine-id for services like RAUC, so let's set that as /etc/machine-id to reduce the log spam we get otherwise: Nov 7 06:18:08 test-05-25-f8 rauc[5512]: Failed to get machine-id: Failed to open file M-^@M-^\/etc/machine-idM-^@M-^]: No such file or directory Signed-off-by: Joachim Wiberg --- board/common/rootfs/etc/machine-id | 1 + 1 file changed, 1 insertion(+) create mode 120000 board/common/rootfs/etc/machine-id diff --git a/board/common/rootfs/etc/machine-id b/board/common/rootfs/etc/machine-id new file mode 120000 index 000000000..03bf85831 --- /dev/null +++ b/board/common/rootfs/etc/machine-id @@ -0,0 +1 @@ +/var/lib/dbus/machine-id \ No newline at end of file From d692a3d745695af5f827223bf4d30e3a1143668c Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Thu, 7 Nov 2024 11:39:56 +0100 Subject: [PATCH 11/14] board/common: enable syslog for rauc In 0f410eb a patch was added to RAUC to allow native logging to syslog, it was however never enabled. This patch enables logging to syslog. Fix #809 Signed-off-by: Joachim Wiberg --- board/common/rootfs/etc/default/rauc | 1 + 1 file changed, 1 insertion(+) create mode 100644 board/common/rootfs/etc/default/rauc diff --git a/board/common/rootfs/etc/default/rauc b/board/common/rootfs/etc/default/rauc new file mode 100644 index 000000000..b0b2471d7 --- /dev/null +++ b/board/common/rootfs/etc/default/rauc @@ -0,0 +1 @@ +RAUC_ARGS="-s" \ No newline at end of file From 9ac77be9ebb20bdfd485a09642372a70e8d88c64 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Fri, 8 Nov 2024 09:58:31 +0100 Subject: [PATCH 12/14] confd: fix scary error message on systems without USB ports Check if the "usb-ports" key exists in /run/system.json before calling jq, otherise we get the following error message: Nov 8 05:11:45 ix bootstrap[3349]: jq: error (at :0): Cannot iterate over null (null) Also, minor whitespace cleanup and bashisms fixes. Signed-off-by: Joachim Wiberg --- src/confd/bin/gen-hardware | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/src/confd/bin/gen-hardware b/src/confd/bin/gen-hardware index aeff1e483..eec613d3e 100755 --- a/src/confd/bin/gen-hardware +++ b/src/confd/bin/gen-hardware @@ -1,19 +1,23 @@ #!/bin/sh set -e -usb_ports=$(cat /run/system.json | jq -r '.["usb-ports"] | map(.name) | unique | join(" ")') +if jq -e '.["usb-ports"]' /run/system.json > /dev/null; then + usb_ports=$(jq -r '.["usb-ports"] | map(.name) | unique | join(" ")' /run/system.json) +else + usb_ports="" +fi gen_port() { - local port="$1" - cat < Date: Fri, 8 Nov 2024 10:01:06 +0100 Subject: [PATCH 13/14] board/common: convert tc error message to useful information When we opportunistically set up mqprio on all interfaces, we pass over interfaces without offloading support. Catch that error message and log an informational message about which interfaces are skipped. Signed-off-by: Joachim Wiberg --- board/common/rootfs/usr/libexec/infix/init.d/25-mqprio | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/board/common/rootfs/usr/libexec/infix/init.d/25-mqprio b/board/common/rootfs/usr/libexec/infix/init.d/25-mqprio index 2f9dd9716..ff1c99ea5 100755 --- a/board/common/rootfs/usr/libexec/infix/init.d/25-mqprio +++ b/board/common/rootfs/usr/libexec/infix/init.d/25-mqprio @@ -46,7 +46,11 @@ while [ "$1" ]; do [ $txqs -lt 2 ] && continue [ $txqs -gt 8 ] && txqs=8 - tc qdisc add dev $iface root mqprio hw 1 \ - num_tc $txqs $(map $txqs) $(queues $txqs) || true + output=$(tc qdisc add dev $iface root mqprio hw 1 \ + num_tc $txqs $(map $txqs) $(queues $txqs) 2>&1) || true + if echo "$output" | grep -q "does not support hardware offload"; then + echo "Skipping $iface, hardware offload not supported." + elif [ -n "$output" ]; then + echo "$output" + fi done - From 6bdfdbe1646f67841a8def92a228c73d1d9185ed Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Tue, 5 Nov 2024 19:31:49 +0100 Subject: [PATCH 14/14] doc: update ChangeLog for v24.10.2 release Signed-off-by: Joachim Wiberg --- doc/ChangeLog.md | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/doc/ChangeLog.md b/doc/ChangeLog.md index 09753534c..148f69e6b 100644 --- a/doc/ChangeLog.md +++ b/doc/ChangeLog.md @@ -4,7 +4,7 @@ Change Log All notable changes to the project are documented in this file. -[v24.10.2][UNRELEASED] +[v24.10.2][] - 2024-11-08 ------------------------- ### Changes @@ -22,19 +22,30 @@ All notable changes to the project are documented in this file. - Support for saving and restoring system clock from a disk file. This allows restoring the system clock to a sane date in case the RTC is disabled or does not have a valid time, issue #794 -- Updated Discovery documentation with information on `infix.local` - mDNS alias, `netbrowse` support to discover *all* local units, and - command examples for disabling LLDP and mDNS services, issue #786 +- Update device discovery chapter with information on `infix.local` mDNS + alias, `netbrowse` support to discover *all* local units, and command + examples for disabling LLDP and mDNS services, issue #786 - Updated OSPF documentation to include information on *global OSPF settings* (`redistribution`, `explicit-router-id`, etc.), issue #812 - Added information on *forwarding of IEEE reserved group addresses* to bridge section of networking documentation, issue #788 +- Add support for bootstrap conditions and early init product overrides +- Styx: enable second Ethernet port LED in device tree, again, rename + it: yellow -> aux, and make sure it is turned off at boot +- Styx: disable second port LED for the 4xSFP slots, does not work +- Styx: override iitod (LED daemon) with a product specific LED script ### Fixes - Fix #685: DSA conduit interface not always detected, randomly causing major issues configuring systems with multiple switch cores - Fix #778: reactivate OpenSSL backend for libssh/libssh2 for NanoPI R2S. - This fixes a regression in v24.10.0 causing loss of NETCONF supprt + This fixes a regression in v24.10.0 causing loss of NETCONF support +- Fix #809: enable syslog logging for RAUC +- Fix harmless bootstrap log error message on systems without USB ports: + `jq: error (at :0): Cannot iterate over null (null)` +- Change confusing `tc` log error message: `Error: does not support + hardware offload` to `Skipping $iface, hardware offload not supported.` + [v24.10.1][] - 2024-10-18 @@ -1283,6 +1294,7 @@ Supported YANG models in addition to those used by sysrepo and netopeer: [buildroot]: https://buildroot.org/ [UNRELEASED]: https://github.com/kernelkit/infix/compare/v24.10.1...HEAD +[v24.10.2]: https://github.com/kernelkit/infix/compare/v24.10.1...v24.10.2 [v24.10.1]: https://github.com/kernelkit/infix/compare/v24.10.0...v24.10.1 [v24.10.0]: https://github.com/kernelkit/infix/compare/v24.09.0...v24.10.0 [v24.09.0]: https://github.com/kernelkit/infix/compare/v24.08.0...v24.09.0