OSDN Git Service

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)
commitd52ef12f7d6c016f3b249db95af33f725e3dd065
tree77a6078fb549ef72ab44f8e9120451d863788801
parent6985157ce8ee8a02e3899226ac4df351387c3f52
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: 84cba72956fd ("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