mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
mlxsw: spectrum: Clear PTP configuration after unregistering the netdevice
commita159e986adupstream. 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. Fixes:8748642751("mlxsw: spectrum: PTP: Support SIOCGHWTSTAMP, SIOCSHWTSTAMP ioctls") Signed-off-by: Amit Cohen <amcohen@nvidia.com> Signed-off-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: Petr Machata <petrm@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
dd236b62d2
commit
a44a1a1421
@@ -1730,9 +1730,9 @@ static void mlxsw_sp_port_remove(struct mlxsw_sp *mlxsw_sp, u8 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);
|
||||
|
||||
Reference in New Issue
Block a user