]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop broken patch for lan88xx from 5.10
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jun 2025 08:07:49 +0000 (10:07 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jun 2025 08:07:49 +0000 (10:07 +0200)
queue-5.10/net-phy-microchip-force-irq-polling-mode-for-lan88xx.patch [deleted file]
queue-5.10/net-phy-microchip-implement-generic-.handle_interrup.patch [deleted file]
queue-5.10/net-phy-microchip-remove-the-use-of-.ack_interrupt.patch [deleted file]
queue-5.10/series

diff --git a/queue-5.10/net-phy-microchip-force-irq-polling-mode-for-lan88xx.patch b/queue-5.10/net-phy-microchip-force-irq-polling-mode-for-lan88xx.patch
deleted file mode 100644 (file)
index 57191c8..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-From 45697def1cfe1f5ca3855fc6ed82f42738c375b8 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Wed, 16 Apr 2025 12:24:13 +0200
-Subject: net: phy: microchip: force IRQ polling mode for lan88xx
-
-From: Fiona Klute <fiona.klute@gmx.de>
-
-[ Upstream commit 30a41ed32d3088cd0d682a13d7f30b23baed7e93 ]
-
-With lan88xx based devices the lan78xx driver can get stuck in an
-interrupt loop while bringing the device up, flooding the kernel log
-with messages like the following:
-
-lan78xx 2-3:1.0 enp1s0u3: kevent 4 may have been dropped
-
-Removing interrupt support from the lan88xx PHY driver forces the
-driver to use polling instead, which avoids the problem.
-
-The issue has been observed with Raspberry Pi devices at least since
-4.14 (see [1], bug report for their downstream kernel), as well as
-with Nvidia devices [2] in 2020, where disabling interrupts was the
-vendor-suggested workaround (together with the claim that phylib
-changes in 4.9 made the interrupt handling in lan78xx incompatible).
-
-Iperf reports well over 900Mbits/sec per direction with client in
---dualtest mode, so there does not seem to be a significant impact on
-throughput (lan88xx device connected via switch to the peer).
-
-[1] https://github.com/raspberrypi/linux/issues/2447
-[2] https://forums.developer.nvidia.com/t/jetson-xavier-and-lan7800-problem/142134/11
-
-Link: https://lore.kernel.org/0901d90d-3f20-4a10-b680-9c978e04ddda@lunn.ch
-Fixes: 792aec47d59d ("add microchip LAN88xx phy driver")
-Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
-Cc: kernel-list@raspberrypi.com
-Cc: stable@vger.kernel.org
-Reviewed-by: Andrew Lunn <andrew@lunn.ch>
-Link: https://patch.msgid.link/20250416102413.30654-1-fiona.klute@gmx.de
-Signed-off-by: Paolo Abeni <pabeni@redhat.com>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/net/phy/microchip.c | 46 +++----------------------------------
- 1 file changed, 3 insertions(+), 43 deletions(-)
-
-diff --git a/drivers/net/phy/microchip.c b/drivers/net/phy/microchip.c
-index 230f2fcf9c46a..7c8bcec0a8fab 100644
---- a/drivers/net/phy/microchip.c
-+++ b/drivers/net/phy/microchip.c
-@@ -31,47 +31,6 @@ static int lan88xx_write_page(struct phy_device *phydev, int page)
-       return __phy_write(phydev, LAN88XX_EXT_PAGE_ACCESS, page);
- }
--static int lan88xx_phy_config_intr(struct phy_device *phydev)
--{
--      int rc;
--
--      if (phydev->interrupts == PHY_INTERRUPT_ENABLED) {
--              /* unmask all source and clear them before enable */
--              rc = phy_write(phydev, LAN88XX_INT_MASK, 0x7FFF);
--              rc = phy_read(phydev, LAN88XX_INT_STS);
--              rc = phy_write(phydev, LAN88XX_INT_MASK,
--                             LAN88XX_INT_MASK_MDINTPIN_EN_ |
--                             LAN88XX_INT_MASK_LINK_CHANGE_);
--      } else {
--              rc = phy_write(phydev, LAN88XX_INT_MASK, 0);
--              if (rc)
--                      return rc;
--
--              /* Ack interrupts after they have been disabled */
--              rc = phy_read(phydev, LAN88XX_INT_STS);
--      }
--
--      return rc < 0 ? rc : 0;
--}
--
--static irqreturn_t lan88xx_handle_interrupt(struct phy_device *phydev)
--{
--      int irq_status;
--
--      irq_status = phy_read(phydev, LAN88XX_INT_STS);
--      if (irq_status < 0) {
--              phy_error(phydev);
--              return IRQ_NONE;
--      }
--
--      if (!(irq_status & LAN88XX_INT_STS_LINK_CHANGE_))
--              return IRQ_NONE;
--
--      phy_trigger_machine(phydev);
--
--      return IRQ_HANDLED;
--}
--
- static int lan88xx_suspend(struct phy_device *phydev)
- {
-       struct lan88xx_priv *priv = phydev->priv;
-@@ -388,8 +347,9 @@ static struct phy_driver microchip_phy_driver[] = {
-       .config_aneg    = lan88xx_config_aneg,
-       .link_change_notify = lan88xx_link_change_notify,
--      .config_intr    = lan88xx_phy_config_intr,
--      .handle_interrupt = lan88xx_handle_interrupt,
-+      /* Interrupt handling is broken, do not define related
-+       * functions to force polling.
-+       */
-       .suspend        = lan88xx_suspend,
-       .resume         = genphy_resume,
--- 
-2.39.5
-
diff --git a/queue-5.10/net-phy-microchip-implement-generic-.handle_interrup.patch b/queue-5.10/net-phy-microchip-implement-generic-.handle_interrup.patch
deleted file mode 100644 (file)
index a5e502f..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-From b785f8862406b8079627a5d6c7d946ee12153ef0 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 13 Nov 2020 18:52:11 +0200
-Subject: net: phy: microchip: implement generic .handle_interrupt() callback
-
-From: Ioana Ciornei <ioana.ciornei@nxp.com>
-
-[ Upstream commit e01a3feb8f69ab620b0016498603cad364f65224 ]
-
-In an attempt to actually support shared IRQs in phylib, we now move the
-responsibility of triggering the phylib state machine or just returning
-IRQ_NONE, based on the IRQ status register, to the PHY driver. Having
-3 different IRQ handling callbacks (.handle_interrupt(),
-.did_interrupt() and .ack_interrupt() ) is confusing so let the PHY
-driver implement directly an IRQ handler like any other device driver.
-Make this driver follow the new convention.
-
-Cc: Nisar Sayed <Nisar.Sayed@microchip.com>
-Cc: Yuiko Oshino <yuiko.oshino@microchip.com>
-Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
-Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-Stable-dep-of: 30a41ed32d30 ("net: phy: microchip: force IRQ polling mode for lan88xx")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/net/phy/microchip.c    | 19 +++++++++++++++++++
- drivers/net/phy/microchip_t1.c | 19 +++++++++++++++++++
- 2 files changed, 38 insertions(+)
-
-diff --git a/drivers/net/phy/microchip.c b/drivers/net/phy/microchip.c
-index 375bbd60b38af..a149d0ae58b02 100644
---- a/drivers/net/phy/microchip.c
-+++ b/drivers/net/phy/microchip.c
-@@ -56,6 +56,24 @@ static int lan88xx_phy_ack_interrupt(struct phy_device *phydev)
-       return rc < 0 ? rc : 0;
- }
-+static irqreturn_t lan88xx_handle_interrupt(struct phy_device *phydev)
-+{
-+      int irq_status;
-+
-+      irq_status = phy_read(phydev, LAN88XX_INT_STS);
-+      if (irq_status < 0) {
-+              phy_error(phydev);
-+              return IRQ_NONE;
-+      }
-+
-+      if (!(irq_status & LAN88XX_INT_STS_LINK_CHANGE_))
-+              return IRQ_NONE;
-+
-+      phy_trigger_machine(phydev);
-+
-+      return IRQ_HANDLED;
-+}
-+
- static int lan88xx_suspend(struct phy_device *phydev)
- {
-       struct lan88xx_priv *priv = phydev->priv;
-@@ -374,6 +392,7 @@ static struct phy_driver microchip_phy_driver[] = {
-       .ack_interrupt  = lan88xx_phy_ack_interrupt,
-       .config_intr    = lan88xx_phy_config_intr,
-+      .handle_interrupt = lan88xx_handle_interrupt,
-       .suspend        = lan88xx_suspend,
-       .resume         = genphy_resume,
-diff --git a/drivers/net/phy/microchip_t1.c b/drivers/net/phy/microchip_t1.c
-index fed3e395f18e1..553b391d1747a 100644
---- a/drivers/net/phy/microchip_t1.c
-+++ b/drivers/net/phy/microchip_t1.c
-@@ -203,6 +203,24 @@ static int lan87xx_phy_ack_interrupt(struct phy_device *phydev)
-       return rc < 0 ? rc : 0;
- }
-+static irqreturn_t lan87xx_handle_interrupt(struct phy_device *phydev)
-+{
-+      int irq_status;
-+
-+      irq_status = phy_read(phydev, LAN87XX_INTERRUPT_SOURCE);
-+      if (irq_status < 0) {
-+              phy_error(phydev);
-+              return IRQ_NONE;
-+      }
-+
-+      if (irq_status == 0)
-+              return IRQ_NONE;
-+
-+      phy_trigger_machine(phydev);
-+
-+      return IRQ_HANDLED;
-+}
-+
- static int lan87xx_config_init(struct phy_device *phydev)
- {
-       int rc = lan87xx_phy_init(phydev);
-@@ -223,6 +241,7 @@ static struct phy_driver microchip_t1_phy_driver[] = {
-               .ack_interrupt  = lan87xx_phy_ack_interrupt,
-               .config_intr    = lan87xx_phy_config_intr,
-+              .handle_interrupt = lan87xx_handle_interrupt,
-               .suspend        = genphy_suspend,
-               .resume         = genphy_resume,
--- 
-2.39.5
-
diff --git a/queue-5.10/net-phy-microchip-remove-the-use-of-.ack_interrupt.patch b/queue-5.10/net-phy-microchip-remove-the-use-of-.ack_interrupt.patch
deleted file mode 100644 (file)
index b8c324c..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-From bd7b9e93f850909eb8e5f5aa5d9552934af3bd0d Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 13 Nov 2020 18:52:12 +0200
-Subject: net: phy: microchip: remove the use of .ack_interrupt()
-
-From: Ioana Ciornei <ioana.ciornei@nxp.com>
-
-[ Upstream commit cf499391982d877e9313d2adeedcf5f1ffe05d6e ]
-
-In preparation of removing the .ack_interrupt() callback, we must replace
-its occurrences (aka phy_clear_interrupt), from the 2 places where it is
-called from (phy_enable_interrupts and phy_disable_interrupts), with
-equivalent functionality.
-
-This means that clearing interrupts now becomes something that the PHY
-driver is responsible of doing, before enabling interrupts and after
-clearing them. Make this driver follow the new contract.
-
-Cc: Nisar Sayed <Nisar.Sayed@microchip.com>
-Cc: Yuiko Oshino <yuiko.oshino@microchip.com>
-Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
-Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-Stable-dep-of: 30a41ed32d30 ("net: phy: microchip: force IRQ polling mode for lan88xx")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- drivers/net/phy/microchip.c    | 13 +++++--------
- drivers/net/phy/microchip_t1.c | 17 +++++++----------
- 2 files changed, 12 insertions(+), 18 deletions(-)
-
-diff --git a/drivers/net/phy/microchip.c b/drivers/net/phy/microchip.c
-index a149d0ae58b02..230f2fcf9c46a 100644
---- a/drivers/net/phy/microchip.c
-+++ b/drivers/net/phy/microchip.c
-@@ -44,14 +44,12 @@ static int lan88xx_phy_config_intr(struct phy_device *phydev)
-                              LAN88XX_INT_MASK_LINK_CHANGE_);
-       } else {
-               rc = phy_write(phydev, LAN88XX_INT_MASK, 0);
--      }
--
--      return rc < 0 ? rc : 0;
--}
-+              if (rc)
-+                      return rc;
--static int lan88xx_phy_ack_interrupt(struct phy_device *phydev)
--{
--      int rc = phy_read(phydev, LAN88XX_INT_STS);
-+              /* Ack interrupts after they have been disabled */
-+              rc = phy_read(phydev, LAN88XX_INT_STS);
-+      }
-       return rc < 0 ? rc : 0;
- }
-@@ -390,7 +388,6 @@ static struct phy_driver microchip_phy_driver[] = {
-       .config_aneg    = lan88xx_config_aneg,
-       .link_change_notify = lan88xx_link_change_notify,
--      .ack_interrupt  = lan88xx_phy_ack_interrupt,
-       .config_intr    = lan88xx_phy_config_intr,
-       .handle_interrupt = lan88xx_handle_interrupt,
-diff --git a/drivers/net/phy/microchip_t1.c b/drivers/net/phy/microchip_t1.c
-index 553b391d1747a..4440182243108 100644
---- a/drivers/net/phy/microchip_t1.c
-+++ b/drivers/net/phy/microchip_t1.c
-@@ -189,16 +189,14 @@ static int lan87xx_phy_config_intr(struct phy_device *phydev)
-               rc = phy_write(phydev, LAN87XX_INTERRUPT_MASK, 0x7FFF);
-               rc = phy_read(phydev, LAN87XX_INTERRUPT_SOURCE);
-               val = LAN87XX_MASK_LINK_UP | LAN87XX_MASK_LINK_DOWN;
--      }
--
--      rc = phy_write(phydev, LAN87XX_INTERRUPT_MASK, val);
--
--      return rc < 0 ? rc : 0;
--}
-+              rc = phy_write(phydev, LAN87XX_INTERRUPT_MASK, val);
-+      } else {
-+              rc = phy_write(phydev, LAN87XX_INTERRUPT_MASK, val);
-+              if (rc)
-+                      return rc;
--static int lan87xx_phy_ack_interrupt(struct phy_device *phydev)
--{
--      int rc = phy_read(phydev, LAN87XX_INTERRUPT_SOURCE);
-+              rc = phy_read(phydev, LAN87XX_INTERRUPT_SOURCE);
-+      }
-       return rc < 0 ? rc : 0;
- }
-@@ -239,7 +237,6 @@ static struct phy_driver microchip_t1_phy_driver[] = {
-               .config_init    = lan87xx_config_init,
-               .config_aneg    = genphy_config_aneg,
--              .ack_interrupt  = lan87xx_phy_ack_interrupt,
-               .config_intr    = lan87xx_phy_config_intr,
-               .handle_interrupt = lan87xx_handle_interrupt,
--- 
-2.39.5
-
index a3d56eab8797adcb41a4a8e155a824925f54c382..d104ebe9a6d5bf72c2c80146a87d31736e02a372 100644 (file)
@@ -28,9 +28,6 @@ net-lan743x-fix-memleak-issue-when-gso-enabled.patch
 net-fec-err007885-workaround-for-conventional-tx.patch
 pci-imx6-skip-controller_id-generation-logic-for-i.mx7d.patch
 of-module-add-buffer-overflow-check-in-of_modalias.patch
-net-phy-microchip-implement-generic-.handle_interrup.patch
-net-phy-microchip-remove-the-use-of-.ack_interrupt.patch
-net-phy-microchip-force-irq-polling-mode-for-lan88xx.patch
 revert-drm-meson-vclk-fix-calculation-of-59.94-fract.patch
 irqchip-gic-v2m-add-const-to-of_device_id.patch
 irqchip-gic-v2m-mark-a-few-functions-__init.patch