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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 29 Jul 2009 09:51:57 +0200
From:	Manuel Lauss <manuel.lauss@...glemail.com>
To:	Florian Fainelli <florian@...nwrt.org>
Cc:	David Miller <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH 1/3] au1000_eth: use write accessors

Hi Florian,

On Tue, Jul 28, 2009 at 11:06 PM, Florian Fainelli<florian@...nwrt.org> wrote:
> Hi David,
>
> The next 3 patches apply to on top of the patch series that I
> sent earlier converting au1000_eth to become a platform_driver.
> Thanks !
> --
> From: Florian Fainelli <florian@...nwrt.org>
> This patch replaces all occurences of *aup->enable = val
> by writel(val, &aup->enable)
>
> Signed-off-by: Florian Fainelli <florian@...nwrt.org>
> ---
> diff --git a/drivers/net/au1000_eth.c b/drivers/net/au1000_eth.c
> index 57cc4f6..1f724da 100644
> --- a/drivers/net/au1000_eth.c
> +++ b/drivers/net/au1000_eth.c
> @@ -155,10 +155,10 @@ static void enable_mac(struct net_device *dev, int force_reset)
>        spin_lock_irqsave(&aup->lock, flags);
>
>        if(force_reset || (!aup->mac_enabled)) {
> -               *aup->enable = MAC_EN_CLOCK_ENABLE;
> +               writel(MAC_EN_CLOCK_ENABLE, &aup->enable);
>                au_sync_delay(2);
> -               *aup->enable = (MAC_EN_RESET0 | MAC_EN_RESET1 | MAC_EN_RESET2
> -                               | MAC_EN_CLOCK_ENABLE);
> +               writel((MAC_EN_RESET0 | MAC_EN_RESET1 | MAC_EN_RESET2
> +                       | MAC_EN_CLOCK_ENABLE), &aup->enable);
>                au_sync_delay(2);

While you're at it, please also replace all "au_sync_delay()" with
mmiowb() + msleep()

Thanks!
      Manuel Lauss
--
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