netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: Florian Fainelli <florian.fainelli@telecomint.eu>
Cc: Francois Romieu <romieu@fr.zoreil.com>, netdev@vger.kernel.org
Subject: Re: [PATCH resend] r6040: fix bad usage of udelay
Date: Sat, 13 Sep 2008 15:29:59 -0400	[thread overview]
Message-ID: <48CC14B7.5090304@garzik.org> (raw)
In-Reply-To: <200809031650.03513.florian.fainelli@telecomint.eu>

Florian Fainelli wrote:
> Hi Francois, Jeff,
> 
> This patch applies to the patch sent previously entitled :
> [PATCH] r6040: remove unused includes.
> 
> Thanks.
> --
> From: Florian Fainelli <florian.fainelli@telecomint.eu>
> Subject: [PATCH resend] r6040: fix bad usage of udelay
> 
> This patch fixes the bad usage of udelay(5000), which in turns is a
> mdelay(5). It causes compilation for ARM where udelay maximum value
> is checked.
> 
> Reported-by: Martin Michlmayr <tbm@cyrius.com>
> Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
> ---
> diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c
> index d453987..d837bef 100644
> --- a/drivers/net/r6040.c
> +++ b/drivers/net/r6040.c
> @@ -364,7 +364,7 @@ static void r6040_init_mac_regs(struct net_device *dev)
>  	/* Reset internal state machine */
>  	iowrite16(2, ioaddr + MAC_SM);
>  	iowrite16(0, ioaddr + MAC_SM);
> -	udelay(5000);
> +	mdelay(5);
>  
>  	/* MAC Bus Control Register */
>  	iowrite16(MBCR_DEFAULT, ioaddr + MBCR);
> @@ -800,7 +800,7 @@ static void r6040_mac_address(struct net_device *dev)
>  	iowrite16(0x01, ioaddr + MCR1); /* Reset MAC */
>  	iowrite16(2, ioaddr + MAC_SM); /* Reset internal state machine */
>  	iowrite16(0, ioaddr + MAC_SM);
> -	udelay(5000);
> +	mdelay(5);
>  
>  	/* Restore MAC Address */

applied



      reply	other threads:[~2008-09-13 19:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-03 14:50 [PATCH resend] r6040: fix bad usage of udelay Florian Fainelli
2008-09-13 19:29 ` Jeff Garzik [this message]

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=48CC14B7.5090304@garzik.org \
    --to=jeff@garzik.org \
    --cc=florian.fainelli@telecomint.eu \
    --cc=netdev@vger.kernel.org \
    --cc=romieu@fr.zoreil.com \
    /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).