openwrt/target/linux/armvirt/patches-6.1/701-v6.2-0008-net-dpaa2-switch-replace-direct-MAC-access-with-dpaa.patch
Mathew McBride 61ec9a8154
armvirt: add SFP support patches for NXP Layerscape DPAA2 platforms
This series resolves a long term issue with Phylink and SFPs on
DPAA2 hardware (LS1088,LS2088,LX2160) where a locking problem
prevented the system from rebooting. Patches solving this
issue existed prior to 6.2 but were not accepted upstream.

See the original series on patchwork:
https://patchwork.kernel.org/project/netdevbpf/cover/20221129141221.872653-1-vladimir.oltean@nxp.com/

And this thread on the Traverse forum:
https://forum.traverse.com.au/t/reboot-command-regression-from-5-10-to-5-15-kernel/133/12

Signed-off-by: Mathew McBride <matt@traverse.com.au>
2023-06-02 11:36:23 +02:00

29 lines
1.0 KiB
Diff

From c838d9fd7e6ba9ddd6006bf0a296396266e9f121 Mon Sep 17 00:00:00 2001
From: Vladimir Oltean <vladimir.oltean@nxp.com>
Date: Tue, 29 Nov 2022 16:12:17 +0200
Subject: [PATCH 10/14] net: dpaa2-switch replace direct MAC access with
dpaa2_switch_port_has_mac()
The helper function will gain a lockdep annotation in a future patch.
Make sure to benefit from it.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Tested-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c
+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c
@@ -189,7 +189,7 @@ static void dpaa2_switch_ethtool_get_sta
dpaa2_switch_ethtool_counters[i].name, err);
}
- if (port_priv->mac)
+ if (dpaa2_switch_port_has_mac(port_priv))
dpaa2_mac_get_ethtool_stats(port_priv->mac, data + i);
}