]> git.baikalelectronics.ru Git - kernel.git/commit
net: dpaa2-switch: phylink_disconnect_phy needs rtnl_lock
authorVladimir Oltean <vladimir.oltean@nxp.com>
Thu, 19 Aug 2021 14:40:18 +0000 (17:40 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 20 Aug 2021 13:34:49 +0000 (14:34 +0100)
commit721df485a26a2f7a271c30f9c92a969879d5603d
tree77a6078fb549ef72ab44f8e9120451d863788801
parent8829a5dccf45c8cd6fa00f4ba51b74779d71152c
net: dpaa2-switch: phylink_disconnect_phy needs rtnl_lock

There is an ASSERT_RTNL in phylink_disconnect_phy which triggers
whenever dpaa2_switch_port_disconnect_mac is called.

To follow the pattern established by dpaa2_eth_disconnect_mac, take the
rtnl_mutex every time we call dpaa2_switch_port_disconnect_mac.

Fixes: 8e9853b6585b ("dpaa2-switch: integrate the MAC endpoint support")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c