Skip to content

Commit

Permalink
net: lpc_eth: Fix crash on ip link up
Browse files Browse the repository at this point in the history
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: Roland Stigge <stigge@antcom.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Roland Stigge authored and David S. Miller committed Sep 2, 2014
1 parent 0486a06 commit aff88a0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/ethernet/nxp/lpc_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -1220,6 +1220,9 @@ static int lpc_eth_open(struct net_device *ndev)

__lpc_eth_clock_enable(pldat, true);

/* Suspended PHY makes LPC ethernet core block, so resume now */
phy_resume(pldat->phy_dev);

/* Reset and initialize */
__lpc_eth_reset(pldat);
__lpc_eth_init(pldat);
Expand Down

0 comments on commit aff88a0

Please sign in to comment.