]> 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)
commit91268ffd276894f231671198575684c512e0e6af
tree77a6078fb549ef72ab44f8e9120451d863788801
parenta8abc124e3e9fea0b4960a4e77ccbb8c1a072526
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: dd5cadc64d03 ("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