dpaa2-eth: unregister the netdev before disconnecting from the PHY
authorRobert-Ionut Alexa <robert-ionut.alexa@nxp.com>
Wed, 9 Feb 2022 15:57:43 +0000 (17:57 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Feb 2022 11:56:31 +0000 (12:56 +0100)
commit12e067a4d98f1f74ac4efa632f40b6544b10aed1
treeaa20cef5fb08f09821903c666088c2775d085c80
parent29b25d5f8f30810a98861ce1d251dd97ff634753
dpaa2-eth: unregister the netdev before disconnecting from the PHY

[ Upstream commit 9ccc6e0c8959a019bb40f6b18704b142c04b19a8 ]

The netdev should be unregistered before we are disconnecting from the
MAC/PHY so that the dev_close callback is called and the PHY and the
phylink workqueues are actually stopped before we are disconnecting and
destroying the phylink instance.

Fixes: 719479230893 ("dpaa2-eth: add MAC/PHY support through phylink")
Signed-off-by: Robert-Ionut Alexa <robert-ionut.alexa@nxp.com>
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c