Commit 677177c5 authored by Philippe De Muyter's avatar Philippe De Muyter Committed by Linus Torvalds

[PATCH] m68knommu: avoid fec driver hang when link disappears

Avoid requesting a `Graceful Transmit Stop' when link has disappeared,
because that request cannot complete without link.
Signed-off-by: default avatarGreg Ungerer <gerg@uclinux.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 67bdd984
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
* Copyright (c) 2001-2005 Greg Ungerer (gerg@snapgear.com) * Copyright (c) 2001-2005 Greg Ungerer (gerg@snapgear.com)
* *
* Bug fixes and cleanup by Philippe De Muyter (phdm@macqel.be) * Bug fixes and cleanup by Philippe De Muyter (phdm@macqel.be)
* Copyright (c) 2004-2005 Macq Electronique SA. * Copyright (c) 2004-2006 Macq Electronique SA.
*/ */
#include <linux/config.h> #include <linux/config.h>
...@@ -2420,9 +2420,16 @@ fec_stop(struct net_device *dev) ...@@ -2420,9 +2420,16 @@ fec_stop(struct net_device *dev)
fep = netdev_priv(dev); fep = netdev_priv(dev);
fecp = fep->hwp; fecp = fep->hwp;
fecp->fec_x_cntrl = 0x01; /* Graceful transmit stop */ /*
** We cannot expect a graceful transmit stop without link !!!
while(!(fecp->fec_ievent & FEC_ENET_GRA)); */
if (fep->link)
{
fecp->fec_x_cntrl = 0x01; /* Graceful transmit stop */
udelay(10);
if (!(fecp->fec_ievent & FEC_ENET_GRA))
printk("fec_stop : Graceful transmit stop did not complete !\n");
}
/* Whack a reset. We should wait for this. /* Whack a reset. We should wait for this.
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment