mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-20 06:08:08 +00:00
40b02a2301
Now that the armvirt target supports real hardware, not just VMs, thanks to the addition of EFI, rename it to something more appropriate. 'armsr' (Arm SystemReady) was chosen after the name of the Arm standards program. The 32 and 64 bit targets have also been renamed armv7 and armv8 respectively, to allow future profiles where required (such as armv9). See https://developer.arm.com/documentation/102858/0100/Introduction for more information. Signed-off-by: Mathew McBride <matt@traverse.com.au>
51 lines
1.6 KiB
Diff
51 lines
1.6 KiB
Diff
From 095ef388f714d622aa503fcccf20dc4095b72762 Mon Sep 17 00:00:00 2001
|
|
From: Vladimir Oltean <vladimir.oltean@nxp.com>
|
|
Date: Tue, 29 Nov 2022 16:12:13 +0200
|
|
Subject: [PATCH 06/14] net: dpaa2-mac: remove defensive check in
|
|
dpaa2_mac_disconnect()
|
|
|
|
dpaa2_mac_disconnect() will only be called with a NULL mac->phylink if
|
|
dpaa2_mac_connect() failed, or was never called.
|
|
|
|
The callers are these:
|
|
|
|
dpaa2_eth_disconnect_mac():
|
|
|
|
if (dpaa2_eth_is_type_phy(priv))
|
|
dpaa2_mac_disconnect(priv->mac);
|
|
|
|
dpaa2_switch_port_disconnect_mac():
|
|
|
|
if (dpaa2_switch_port_is_type_phy(port_priv))
|
|
dpaa2_mac_disconnect(port_priv->mac);
|
|
|
|
priv->mac can be NULL, but in that case, dpaa2_eth_is_type_phy() returns
|
|
false, and dpaa2_mac_disconnect() is never called. Similar for
|
|
dpaa2-switch.
|
|
|
|
When priv->mac is non-NULL, it means that dpaa2_mac_connect() returned
|
|
zero (success), and therefore, priv->mac->phylink is also a valid
|
|
pointer.
|
|
|
|
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
|
|
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
|
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-mac.c | 3 ---
|
|
1 file changed, 3 deletions(-)
|
|
|
|
--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
|
|
+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
|
|
@@ -446,9 +446,6 @@ err_pcs_destroy:
|
|
|
|
void dpaa2_mac_disconnect(struct dpaa2_mac *mac)
|
|
{
|
|
- if (!mac->phylink)
|
|
- return;
|
|
-
|
|
phylink_disconnect_phy(mac->phylink);
|
|
phylink_destroy(mac->phylink);
|
|
dpaa2_pcs_destroy(mac);
|