Skip to contentSkip to conversation

net: lpc_eth: Fix crash on ip link up

PATCH Applied [email protected] 2 participants 2 messages Sep 1, 2014 – Sep 2, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: lpc_eth: Fix crash on ip link up

From: Roland Stigge <[email protected]>

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.

---
Applies to v3.17-rc3

 drivers/net/ethernet/nxp/lpc_eth.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/ethernet/nxp/lpc_eth.c +3 -0
index 8706c0d..a44a03c 100644
@@ -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);
Signature · 1 line
2.1.0
maintainer Applied
#1 lore raw

From: [email protected]
Date: Mon, 1 Sep 2014 13:46:46 +0200

Quoted 10 lines

From: Roland Stigge <[email protected]>

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

Quoted 7 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.

Applied, thanks.