From: Vladimir Oltean <vladimir.oltean@nxp.com> Date: 2021-08-19 14:40:34
This is fixing two regressions introduced by the recent conversion of
the dpaa2-switch driver to phylink.
Vladimir Oltean (2):
net: dpaa2-switch: phylink_disconnect_phy needs rtnl_lock
net: dpaa2-switch: call dpaa2_switch_port_disconnect_mac on probe
error path
.../ethernet/freescale/dpaa2/dpaa2-switch.c | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
--
2.25.1
From: Vladimir Oltean <vladimir.oltean@nxp.com> Date: 2021-08-19 14:40:35
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>
---
drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c | 4 ++++
1 file changed, 4 insertions(+)
From: Vladimir Oltean <vladimir.oltean@nxp.com> Date: 2021-08-19 14:40:36
Currently when probing returns an error, the netdev is freed but
phylink_disconnect is not called.
Create a common function between the unbind path and the error path,
call it the opposite of dpaa2_switch_probe_port: dpaa2_switch_remove_port,
and call it from both the unbind and the error path.
Fixes: 84cba72956fd ("dpaa2-switch: integrate the MAC endpoint support")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
Note: the dpaa2_switch_remove_port function is placed so far from
dpaa2_switch_probe_port because I wanted to avoid a trivial conflict
with this patch on "net":
https://patchwork.kernel.org/project/netdevbpf/patch/20210819141755.1931423-1-vladimir.oltean@nxp.com/
which moves dpaa2_switch_ctrl_if_teardown around, and this would appear
in the context of the "net-next" patch.
.../ethernet/freescale/dpaa2/dpaa2-switch.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
On Thu, Aug 19, 2021 at 05:40:18PM +0300, Vladimir Oltean wrote:
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>
On Thu, Aug 19, 2021 at 05:40:19PM +0300, Vladimir Oltean wrote:
Currently when probing returns an error, the netdev is freed but
phylink_disconnect is not called.
Create a common function between the unbind path and the error path,
call it the opposite of dpaa2_switch_probe_port: dpaa2_switch_remove_port,
and call it from both the unbind and the error path.
Fixes: 84cba72956fd ("dpaa2-switch: integrate the MAC endpoint support")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Hello:
This series was applied to netdev/net-next.git (refs/heads/master):
On Thu, 19 Aug 2021 17:40:17 +0300 you wrote:
This is fixing two regressions introduced by the recent conversion of
the dpaa2-switch driver to phylink.
Vladimir Oltean (2):
net: dpaa2-switch: phylink_disconnect_phy needs rtnl_lock
net: dpaa2-switch: call dpaa2_switch_port_disconnect_mac on probe
error path
[...]