From: Morten H. Larsen Date: Tue, 15 Jun 2010 17:24:58 +0000 (-0400) Subject: alpha: Fix de2104x driver failing to readout MAC address correctly X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=84cc1535cb9043ea1921b81cb086138c0f2dc2b9;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Matt Turner --- 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, }; static u16 t21041_csr15[] = { 0x0008, 0x0006, 0x000E, 0x0008, 0x0008, }; -#define dr32(reg) readl(de->regs + (reg)) -#define dw32(reg,val) writel((val), de->regs + (reg)) +#define dr32(reg) ioread32(de->regs + (reg)) +#define dw32(reg, val) iowrite32((val), de->regs + (reg)) 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) int value, boguscnt = 100000; do { value = dr32(ROMCmd); + rmb(); } while (value < 0 && --boguscnt > 0); de->dev->dev_addr[i] = value; udelay(1);