FAILED: patch "[PATCH] mlxsw: spectrum: Clear PTP configuration after unregistering" failed to apply to 5.4-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 5.4-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From a159e986ad26d3f35c0157ac92760ba5e44e6785 Mon Sep 17 00:00:00 2001
From: Amit Cohen <[email protected]>
Date: Fri, 12 Aug 2022 17:32:01 +0200
Subject: [PATCH] mlxsw: spectrum: Clear PTP configuration after unregistering
the netdevice
Currently as part of removing port, PTP API is called to clear the existing configuration and set the 'rx_filter' and 'tx_type' to zero. The clearing is done before unregistering the netdevice, which means that there is a window of time in which the user can reconfigure PTP in the port, and this configuration will not be cleared.
Reorder the operations, clear PTP configuration after unregistering the netdevice.
drivers/net/ethernet/mellanox/mlxsw/spectrum.c +1 -1
@@ -1897,9 +1897,9 @@ static void mlxsw_sp_port_remove(struct mlxsw_sp *mlxsw_sp, u16 local_port)cancel_delayed_work_sync (&mlxsw_sp_port->periodic_hw_stats.update_dw);cancel_delayed_work_sync (&mlxsw_sp_port->ptp.shaper_dw); -mlxsw_sp_port_ptp_clear (mlxsw_sp_port);mlxsw_core_port_clear (mlxsw_sp->core, local_port, mlxsw_sp);unregister_netdev (mlxsw_sp_port->dev);/* This calls ndo_stop */ +mlxsw_sp_port_ptp_clear (mlxsw_sp_port);mlxsw_sp_port_vlan_classification_set (mlxsw_sp_port, true, true); mlxsw_sp->ports[local_port] =NULL ;mlxsw_sp_port_vlan_flush (mlxsw_sp_port, true);