diff options
author | Morten H. Larsen <m-larsen@post6.tele.dk> | 2010-06-15 13:24:58 -0400 |
---|---|---|
committer | Matt Turner <mattst88@gmail.com> | 2010-06-15 14:19:08 -0400 |
commit | 84cc1535cb9043ea1921b81cb086138c0f2dc2b9 (patch) | |
tree | ecbd1c6f3a341863a33094dafc1a7f5fdecc0efd /drivers/net/tulip | |
parent | 932e0c201d28a728e25d3b641aa95bd28ceb08b4 (diff) |
alpha: Fix de2104x driver failing to readout MAC address correctly
This patch fixes a missing read memory barrier that is needed for the
driver to readout the MAC address correctly from the on-board ROM.
Also it replaces the use of the deprecated functions readl()/writel().
Signed-off-by: Morten H. Larsen <m-larsen@post6.tele.dk>
Signed-off-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'drivers/net/tulip')
-rw-r--r-- | drivers/net/tulip/de2104x.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c index c0e70006374e..06b552fca63d 100644 --- a/drivers/net/tulip/de2104x.c +++ b/drivers/net/tulip/de2104x.c | |||
@@ -367,8 +367,8 @@ static u16 t21041_csr14[] = { 0xFFFF, 0xF7FD, 0xF7FD, 0x6F3F, 0x6F3D, }; | |||
367 | static u16 t21041_csr15[] = { 0x0008, 0x0006, 0x000E, 0x0008, 0x0008, }; | 367 | static u16 t21041_csr15[] = { 0x0008, 0x0006, 0x000E, 0x0008, 0x0008, }; |
368 | 368 | ||
369 | 369 | ||
370 | #define dr32(reg) readl(de->regs + (reg)) | 370 | #define dr32(reg) ioread32(de->regs + (reg)) |
371 | #define dw32(reg,val) writel((val), de->regs + (reg)) | 371 | #define dw32(reg, val) iowrite32((val), de->regs + (reg)) |
372 | 372 | ||
373 | 373 | ||
374 | static void de_rx_err_acct (struct de_private *de, unsigned rx_tail, | 374 | static void de_rx_err_acct (struct de_private *de, unsigned rx_tail, |
@@ -1706,6 +1706,7 @@ static void __devinit de21040_get_mac_address (struct de_private *de) | |||
1706 | int value, boguscnt = 100000; | 1706 | int value, boguscnt = 100000; |
1707 | do { | 1707 | do { |
1708 | value = dr32(ROMCmd); | 1708 | value = dr32(ROMCmd); |
1709 | rmb(); | ||
1709 | } while (value < 0 && --boguscnt > 0); | 1710 | } while (value < 0 && --boguscnt > 0); |
1710 | de->dev->dev_addr[i] = value; | 1711 | de->dev->dev_addr[i] = value; |
1711 | udelay(1); | 1712 | udelay(1); |