Commit aff88a06 authored by Roland Stigge's avatar Roland Stigge Committed by David S. Miller

net: lpc_eth: Fix crash on ip link up

When a link is already up, the following sequence makes the kernel
block completely:

  ip link set dev eth0 down
  ip link set dev eth0 up

This is because on suspended phy, the following lines

  __lpc_eth_reset(pldat);
  __lpc_eth_init(pldat);

make the LPC ethernet core block (see LPC32x0 manual). The PHY needs to be
(re-)activated low-level first.
Signed-off-by: default avatarRoland Stigge <stigge@antcom.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0486a063
...@@ -1220,6 +1220,9 @@ static int lpc_eth_open(struct net_device *ndev) ...@@ -1220,6 +1220,9 @@ static int lpc_eth_open(struct net_device *ndev)
__lpc_eth_clock_enable(pldat, true); __lpc_eth_clock_enable(pldat, true);
/* Suspended PHY makes LPC ethernet core block, so resume now */
phy_resume(pldat->phy_dev);
/* Reset and initialize */ /* Reset and initialize */
__lpc_eth_reset(pldat); __lpc_eth_reset(pldat);
__lpc_eth_init(pldat); __lpc_eth_init(pldat);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment