* [PATCH resend] r6040: fix bad usage of udelay
@ 2008-09-03 14:50 Florian Fainelli
2008-09-13 19:29 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Florian Fainelli @ 2008-09-03 14:50 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Francois Romieu, netdev
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 */
adrp = (u16 *) dev->dev_addr;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH resend] r6040: fix bad usage of udelay
2008-09-03 14:50 [PATCH resend] r6040: fix bad usage of udelay Florian Fainelli
@ 2008-09-13 19:29 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2008-09-13 19:29 UTC (permalink / raw)
To: Florian Fainelli; +Cc: Francois Romieu, netdev
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-09-13 19:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-03 14:50 [PATCH resend] r6040: fix bad usage of udelay Florian Fainelli
2008-09-13 19:29 ` Jeff Garzik
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).