From 4f24b7217cb3df28b6cbbfc3225b64bd4b950c96 Mon Sep 17 00:00:00 2001 From: Philippe De Muyter Date: Tue, 27 Jun 2006 13:05:33 +1000 Subject: [PATCH] --- yaml --- r: 30860 b: refs/heads/master c: 677177c5319f7079c22d04926c23b31166d7d405 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/net/fec.c | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 2afc218d1218..d46d9655c491 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 67bdd9842430f946213d0482862aae1ed8fd3ad0 +refs/heads/master: 677177c5319f7079c22d04926c23b31166d7d405 diff --git a/trunk/drivers/net/fec.c b/trunk/drivers/net/fec.c index bd6983d1afba..16fc12fe933c 100644 --- a/trunk/drivers/net/fec.c +++ b/trunk/drivers/net/fec.c @@ -22,7 +22,7 @@ * Copyright (c) 2001-2005 Greg Ungerer (gerg@snapgear.com) * * 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 @@ -2420,9 +2420,16 @@ fec_stop(struct net_device *dev) fep = netdev_priv(dev); fecp = fep->hwp; - fecp->fec_x_cntrl = 0x01; /* Graceful transmit stop */ - - while(!(fecp->fec_ievent & FEC_ENET_GRA)); + /* + ** We cannot expect a graceful transmit stop without link !!! + */ + 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. */