aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorAndy Fleming <afleming@freescale.com>2010-04-27 19:43:31 -0400
committerDavid S. Miller <davem@davemloft.net>2010-04-27 19:43:31 -0400
commit761ed01b35ca32bfd4166cc3862ae80ee33e3a4b (patch)
treeecd09986e227f2cb30e1033c9daa1ad385845b8f /drivers/net
parentd87ff58fda926fe5cb01214cccf1c72422ac776d (diff)
gianfar: Wait for both RX and TX to stop
When gracefully stopping the controller, the driver was continuing if *either* RX or TX had stopped. We need to wait for both, or the controller could get into an invalid state. Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/gianfar.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index df49af382159..4e97ca182997 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -1511,9 +1511,9 @@ static void gfar_halt_nodisable(struct net_device *dev)
1511 tempval |= (DMACTRL_GRS | DMACTRL_GTS); 1511 tempval |= (DMACTRL_GRS | DMACTRL_GTS);
1512 gfar_write(&regs->dmactrl, tempval); 1512 gfar_write(&regs->dmactrl, tempval);
1513 1513
1514 while (!(gfar_read(&regs->ievent) & 1514 spin_event_timeout(((gfar_read(&regs->ievent) &
1515 (IEVENT_GRSC | IEVENT_GTSC))) 1515 (IEVENT_GRSC | IEVENT_GTSC)) ==
1516 cpu_relax(); 1516 (IEVENT_GRSC | IEVENT_GTSC)), -1, 0);
1517 } 1517 }
1518} 1518}
1519 1519