[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <68CA249E-C6E9-43EA-A132-C48DB9E2384D@kernel.crashing.org>
Date: Mon, 19 Apr 2010 23:44:49 -0500
From: Kumar Gala <galak@...nel.crashing.org>
To: David Miller <davem@...emloft.net>
Cc: Netdev <netdev@...r.kernel.org>,
Andy Fleming <afleming@...escale.com>
Subject: Re: [PATCH] gianfar: Wait for both RX and TX to stop
On Apr 18, 2010, at 6:13 PM, Andy Fleming wrote:
> 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@...escale.com>
> ---
> drivers/net/gianfar.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
Acked-by: Kumar Gala <galak@...nel.crashing.org>
(please pick this up for 2.6.34, fixes an annoying bug).
- k
>
> diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
> index 032073d..6038397 100644
> --- a/drivers/net/gianfar.c
> +++ b/drivers/net/gianfar.c
> @@ -1571,8 +1571,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)))
> + while ((gfar_read(®s->ievent) &
> + (IEVENT_GRSC | IEVENT_GTSC)) !=
> + (IEVENT_GRSC | IEVENT_GTSC))
> cpu_relax();
> }
> }
> --
> 1.6.5.2.g6ff9a
>
> --
> 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
--
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