netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Timur Tabi <timur.tabi@gmail.com>
To: Andy Fleming <afleming@freescale.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH] gianfar: Wait for both RX and TX to stop
Date: Mon, 19 Apr 2010 16:08:51 -0500	[thread overview]
Message-ID: <m2ged82fe3e1004191408p53f19073x106ef56677c8a5df@mail.gmail.com> (raw)
In-Reply-To: <1271632401-2472-1-git-send-email-afleming@freescale.com>

On Sun, Apr 18, 2010 at 6:13 PM, Andy Fleming <afleming@freescale.com> wrote:

> -               while (!(gfar_read(&regs->ievent) &
> -                        (IEVENT_GRSC | IEVENT_GTSC)))
> +               while ((gfar_read(&regs->ievent) &
> +                        (IEVENT_GRSC | IEVENT_GTSC)) !=
> +                        (IEVENT_GRSC | IEVENT_GTSC))
>                        cpu_relax();

How about using spin_event_timeout()?  It streamlines this process and
includes a timeout.

The U-Boot version of this code doesn't have a timeout either, but
spin_event_timeout() is not available in U-Boot.

-- 
Timur Tabi
Linux kernel developer at Freescale

  reply	other threads:[~2010-04-19 21:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-18 23:13 [PATCH] gianfar: Wait for both RX and TX to stop Andy Fleming
2010-04-19 21:08 ` Timur Tabi [this message]
2010-04-20  4:43   ` Kumar Gala
2010-04-20 15:01     ` Timur Tabi
2010-04-20 15:59       ` Timur Tabi
2010-04-21  1:06       ` David Miller
2010-04-21  4:22         ` Kumar Gala
2010-04-21  5:36           ` David Miller
2010-04-21 12:17             ` Kumar Gala
2010-04-21 14:33               ` Timur Tabi
2010-04-21 19:13                 ` Kumar Gala
2010-04-21 21:33                   ` David Miller
2010-04-20  4:44 ` Kumar Gala
2010-04-20  8:18   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2ged82fe3e1004191408p53f19073x106ef56677c8a5df@mail.gmail.com \
    --to=timur.tabi@gmail.com \
    --cc=afleming@freescale.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).