[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <E1X4Tkg-0005nu-Mj@rmk-PC.arm.linux.org.uk>
Date: Tue, 08 Jul 2014 12:40:02 +0100
From: Russell King <rmk+kernel@....linux.org.uk>
To: "David S. Miller" <davem@...emloft.net>
Cc: netdev@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: [PATCH B 02/10] net: fec: ensure fec_enet_close() copes with resume
failure
When the FEC is suspended, the device is detached. Upon resume failure,
the device is left in detached mode, possibly with some of the required
clocks not running. We don't want to be poking the device in that state
because as it may cause bus errors.
If the device is marked detached, avoid calling fec_stop().
This depends upon: "net:fec: improve safety of suspend/resume paths"
Acked-by: Fugang Duan <B38611@...escale.com>
Signed-off-by: Russell King <rmk+kernel@....linux.org.uk>
---
drivers/net/ethernet/freescale/fec_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 1cd71a8d9996..03785cd14b7c 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -2197,10 +2197,10 @@ fec_enet_close(struct net_device *ndev)
phy_stop(fep->phy_dev);
- /* Don't know what to do yet. */
napi_disable(&fep->napi);
netif_tx_disable(ndev);
- fec_stop(ndev);
+ if (netif_device_present(ndev))
+ fec_stop(ndev);
phy_disconnect(fep->phy_dev);
fep->phy_dev = NULL;
--
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists