From: Roland Stigge Date: Mon, 1 Sep 2014 11:46:46 +0000 (+0200) Subject: net: lpc_eth: Fix crash on ip link up X-Git-Tag: v4.14-rc1~6886^2~25 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aff88a0695976596b39dcfa65da4896c802c938d;p=platform%2Fkernel%2Flinux-rpi.git 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: Roland Stigge Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/nxp/lpc_eth.c b/drivers/net/ethernet/nxp/lpc_eth.c index 8706c0d..a44a03c 100644 --- a/drivers/net/ethernet/nxp/lpc_eth.c +++ b/drivers/net/ethernet/nxp/lpc_eth.c @@ -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);