mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-04 18:19:28 +09:00
net: dsa: felix: don't deinitialize unused ports
[ Upstream commit42b5adbbac] 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. Fixes:e5fb512d81("net: mscc: ocelot: deinitialize only initialized ports") Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
51b1868b71
commit
100676d5c4
@@ -638,8 +638,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);
|
||||
|
||||
Reference in New Issue
Block a user