lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m2ged82fe3e1004191408p53f19073x106ef56677c8a5df@mail.gmail.com>
Date:	Mon, 19 Apr 2010 16:08:51 -0500
From:	Timur Tabi <timur.tabi@...il.com>
To:	Andy Fleming <afleming@...escale.com>
Cc:	davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH] gianfar: Wait for both RX and TX to stop

On Sun, Apr 18, 2010 at 6:13 PM, Andy Fleming <afleming@...escale.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
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ