Gitweb: http://git.kernel.org/linus/761ed01b35ca32bfd4166cc3862ae80ee33e3a4b Commit: 761ed01b35ca32bfd4166cc3862ae80ee33e3a4b Parent: d87ff58fda926fe5cb01214cccf1c72422ac776d Author: Andy Fleming <afleming@freescale.com> AuthorDate: Tue Apr 27 16:43:31 2010 -0700 Committer: David S. Miller <davem@davemloft.net> CommitDate: Tue Apr 27 16:43:31 2010 -0700 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> --- drivers/net/gianfar.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index df49af3..4e97ca1 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c @@ -1511,9 +1511,9 @@ static void gfar_halt_nodisable(struct net_device *dev) tempval |= (DMACTRL_GRS | DMACTRL_GTS); gfar_write(®s->dmactrl, tempval); - while (!(gfar_read(®s->ievent) & - (IEVENT_GRSC | IEVENT_GTSC))) - cpu_relax(); + spin_event_timeout(((gfar_read(®s->ievent) & + (IEVENT_GRSC | IEVENT_GTSC)) == + (IEVENT_GRSC | IEVENT_GTSC)), -1, 0); } } -- To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
