net: dsa: felix: don't deinitialize unused ports
Subsystems (4)
Vladimir Oltean
maintainerPATCH 1/1 net: dsa: felix: don't deinitialize unused ports
From: Vladimir Oltean <[email protected]>
ocelot_init_port is called only if dsa_is_unused_port == false, however ocelot_deinit_port is called unconditionally. This causes a warning in the skb_queue_purge inside ocelot_deinit_port saying that the spin lock protecting ocelot_port->tx_skbs was not initialized.
--- drivers/net/dsa/ocelot/felix.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/net/dsa/ocelot/felix.c +5 -1
@@ -1262,8 +1262,12 @@ static void felix_teardown(struct dsa_switch *ds)ocelot_deinit_timestamp (ocelot);ocelot_deinit (ocelot); -for (port =0 ; port < ocelot->num_phys_ports; port++) +for (port =0 ; port < ocelot->num_phys_ports; port++) { +if (dsa_is_unused_port (ds, port)) +continue ; +ocelot_deinit_port (ocelot, port); + }if (felix->info->mdio_bus_free) felix->info->mdio_bus_free (ocelot);
Signature · 1 line
2.25.1
This patch was applied to netdev/net-next.git (refs/heads/master):
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
Quoted 8 lines · On Tue, 16 Feb 2021 13:14:46 +0200 you wrote:
From: Vladimir Oltean <[email protected]>
ocelot_init_portis called only ifdsa_is_unused_port== false, howeverocelot_deinit_portis called unconditionally. This causes a warning in theskb_queue_purgeinsideocelot_deinit_portsaying that the spin lock protectingocelot_port->tx_skbswas not initialized.[...]
Here is the summary with links:
- [net] net: dsa: felix: don't deinitialize unused ports
https://git.kernel.org/netdev/net-next/c/42b5adbbac03
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html