Skip to content

Commit

Permalink
r6040: fix bad usage of udelay
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  • Loading branch information
Florian Fainelli authored and Jeff Garzik committed Sep 24, 2008
1 parent 31b7602 commit c1d6993
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/r6040.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,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);
Expand Down Expand Up @@ -806,7 +806,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;
Expand Down

0 comments on commit c1d6993

Please sign in to comment.