net: nxp: lpc_eth.c: avoid hang when bringing interface down
authorTrevor Woerner <twoerner@gmail.com>
Sun, 24 Oct 2021 17:50:02 +0000 (13:50 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Nov 2021 18:48:23 +0000 (19:48 +0100)
commit44e8c93e1e4960566b34beb85b73f5ab4a6b6e76
tree84e384272bdeac36ef623a90212eb6bf20e4a874
parentc2af2092c9bbb33c0131a8aca5b8f6db7c223d08
net: nxp: lpc_eth.c: avoid hang when bringing interface down

commit ace19b992436a257d9a793672e57abc28fe83e2e upstream.

A hard hang is observed whenever the ethernet interface is brought
down. If the PHY is stopped before the LPC core block is reset,
the SoC will hang. Comparing lpc_eth_close() and lpc_eth_open() I
re-arranged the ordering of the functions calls in lpc_eth_close() to
reset the hardware before stopping the PHY.
Fixes: b7370112f519 ("lpc32xx: Added ethernet driver")
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Acked-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/nxp/lpc_eth.c