--- /dev/null
+From stable+bounces-198144-greg=kroah.com@vger.kernel.org Tue Dec 2 21:23:22 2025
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 2 Dec 2025 15:23:12 -0500
+Subject: drm, fbcon, vga_switcheroo: Avoid race condition in fbcon setup
+To: stable@vger.kernel.org
+Cc: Thomas Zimmermann <tzimmermann@suse.de>, Javier Martinez Canillas <javierm@redhat.com>, Alex Deucher <alexander.deucher@amd.com>, dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-fbdev@vger.kernel.org, Sasha Levin <sashal@kernel.org>
+Message-ID: <20251202202312.2505097-1-sashal@kernel.org>
+
+From: Thomas Zimmermann <tzimmermann@suse.de>
+
+[ Upstream commit eb76d0f5553575599561010f24c277cc5b31d003 ]
+
+Protect vga_switcheroo_client_fb_set() with console lock. Avoids OOB
+access in fbcon_remap_all(). Without holding the console lock the call
+races with switching outputs.
+
+VGA switcheroo calls fbcon_remap_all() when switching clients. The fbcon
+function uses struct fb_info.node, which is set by register_framebuffer().
+As the fb-helper code currently sets up VGA switcheroo before registering
+the framebuffer, the value of node is -1 and therefore not a legal value.
+For example, fbcon uses the value within set_con2fb_map() [1] as an index
+into an array.
+
+Moving vga_switcheroo_client_fb_set() after register_framebuffer() can
+result in VGA switching that does not switch fbcon correctly.
+
+Therefore move vga_switcheroo_client_fb_set() under fbcon_fb_registered(),
+which already holds the console lock. Fbdev calls fbcon_fb_registered()
+from within register_framebuffer(). Serializes the helper with VGA
+switcheroo's call to fbcon_remap_all().
+
+Although vga_switcheroo_client_fb_set() takes an instance of struct fb_info
+as parameter, it really only needs the contained fbcon state. Moving the
+call to fbcon initialization is therefore cleaner than before. Only amdgpu,
+i915, nouveau and radeon support vga_switcheroo. For all other drivers,
+this change does nothing.
+
+Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
+Link: https://elixir.bootlin.com/linux/v6.17/source/drivers/video/fbdev/core/fbcon.c#L2942 # [1]
+Fixes: 6a9ee8af344e ("vga_switcheroo: initial implementation (v15)")
+Acked-by: Javier Martinez Canillas <javierm@redhat.com>
+Acked-by: Alex Deucher <alexander.deucher@amd.com>
+Cc: dri-devel@lists.freedesktop.org
+Cc: nouveau@lists.freedesktop.org
+Cc: amd-gfx@lists.freedesktop.org
+Cc: linux-fbdev@vger.kernel.org
+Cc: <stable@vger.kernel.org> # v2.6.34+
+Link: https://patch.msgid.link/20251105161549.98836-1-tzimmermann@suse.de
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/gpu/drm/drm_fb_helper.c | 6 ------
+ drivers/gpu/drm/i915/display/intel_fbdev.c | 6 ------
+ drivers/gpu/drm/radeon/radeon_fbdev.c | 5 -----
+ drivers/video/fbdev/core/fbcon.c | 9 +++++++++
+ 4 files changed, 9 insertions(+), 17 deletions(-)
+
+--- a/drivers/gpu/drm/drm_fb_helper.c
++++ b/drivers/gpu/drm/drm_fb_helper.c
+@@ -30,9 +30,7 @@
+ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
+ #include <linux/console.h>
+-#include <linux/pci.h>
+ #include <linux/sysrq.h>
+-#include <linux/vga_switcheroo.h>
+
+ #include <drm/drm_atomic.h>
+ #include <drm/drm_drv.h>
+@@ -1637,10 +1635,6 @@ static int drm_fb_helper_single_fb_probe
+
+ strcpy(fb_helper->fb->comm, "[fbcon]");
+
+- /* Set the fb info for vgaswitcheroo clients. Does nothing otherwise. */
+- if (dev_is_pci(dev->dev))
+- vga_switcheroo_client_fb_set(to_pci_dev(dev->dev), fb_helper->info);
+-
+ return 0;
+ }
+
+--- a/drivers/gpu/drm/i915/display/intel_fbdev.c
++++ b/drivers/gpu/drm/i915/display/intel_fbdev.c
+@@ -589,11 +589,8 @@ static int intel_fbdev_restore_mode(stru
+ static void intel_fbdev_client_unregister(struct drm_client_dev *client)
+ {
+ struct drm_fb_helper *fb_helper = drm_fb_helper_from_client(client);
+- struct drm_device *dev = fb_helper->dev;
+- struct pci_dev *pdev = to_pci_dev(dev->dev);
+
+ if (fb_helper->info) {
+- vga_switcheroo_client_fb_set(pdev, NULL);
+ drm_fb_helper_unregister_info(fb_helper);
+ } else {
+ drm_fb_helper_unprepare(fb_helper);
+@@ -620,7 +617,6 @@ static int intel_fbdev_client_hotplug(st
+ {
+ struct drm_fb_helper *fb_helper = drm_fb_helper_from_client(client);
+ struct drm_device *dev = client->dev;
+- struct pci_dev *pdev = to_pci_dev(dev->dev);
+ int ret;
+
+ if (dev->fb_helper)
+@@ -634,8 +630,6 @@ static int intel_fbdev_client_hotplug(st
+ if (ret)
+ goto err_drm_fb_helper_fini;
+
+- vga_switcheroo_client_fb_set(pdev, fb_helper->info);
+-
+ return 0;
+
+ err_drm_fb_helper_fini:
+--- a/drivers/gpu/drm/radeon/radeon_fbdev.c
++++ b/drivers/gpu/drm/radeon/radeon_fbdev.c
+@@ -300,10 +300,8 @@ static void radeon_fbdev_client_unregist
+ {
+ struct drm_fb_helper *fb_helper = drm_fb_helper_from_client(client);
+ struct drm_device *dev = fb_helper->dev;
+- struct radeon_device *rdev = dev->dev_private;
+
+ if (fb_helper->info) {
+- vga_switcheroo_client_fb_set(rdev->pdev, NULL);
+ drm_helper_force_disable_all(dev);
+ drm_fb_helper_unregister_info(fb_helper);
+ } else {
+@@ -325,7 +323,6 @@ static int radeon_fbdev_client_hotplug(s
+ {
+ struct drm_fb_helper *fb_helper = drm_fb_helper_from_client(client);
+ struct drm_device *dev = client->dev;
+- struct radeon_device *rdev = dev->dev_private;
+ int ret;
+
+ if (dev->fb_helper)
+@@ -342,8 +339,6 @@ static int radeon_fbdev_client_hotplug(s
+ if (ret)
+ goto err_drm_fb_helper_fini;
+
+- vga_switcheroo_client_fb_set(rdev->pdev, fb_helper->info);
+-
+ return 0;
+
+ err_drm_fb_helper_fini:
+--- a/drivers/video/fbdev/core/fbcon.c
++++ b/drivers/video/fbdev/core/fbcon.c
+@@ -65,6 +65,7 @@
+ #include <linux/string.h>
+ #include <linux/kd.h>
+ #include <linux/panic.h>
++#include <linux/pci.h>
+ #include <linux/printk.h>
+ #include <linux/slab.h>
+ #include <linux/fb.h>
+@@ -77,6 +78,7 @@
+ #include <linux/interrupt.h>
+ #include <linux/crc32.h> /* For counting font checksums */
+ #include <linux/uaccess.h>
++#include <linux/vga_switcheroo.h>
+ #include <asm/irq.h>
+
+ #include "fbcon.h"
+@@ -2894,6 +2896,9 @@ void fbcon_fb_unregistered(struct fb_inf
+
+ console_lock();
+
++ if (info->device && dev_is_pci(info->device))
++ vga_switcheroo_client_fb_set(to_pci_dev(info->device), NULL);
++
+ fbcon_registered_fb[info->node] = NULL;
+ fbcon_num_registered_fb--;
+
+@@ -3027,6 +3032,10 @@ static int do_fb_registered(struct fb_in
+ }
+ }
+
++ /* Set the fb info for vga_switcheroo clients. Does nothing otherwise. */
++ if (info->device && dev_is_pci(info->device))
++ vga_switcheroo_client_fb_set(to_pci_dev(info->device), info);
++
+ return ret;
+ }
+
--- /dev/null
+From stable+bounces-198137-greg=kroah.com@vger.kernel.org Tue Dec 2 20:21:25 2025
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 2 Dec 2025 14:20:58 -0500
+Subject: net: dsa: microchip: Do not execute PTP driver code for unsupported switches
+To: stable@vger.kernel.org
+Cc: Tristram Ha <tristram.ha@microchip.com>, Jakub Kicinski <kuba@kernel.org>, Sasha Levin <sashal@kernel.org>
+Message-ID: <20251202192100.2403411-1-sashal@kernel.org>
+
+From: Tristram Ha <tristram.ha@microchip.com>
+
+[ Upstream commit 6ed3472173c575cd8aaed6c62eb74f7728404ee6 ]
+
+The PTP driver code only works for certain KSZ switches like KSZ9477,
+KSZ9567, LAN937X and their varieties. This code is enabled by kernel
+configuration CONFIG_NET_DSA_MICROCHIP_KSZ_PTP. As the DSA driver is
+common to work with all KSZ switches this PTP code is not appropriate
+for other unsupported switches. The ptp_capable indication is added to
+the chip data structure to signal whether to execute those code.
+
+Signed-off-by: Tristram Ha <tristram.ha@microchip.com>
+Link: https://patch.msgid.link/20241218020240.70601-1-Tristram.Ha@microchip.com
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Stable-dep-of: 0f80e21bf622 ("net: dsa: microchip: Free previously initialized ports on init failures")
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/dsa/microchip/ksz_common.c | 40 +++++++++++++++++++++++----------
+ drivers/net/dsa/microchip/ksz_common.h | 1
+ 2 files changed, 30 insertions(+), 11 deletions(-)
+
+--- a/drivers/net/dsa/microchip/ksz_common.c
++++ b/drivers/net/dsa/microchip/ksz_common.c
+@@ -1342,6 +1342,7 @@ const struct ksz_chip_data ksz_switch_ch
+ .supports_rgmii = {false, false, true},
+ .internal_phy = {true, true, false},
+ .gbit_capable = {false, false, true},
++ .ptp_capable = true,
+ .wr_table = &ksz8563_register_set,
+ .rd_table = &ksz8563_register_set,
+ },
+@@ -1553,6 +1554,7 @@ const struct ksz_chip_data ksz_switch_ch
+ .internal_phy = {true, true, true, true,
+ true, false, false},
+ .gbit_capable = {true, true, true, true, true, true, true},
++ .ptp_capable = true,
+ .wr_table = &ksz9477_register_set,
+ .rd_table = &ksz9477_register_set,
+ },
+@@ -1680,6 +1682,7 @@ const struct ksz_chip_data ksz_switch_ch
+ .supports_rgmii = {false, false, true},
+ .internal_phy = {true, true, false},
+ .gbit_capable = {true, true, true},
++ .ptp_capable = true,
+ },
+
+ [KSZ8567] = {
+@@ -1715,6 +1718,7 @@ const struct ksz_chip_data ksz_switch_ch
+ true, false, false},
+ .gbit_capable = {false, false, false, false, false,
+ true, true},
++ .ptp_capable = true,
+ },
+
+ [KSZ9567] = {
+@@ -1747,6 +1751,7 @@ const struct ksz_chip_data ksz_switch_ch
+ .internal_phy = {true, true, true, true,
+ true, false, false},
+ .gbit_capable = {true, true, true, true, true, true, true},
++ .ptp_capable = true,
+ },
+
+ [LAN9370] = {
+@@ -1775,6 +1780,7 @@ const struct ksz_chip_data ksz_switch_ch
+ .supports_rmii = {false, false, false, false, true},
+ .supports_rgmii = {false, false, false, false, true},
+ .internal_phy = {true, true, true, true, false},
++ .ptp_capable = true,
+ },
+
+ [LAN9371] = {
+@@ -1803,6 +1809,7 @@ const struct ksz_chip_data ksz_switch_ch
+ .supports_rmii = {false, false, false, false, true, true},
+ .supports_rgmii = {false, false, false, false, true, true},
+ .internal_phy = {true, true, true, true, false, false},
++ .ptp_capable = true,
+ },
+
+ [LAN9372] = {
+@@ -1835,6 +1842,7 @@ const struct ksz_chip_data ksz_switch_ch
+ true, true, false, false},
+ .internal_phy = {true, true, true, true,
+ false, false, true, true},
++ .ptp_capable = true,
+ },
+
+ [LAN9373] = {
+@@ -1867,6 +1875,7 @@ const struct ksz_chip_data ksz_switch_ch
+ true, true, false, false},
+ .internal_phy = {true, true, true, false,
+ false, false, true, true},
++ .ptp_capable = true,
+ },
+
+ [LAN9374] = {
+@@ -1899,6 +1908,7 @@ const struct ksz_chip_data ksz_switch_ch
+ true, true, false, false},
+ .internal_phy = {true, true, true, true,
+ false, false, true, true},
++ .ptp_capable = true,
+ },
+ };
+ EXPORT_SYMBOL_GPL(ksz_switch_chips);
+@@ -2556,16 +2566,21 @@ static int ksz_setup(struct dsa_switch *
+ if (ret)
+ goto out_girq;
+
+- ret = ksz_ptp_irq_setup(ds, dp->index);
+- if (ret)
+- goto out_pirq;
++ if (dev->info->ptp_capable) {
++ ret = ksz_ptp_irq_setup(ds, dp->index);
++ if (ret)
++ goto out_pirq;
++ }
+ }
+ }
+
+- ret = ksz_ptp_clock_register(ds);
+- if (ret) {
+- dev_err(dev->dev, "Failed to register PTP clock: %d\n", ret);
+- goto out_ptpirq;
++ if (dev->info->ptp_capable) {
++ ret = ksz_ptp_clock_register(ds);
++ if (ret) {
++ dev_err(dev->dev, "Failed to register PTP clock: %d\n",
++ ret);
++ goto out_ptpirq;
++ }
+ }
+
+ ret = ksz_mdio_register(dev);
+@@ -2585,9 +2600,10 @@ static int ksz_setup(struct dsa_switch *
+ return 0;
+
+ out_ptp_clock_unregister:
+- ksz_ptp_clock_unregister(ds);
++ if (dev->info->ptp_capable)
++ ksz_ptp_clock_unregister(ds);
+ out_ptpirq:
+- if (dev->irq > 0)
++ if (dev->irq > 0 && dev->info->ptp_capable)
+ dsa_switch_for_each_user_port(dp, dev->ds)
+ ksz_ptp_irq_free(ds, dp->index);
+ out_pirq:
+@@ -2606,11 +2622,13 @@ static void ksz_teardown(struct dsa_swit
+ struct ksz_device *dev = ds->priv;
+ struct dsa_port *dp;
+
+- ksz_ptp_clock_unregister(ds);
++ if (dev->info->ptp_capable)
++ ksz_ptp_clock_unregister(ds);
+
+ if (dev->irq > 0) {
+ dsa_switch_for_each_user_port(dp, dev->ds) {
+- ksz_ptp_irq_free(ds, dp->index);
++ if (dev->info->ptp_capable)
++ ksz_ptp_irq_free(ds, dp->index);
+
+ ksz_irq_free(&dev->ports[dp->index].pirq);
+ }
+--- a/drivers/net/dsa/microchip/ksz_common.h
++++ b/drivers/net/dsa/microchip/ksz_common.h
+@@ -86,6 +86,7 @@ struct ksz_chip_data {
+ bool supports_rgmii[KSZ_MAX_NUM_PORTS];
+ bool internal_phy[KSZ_MAX_NUM_PORTS];
+ bool gbit_capable[KSZ_MAX_NUM_PORTS];
++ bool ptp_capable;
+ const struct regmap_access_table *wr_table;
+ const struct regmap_access_table *rd_table;
+ };
--- /dev/null
+From stable+bounces-198136-greg=kroah.com@vger.kernel.org Tue Dec 2 20:20:57 2025
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 2 Dec 2025 14:20:45 -0500
+Subject: net: dsa: microchip: Fix symetry in ksz_ptp_msg_irq_{setup/free}()
+To: stable@vger.kernel.org
+Cc: "Bastien Curutchet (Schneider Electric)" <bastien.curutchet@bootlin.com>, Andrew Lunn <andrew@lunn.ch>, Paolo Abeni <pabeni@redhat.com>, Sasha Levin <sashal@kernel.org>
+Message-ID: <20251202192045.2402844-1-sashal@kernel.org>
+
+From: "Bastien Curutchet (Schneider Electric)" <bastien.curutchet@bootlin.com>
+
+[ Upstream commit d0b8fec8ae50525b57139393d0bb1f446e82ff7e ]
+
+The IRQ numbers created through irq_create_mapping() are only assigned
+to ptpmsg_irq[n].num at the end of the IRQ setup. So if an error occurs
+between their creation and their assignment (for instance during the
+request_threaded_irq() step), we enter the error path and fail to
+release the newly created virtual IRQs because they aren't yet assigned
+to ptpmsg_irq[n].num.
+
+Move the mapping creation to ksz_ptp_msg_irq_setup() to ensure symetry
+with what's released by ksz_ptp_msg_irq_free().
+In the error path, move the irq_dispose_mapping to the out_ptp_msg label
+so it will be called only on created IRQs.
+
+Cc: stable@vger.kernel.org
+Fixes: cc13ab18b201 ("net: dsa: microchip: ptp: enable interrupt for timestamping")
+Reviewed-by: Andrew Lunn <andrew@lunn.ch>
+Signed-off-by: Bastien Curutchet (Schneider Electric) <bastien.curutchet@bootlin.com>
+Link: https://patch.msgid.link/20251120-ksz-fix-v6-5-891f80ae7f8f@bootlin.com
+Signed-off-by: Paolo Abeni <pabeni@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/dsa/microchip/ksz_ptp.c | 18 +++++++-----------
+ 1 file changed, 7 insertions(+), 11 deletions(-)
+
+--- a/drivers/net/dsa/microchip/ksz_ptp.c
++++ b/drivers/net/dsa/microchip/ksz_ptp.c
+@@ -1099,19 +1099,19 @@ static int ksz_ptp_msg_irq_setup(struct
+ static const char * const name[] = {"pdresp-msg", "xdreq-msg",
+ "sync-msg"};
+ const struct ksz_dev_ops *ops = port->ksz_dev->dev_ops;
++ struct ksz_irq *ptpirq = &port->ptpirq;
+ struct ksz_ptp_irq *ptpmsg_irq;
+
+ ptpmsg_irq = &port->ptpmsg_irq[n];
++ ptpmsg_irq->num = irq_create_mapping(ptpirq->domain, n);
++ if (!ptpmsg_irq->num)
++ return -EINVAL;
+
+ ptpmsg_irq->port = port;
+ ptpmsg_irq->ts_reg = ops->get_port_addr(port->num, ts_reg[n]);
+
+ snprintf(ptpmsg_irq->name, sizeof(ptpmsg_irq->name), name[n]);
+
+- ptpmsg_irq->num = irq_find_mapping(port->ptpirq.domain, n);
+- if (ptpmsg_irq->num < 0)
+- return ptpmsg_irq->num;
+-
+ return request_threaded_irq(ptpmsg_irq->num, NULL,
+ ksz_ptp_msg_thread_fn, IRQF_ONESHOT,
+ ptpmsg_irq->name, ptpmsg_irq);
+@@ -1141,9 +1141,6 @@ int ksz_ptp_irq_setup(struct dsa_switch
+ if (!ptpirq->domain)
+ return -ENOMEM;
+
+- for (irq = 0; irq < ptpirq->nirqs; irq++)
+- irq_create_mapping(ptpirq->domain, irq);
+-
+ ptpirq->irq_num = irq_find_mapping(port->pirq.domain, PORT_SRC_PTP_INT);
+ if (!ptpirq->irq_num) {
+ ret = -EINVAL;
+@@ -1165,12 +1162,11 @@ int ksz_ptp_irq_setup(struct dsa_switch
+
+ out_ptp_msg:
+ free_irq(ptpirq->irq_num, ptpirq);
+- while (irq--)
++ while (irq--) {
+ free_irq(port->ptpmsg_irq[irq].num, &port->ptpmsg_irq[irq]);
+-out:
+- for (irq = 0; irq < ptpirq->nirqs; irq++)
+ irq_dispose_mapping(port->ptpmsg_irq[irq].num);
+-
++ }
++out:
+ irq_domain_remove(ptpirq->domain);
+
+ return ret;
--- /dev/null
+From stable+bounces-198139-greg=kroah.com@vger.kernel.org Tue Dec 2 20:21:28 2025
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 2 Dec 2025 14:21:00 -0500
+Subject: net: dsa: microchip: Free previously initialized ports on init failures
+To: stable@vger.kernel.org
+Cc: "Bastien Curutchet (Schneider Electric)" <bastien.curutchet@bootlin.com>, Paolo Abeni <pabeni@redhat.com>, Sasha Levin <sashal@kernel.org>
+Message-ID: <20251202192100.2403411-3-sashal@kernel.org>
+
+From: "Bastien Curutchet (Schneider Electric)" <bastien.curutchet@bootlin.com>
+
+[ Upstream commit 0f80e21bf6229637e193248fbd284c0ec44bc0fd ]
+
+If a port interrupt setup fails after at least one port has already been
+successfully initialized, the gotos miss some resource releasing:
+- the already initialized PTP IRQs aren't released
+- the already initialized port IRQs aren't released if the failure
+occurs in ksz_pirq_setup().
+
+Merge 'out_girq' and 'out_ptpirq' into a single 'port_release' label.
+Behind this label, use the reverse loop to release all IRQ resources
+for all initialized ports.
+Jump in the middle of the reverse loop if an error occurs in
+ksz_ptp_irq_setup() to only release the port IRQ of the current
+iteration.
+
+Cc: stable@vger.kernel.org
+Fixes: c9cd961c0d43 ("net: dsa: microchip: lan937x: add interrupt support for port phy link")
+Signed-off-by: Bastien Curutchet (Schneider Electric) <bastien.curutchet@bootlin.com>
+Link: https://patch.msgid.link/20251120-ksz-fix-v6-4-891f80ae7f8f@bootlin.com
+Signed-off-by: Paolo Abeni <pabeni@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/dsa/microchip/ksz_common.c | 23 +++++++++++------------
+ 1 file changed, 11 insertions(+), 12 deletions(-)
+
+--- a/drivers/net/dsa/microchip/ksz_common.c
++++ b/drivers/net/dsa/microchip/ksz_common.c
+@@ -2564,12 +2564,12 @@ static int ksz_setup(struct dsa_switch *
+ dsa_switch_for_each_user_port(dp, dev->ds) {
+ ret = ksz_pirq_setup(dev, dp->index);
+ if (ret)
+- goto out_girq;
++ goto port_release;
+
+ if (dev->info->ptp_capable) {
+ ret = ksz_ptp_irq_setup(ds, dp->index);
+ if (ret)
+- goto out_pirq;
++ goto pirq_release;
+ }
+ }
+ }
+@@ -2579,7 +2579,7 @@ static int ksz_setup(struct dsa_switch *
+ if (ret) {
+ dev_err(dev->dev, "Failed to register PTP clock: %d\n",
+ ret);
+- goto out_ptpirq;
++ goto port_release;
+ }
+ }
+
+@@ -2602,17 +2602,16 @@ static int ksz_setup(struct dsa_switch *
+ out_ptp_clock_unregister:
+ if (dev->info->ptp_capable)
+ ksz_ptp_clock_unregister(ds);
+-out_ptpirq:
+- if (dev->irq > 0 && dev->info->ptp_capable)
+- dsa_switch_for_each_user_port(dp, dev->ds)
+- ksz_ptp_irq_free(ds, dp->index);
+-out_pirq:
+- if (dev->irq > 0)
+- dsa_switch_for_each_user_port_continue_reverse(dp, dev->ds)
++port_release:
++ if (dev->irq > 0) {
++ dsa_switch_for_each_user_port_continue_reverse(dp, dev->ds) {
++ if (dev->info->ptp_capable)
++ ksz_ptp_irq_free(ds, dp->index);
++pirq_release:
+ ksz_irq_free(&dev->ports[dp->index].pirq);
+-out_girq:
+- if (dev->irq > 0)
++ }
+ ksz_irq_free(&dev->girq);
++ }
+
+ return ret;
+ }
kvm-nsvm-always-recalculate-lbr-msr-intercepts-in-svm_update_lbrv.patch
kvm-nsvm-fix-and-simplify-lbr-virtualization-handling-with-nested.patch
kvm-svm-fix-redundant-updates-of-lbr-msr-intercepts.patch
+net-dsa-microchip-fix-symetry-in-ksz_ptp_msg_irq_-setup-free.patch
+drm-fbcon-vga_switcheroo-avoid-race-condition-in-fbcon-setup.patch
+net-dsa-microchip-do-not-execute-ptp-driver-code-for-unsupported-switches.patch
+net-dsa-microchip-free-previously-initialized-ports-on-init-failures.patch