diff --git a/patches/linux/0001-eth-fwnode-Fall-back-to-NVMEM-provided-MAC-address-f.patch b/patches/linux/0001-eth-fwnode-Fall-back-to-NVMEM-provided-MAC-address-f.patch index 98a5b9fd..8ac9ab04 100644 --- a/patches/linux/0001-eth-fwnode-Fall-back-to-NVMEM-provided-MAC-address-f.patch +++ b/patches/linux/0001-eth-fwnode-Fall-back-to-NVMEM-provided-MAC-address-f.patch @@ -1,7 +1,7 @@ From e1011848d2c9476e20e6a4053b8ab46ce2a1506f Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Thu, 5 Oct 2023 16:09:25 +0200 -Subject: [PATCH 01/15] eth: fwnode: Fall back to NVMEM provided MAC address +Subject: [PATCH 01/17] eth: fwnode: Fall back to NVMEM provided MAC address from OF In the cases where the fwnode is an OF node, make use of any NVMEM diff --git a/patches/linux/0002-net-dsa-mv88e6xxx-Create-API-to-read-a-single-stat-c.patch b/patches/linux/0002-net-dsa-mv88e6xxx-Create-API-to-read-a-single-stat-c.patch index 03453f3b..561043ea 100644 --- a/patches/linux/0002-net-dsa-mv88e6xxx-Create-API-to-read-a-single-stat-c.patch +++ b/patches/linux/0002-net-dsa-mv88e6xxx-Create-API-to-read-a-single-stat-c.patch @@ -1,7 +1,7 @@ From 1d6f30fce9f4516730439f72ee2134301d37654d Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Tue, 5 Sep 2023 13:08:29 +0200 -Subject: [PATCH 02/15] net: dsa: mv88e6xxx: Create API to read a single stat +Subject: [PATCH 02/17] net: dsa: mv88e6xxx: Create API to read a single stat counter This change contains no functional change. We simply push the hardware diff --git a/patches/linux/0003-net-dsa-mv88e6xxx-Give-each-hw-stat-an-ID.patch b/patches/linux/0003-net-dsa-mv88e6xxx-Give-each-hw-stat-an-ID.patch index f084e9cc..8c193eee 100644 --- a/patches/linux/0003-net-dsa-mv88e6xxx-Give-each-hw-stat-an-ID.patch +++ b/patches/linux/0003-net-dsa-mv88e6xxx-Give-each-hw-stat-an-ID.patch @@ -1,7 +1,7 @@ From f960475a96d2852d06ee062c970e35074f87659c Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Tue, 5 Sep 2023 21:10:15 +0200 -Subject: [PATCH 03/15] net: dsa: mv88e6xxx: Give each hw stat an ID +Subject: [PATCH 03/17] net: dsa: mv88e6xxx: Give each hw stat an ID With the upcoming standard counter group support, we are no longer reading out the whole set of counters, but rather mapping a subset to diff --git a/patches/linux/0004-net-dsa-mv88e6xxx-Add-eth-mac-counter-group-support.patch b/patches/linux/0004-net-dsa-mv88e6xxx-Add-eth-mac-counter-group-support.patch index 14cc886d..aa6fdbc6 100644 --- a/patches/linux/0004-net-dsa-mv88e6xxx-Add-eth-mac-counter-group-support.patch +++ b/patches/linux/0004-net-dsa-mv88e6xxx-Add-eth-mac-counter-group-support.patch @@ -1,7 +1,7 @@ From 6a612f46152d8567a16b7b15fdcc3081cbdbb3fb Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Tue, 5 Sep 2023 21:15:52 +0200 -Subject: [PATCH 04/15] net: dsa: mv88e6xxx: Add "eth-mac" counter group +Subject: [PATCH 04/17] net: dsa: mv88e6xxx: Add "eth-mac" counter group support After this change, mv88e6xxx ports can report the applicable subset of diff --git a/patches/linux/0005-net-dsa-mv88e6xxx-Add-rmon-counter-group-support.patch b/patches/linux/0005-net-dsa-mv88e6xxx-Add-rmon-counter-group-support.patch index 8d41c749..fbc79dd0 100644 --- a/patches/linux/0005-net-dsa-mv88e6xxx-Add-rmon-counter-group-support.patch +++ b/patches/linux/0005-net-dsa-mv88e6xxx-Add-rmon-counter-group-support.patch @@ -1,7 +1,7 @@ From a85c55f3232d402780a22d42859bdc81150469b4 Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Wed, 6 Sep 2023 10:55:53 +0200 -Subject: [PATCH 05/15] net: dsa: mv88e6xxx: Add "rmon" counter group support +Subject: [PATCH 05/17] net: dsa: mv88e6xxx: Add "rmon" counter group support After this change, mv88e6xxx ports can report the applicable subset of their counters using ethtool's standardized "rmon" counter group. diff --git a/patches/linux/0006-arm64-dts-marvell-cp11x-Provide-clock-names-for-MDIO.patch b/patches/linux/0006-arm64-dts-marvell-cp11x-Provide-clock-names-for-MDIO.patch index fc366f7d..44f20563 100644 --- a/patches/linux/0006-arm64-dts-marvell-cp11x-Provide-clock-names-for-MDIO.patch +++ b/patches/linux/0006-arm64-dts-marvell-cp11x-Provide-clock-names-for-MDIO.patch @@ -1,7 +1,7 @@ From 6f684b1b9eb8a307b77aa4baa8531e2c423112af Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Thu, 21 Sep 2023 11:10:26 +0200 -Subject: [PATCH 06/15] arm64: dts: marvell: cp11x: Provide clock names for +Subject: [PATCH 06/17] arm64: dts: marvell: cp11x: Provide clock names for MDIO controllers This will let the driver figure out the rate of the core clk, such diff --git a/patches/linux/0007-net-mvmdio-Avoid-excessive-sleeps-in-polled-mode.patch b/patches/linux/0007-net-mvmdio-Avoid-excessive-sleeps-in-polled-mode.patch index 54af40ea..34b77dc7 100644 --- a/patches/linux/0007-net-mvmdio-Avoid-excessive-sleeps-in-polled-mode.patch +++ b/patches/linux/0007-net-mvmdio-Avoid-excessive-sleeps-in-polled-mode.patch @@ -1,7 +1,7 @@ From d5e03e7b44c8ac414927751097d8d65caffc33b4 Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Tue, 19 Sep 2023 18:19:40 +0200 -Subject: [PATCH 07/15] net: mvmdio: Avoid excessive sleeps in polled mode +Subject: [PATCH 07/17] net: mvmdio: Avoid excessive sleeps in polled mode Before this change, when operating in polled mode, i.e. no IRQ is available, every individual C45 access would be hit with a 150us sleep diff --git a/patches/linux/0008-net-mvmdio-Support-setting-the-MDC-frequency-on-XSMI.patch b/patches/linux/0008-net-mvmdio-Support-setting-the-MDC-frequency-on-XSMI.patch index d9816038..63613c14 100644 --- a/patches/linux/0008-net-mvmdio-Support-setting-the-MDC-frequency-on-XSMI.patch +++ b/patches/linux/0008-net-mvmdio-Support-setting-the-MDC-frequency-on-XSMI.patch @@ -1,7 +1,7 @@ From d389cc01295ebd7be228c8240f0061134b27f215 Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Thu, 21 Sep 2023 11:12:55 +0200 -Subject: [PATCH 08/15] net: mvmdio: Support setting the MDC frequency on XSMI +Subject: [PATCH 08/17] net: mvmdio: Support setting the MDC frequency on XSMI controllers Support the standard "clock-frequency" attribute to set the generated diff --git a/patches/linux/0009-net-phy-marvell10g-Support-firmware-loading-on-88X33.patch b/patches/linux/0009-net-phy-marvell10g-Support-firmware-loading-on-88X33.patch index 5a12a9a1..4d02934f 100644 --- a/patches/linux/0009-net-phy-marvell10g-Support-firmware-loading-on-88X33.patch +++ b/patches/linux/0009-net-phy-marvell10g-Support-firmware-loading-on-88X33.patch @@ -1,7 +1,7 @@ From 46bbea6b9d692ac7460e4e278cedee9f88b6da0b Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Tue, 19 Sep 2023 18:38:10 +0200 -Subject: [PATCH 09/15] net: phy: marvell10g: Support firmware loading on +Subject: [PATCH 09/17] net: phy: marvell10g: Support firmware loading on 88X3310 If a device is found waiting for firmware to be loaded into its RAM, diff --git a/patches/linux/0010-led-trig-netdev-Fix-requesting-offload-device.patch b/patches/linux/0010-led-trig-netdev-Fix-requesting-offload-device.patch index ca0f9b9c..f86722cc 100644 --- a/patches/linux/0010-led-trig-netdev-Fix-requesting-offload-device.patch +++ b/patches/linux/0010-led-trig-netdev-Fix-requesting-offload-device.patch @@ -1,7 +1,7 @@ From 312d3efde0fbe7cec3bf7ba1908c213c9cf69337 Mon Sep 17 00:00:00 2001 From: Andrew Lunn Date: Tue, 8 Aug 2023 23:04:33 +0200 -Subject: [PATCH 10/15] led: trig: netdev: Fix requesting offload device +Subject: [PATCH 10/17] led: trig: netdev: Fix requesting offload device When the netdev trigger is activates, it tries to determine what device the LED blinks for, and what the current blink mode is. diff --git a/patches/linux/0011-leds-trig-netdev-Disable-offload-on-deactivation-of-.patch b/patches/linux/0011-leds-trig-netdev-Disable-offload-on-deactivation-of-.patch index ebb8fdf2..d1ce06a2 100644 --- a/patches/linux/0011-leds-trig-netdev-Disable-offload-on-deactivation-of-.patch +++ b/patches/linux/0011-leds-trig-netdev-Disable-offload-on-deactivation-of-.patch @@ -1,7 +1,7 @@ From 83322015e7960ba0f1f3698e36333cfb6aecb931 Mon Sep 17 00:00:00 2001 From: Andrew Lunn Date: Tue, 8 Aug 2023 23:04:36 +0200 -Subject: [PATCH 11/15] leds: trig-netdev: Disable offload on deactivation of +Subject: [PATCH 11/17] leds: trig-netdev: Disable offload on deactivation of trigger Ensure that the offloading of blinking is stopped when the trigger is diff --git a/patches/linux/0012-net-phy-phy_device-Call-into-the-PHY-driver-to-set-L.patch b/patches/linux/0012-net-phy-phy_device-Call-into-the-PHY-driver-to-set-L.patch index d0a06374..f4335494 100644 --- a/patches/linux/0012-net-phy-phy_device-Call-into-the-PHY-driver-to-set-L.patch +++ b/patches/linux/0012-net-phy-phy_device-Call-into-the-PHY-driver-to-set-L.patch @@ -1,7 +1,7 @@ From a4f09c743da21f09b0fcc6e5842d665490f9f70e Mon Sep 17 00:00:00 2001 From: Andrew Lunn Date: Tue, 8 Aug 2023 23:04:34 +0200 -Subject: [PATCH 12/15] net: phy: phy_device: Call into the PHY driver to set +Subject: [PATCH 12/17] net: phy: phy_device: Call into the PHY driver to set LED offload Linux LEDs can be requested to perform hardware accelerated blinking diff --git a/patches/linux/0013-net-phy-marvell10g-Add-LED-support-for-88X3310.patch b/patches/linux/0013-net-phy-marvell10g-Add-LED-support-for-88X3310.patch index 97bd1f17..a6beb873 100644 --- a/patches/linux/0013-net-phy-marvell10g-Add-LED-support-for-88X3310.patch +++ b/patches/linux/0013-net-phy-marvell10g-Add-LED-support-for-88X3310.patch @@ -1,7 +1,7 @@ From 5adf394404d4c8ac25fb1e36d7d3f23b699b3104 Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Wed, 15 Nov 2023 20:58:42 +0100 -Subject: [PATCH 13/15] net: phy: marvell10g: Add LED support for 88X3310 +Subject: [PATCH 13/17] net: phy: marvell10g: Add LED support for 88X3310 Pickup the LEDs from the state in which the hardware reset or bootloader left them, but also support further configuration via diff --git a/patches/linux/0014-net-dsa-mv88e6xxx-Add-LED-infrastructure.patch b/patches/linux/0014-net-dsa-mv88e6xxx-Add-LED-infrastructure.patch index ea99c719..67e24b6a 100644 --- a/patches/linux/0014-net-dsa-mv88e6xxx-Add-LED-infrastructure.patch +++ b/patches/linux/0014-net-dsa-mv88e6xxx-Add-LED-infrastructure.patch @@ -1,7 +1,7 @@ From 913a57a304e8024f4cea872fa904cee867c469a2 Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Thu, 16 Nov 2023 19:44:32 +0100 -Subject: [PATCH 14/15] net: dsa: mv88e6xxx: Add LED infrastructure +Subject: [PATCH 14/17] net: dsa: mv88e6xxx: Add LED infrastructure Parse DT for LEDs and register them for devices that support it, though no actual implementations exist yet. diff --git a/patches/linux/0015-net-dsa-mv88e6xxx-Add-LED-support-for-6393X.patch b/patches/linux/0015-net-dsa-mv88e6xxx-Add-LED-support-for-6393X.patch index 79ac3249..ca6e0894 100644 --- a/patches/linux/0015-net-dsa-mv88e6xxx-Add-LED-support-for-6393X.patch +++ b/patches/linux/0015-net-dsa-mv88e6xxx-Add-LED-support-for-6393X.patch @@ -1,7 +1,7 @@ -From 09fca5d7f66b1bdc6a5f72eb3d36bfd8c88bebcc Mon Sep 17 00:00:00 2001 +From 8510028fa738493a46b235057ed166f9bbbf0ed4 Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Thu, 16 Nov 2023 21:59:35 +0100 -Subject: [PATCH 15/15] net: dsa: mv88e6xxx: Add LED support for 6393X +Subject: [PATCH 15/17] net: dsa: mv88e6xxx: Add LED support for 6393X Trigger support: - "none" @@ -11,11 +11,11 @@ Trigger support: Signed-off-by: Tobias Waldekranz --- drivers/net/dsa/mv88e6xxx/chip.c | 1 + - drivers/net/dsa/mv88e6xxx/leds.c | 219 +++++++++++++++++++++++++++++++ + drivers/net/dsa/mv88e6xxx/leds.c | 226 +++++++++++++++++++++++++++++++ drivers/net/dsa/mv88e6xxx/leds.h | 2 + drivers/net/dsa/mv88e6xxx/port.c | 33 +++++ drivers/net/dsa/mv88e6xxx/port.h | 7 + - 5 files changed, 262 insertions(+) + 5 files changed, 269 insertions(+) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index d343ea5cc4a1..7d6b2b85fc31 100644 @@ -30,7 +30,7 @@ index d343ea5cc4a1..7d6b2b85fc31 100644 }; diff --git a/drivers/net/dsa/mv88e6xxx/leds.c b/drivers/net/dsa/mv88e6xxx/leds.c -index 42e1661e1f47..02daf976100d 100644 +index 42e1661e1f47..b2a55d96b506 100644 --- a/drivers/net/dsa/mv88e6xxx/leds.c +++ b/drivers/net/dsa/mv88e6xxx/leds.c @@ -4,6 +4,13 @@ @@ -47,7 +47,7 @@ index 42e1661e1f47..02daf976100d 100644 struct mv88e6xxx_led { struct mv88e6xxx_chip *chip; int port; -@@ -12,6 +19,218 @@ struct mv88e6xxx_led { +@@ -12,6 +19,225 @@ struct mv88e6xxx_led { struct led_classdev ldev; }; @@ -163,9 +163,11 @@ index 42e1661e1f47..02daf976100d 100644 + if (mode < 0) + return mode; + ++ mv88e6xxx_reg_lock(led->chip); ++ + err = mv88e6393x_port_led_read(led->chip, led->port, 0, &ctrl); + if (err) -+ return err; ++ goto out; + + switch (led->index) { + case 0: @@ -177,7 +179,10 @@ index 42e1661e1f47..02daf976100d 100644 + ctrl |= mode << 4; + } + -+ return mv88e6393x_port_led_write(led->chip, led->port, 0, ctrl); ++ err = mv88e6393x_port_led_write(led->chip, led->port, 0, ctrl); ++out: ++ mv88e6xxx_reg_unlock(led->chip); ++ return err; +} + +static int mv88e6393x_led_get(struct mv88e6xxx_led *led) @@ -185,7 +190,9 @@ index 42e1661e1f47..02daf976100d 100644 + u16 ctrl; + int err; + ++ mv88e6xxx_reg_lock(led->chip); + err = mv88e6393x_port_led_read(led->chip, led->port, 0, &ctrl); ++ mv88e6xxx_reg_unlock(led->chip); + if (err) + return err; + diff --git a/patches/linux/0016-net-phy-marvell10g-Fix-power-up-when-strapped-to-sta.patch b/patches/linux/0016-net-phy-marvell10g-Fix-power-up-when-strapped-to-sta.patch new file mode 100644 index 00000000..20047016 --- /dev/null +++ b/patches/linux/0016-net-phy-marvell10g-Fix-power-up-when-strapped-to-sta.patch @@ -0,0 +1,49 @@ +From b70f0aa3eb77567a057c2f42f5012a3e009a95c8 Mon Sep 17 00:00:00 2001 +From: Tobias Waldekranz +Date: Tue, 21 Nov 2023 20:15:24 +0100 +Subject: [PATCH 16/17] net: phy: marvell10g: Fix power-up when strapped to + start powered down + +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: Tobias Waldekranz +--- + drivers/net/phy/marvell10g.c | 18 +++++++++++++++--- + 1 file changed, 15 insertions(+), 3 deletions(-) + +diff --git a/drivers/net/phy/marvell10g.c b/drivers/net/phy/marvell10g.c +index 05ad7c769e24..1d86ee10650e 100644 +--- a/drivers/net/phy/marvell10g.c ++++ b/drivers/net/phy/marvell10g.c +@@ -782,11 +782,23 @@ static int mv3310_power_down(struct phy_device *phydev) + + static int mv3310_power_up(struct phy_device *phydev) + { ++ static const u16 resets[][2] = { ++ { MDIO_MMD_PCS, MV_PCS_BASE_R + MDIO_CTRL1 }, ++ { MDIO_MMD_PCS, MV_PCS_1000BASEX + MDIO_CTRL1 }, ++ { MDIO_MMD_PCS, MV_PCS_BASE_T + MDIO_CTRL1 }, ++ { MDIO_MMD_PMAPMD, MDIO_CTRL1 }, ++ { MDIO_MMD_VEND2, MV_V2_PORT_CTRL }, ++ }; + struct mv3310_priv *priv = dev_get_drvdata(&phydev->mdio.dev); +- int ret; ++ int i, ret; + +- ret = phy_clear_bits_mmd(phydev, MDIO_MMD_VEND2, MV_V2_PORT_CTRL, +- MV_V2_PORT_CTRL_PWRDOWN); ++ for (i = 0; i < ARRAY_SIZE(resets); i++) { ++ ret = phy_clear_bits_mmd(phydev, resets[i][0], resets[i][1], ++ MV_V2_PORT_CTRL_PWRDOWN); ++ if (ret) ++ break; ++ ++ } + + /* Sometimes, the power down bit doesn't clear immediately, and + * a read of this register causes the bit not to clear. Delay +-- +2.34.1 + diff --git a/patches/linux/0017-nvmem-layouts-onie-tlv-Let-device-probe-even-when-TL.patch b/patches/linux/0017-nvmem-layouts-onie-tlv-Let-device-probe-even-when-TL.patch new file mode 100644 index 00000000..40123aab --- /dev/null +++ b/patches/linux/0017-nvmem-layouts-onie-tlv-Let-device-probe-even-when-TL.patch @@ -0,0 +1,54 @@ +From dd693e037f0dd799e77af397b4d23190b66e9cf1 Mon Sep 17 00:00:00 2001 +From: Tobias Waldekranz +Date: Fri, 24 Nov 2023 23:29:55 +0100 +Subject: [PATCH 17/17] nvmem: layouts: onie-tlv: Let device probe even when + TLV is invalid + +Before this change, probing an NVMEM device, expected to contain a +valid TLV, would fail if it had not been provisioned yet. But an +obvious way of provisioning is to write the TLV to the nvmem +attribute, which would not be possible because the device would not +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: Tobias Waldekranz +--- + drivers/nvmem/layouts/onie-tlv.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/drivers/nvmem/layouts/onie-tlv.c b/drivers/nvmem/layouts/onie-tlv.c +index 59fc87ccfcff..834c46e46d0a 100644 +--- a/drivers/nvmem/layouts/onie-tlv.c ++++ b/drivers/nvmem/layouts/onie-tlv.c +@@ -196,7 +196,7 @@ static int onie_tlv_parse_table(struct device *dev, struct nvmem_device *nvmem, + + if (!onie_tlv_hdr_is_valid(dev, &hdr)) { + dev_err(dev, "Invalid ONIE TLV header\n"); +- return -EINVAL; ++ return 0; + } + + hdr_len = sizeof(hdr.id) + sizeof(hdr.version) + sizeof(hdr.data_len); +@@ -204,7 +204,7 @@ static int onie_tlv_parse_table(struct device *dev, struct nvmem_device *nvmem, + table_len = hdr_len + data_len; + if (table_len > ONIE_TLV_MAX_LEN) { + dev_err(dev, "Invalid ONIE TLV data length\n"); +- return -EINVAL; ++ return 0; + } + + table = devm_kmalloc(dev, table_len, GFP_KERNEL); +@@ -216,7 +216,7 @@ static int onie_tlv_parse_table(struct device *dev, struct nvmem_device *nvmem, + return ret; + + if (!onie_tlv_crc_is_valid(dev, table_len, table)) +- return -EINVAL; ++ return 0; + + data = table + hdr_len; + ret = onie_tlv_add_cells(dev, nvmem, data_len, data); +-- +2.34.1 +