lkml.org 
[lkml]   [2014]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] net: lpc_eth: Fix crash on ip link up
Date
From: Roland Stigge <stigge@antcom.de>

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>
---
Applies to v3.17-rc3

drivers/net/ethernet/nxp/lpc_eth.c | 3 +++
1 file changed, 3 insertions(+)

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);
--
2.1.0


\
 
 \ /
  Last update: 2014-09-01 14:21    [W:0.031 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site