Commit 7a0907bd authored by Michael Karcher's avatar Michael Karcher Committed by David S. Miller

net-next: ax88796: Fix MAC address reading

To read the MAC address from the (virtual) SAprom, the remote DMA
unit needs to be set up like for every other process access to card-local
memory.
Signed-off-by: default avatarMichael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
Signed-off-by: default avatarMichael Schmitz <schmitzmic@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 31dd83b9
...@@ -669,10 +669,16 @@ static int ax_init_dev(struct net_device *dev) ...@@ -669,10 +669,16 @@ static int ax_init_dev(struct net_device *dev)
if (ax->plat->flags & AXFLG_HAS_EEPROM) { if (ax->plat->flags & AXFLG_HAS_EEPROM) {
unsigned char SA_prom[32]; unsigned char SA_prom[32];
ei_outb(6, ioaddr + EN0_RCNTLO);
ei_outb(0, ioaddr + EN0_RCNTHI);
ei_outb(0, ioaddr + EN0_RSARLO);
ei_outb(0, ioaddr + EN0_RSARHI);
ei_outb(E8390_RREAD + E8390_START, ioaddr + NE_CMD);
for (i = 0; i < sizeof(SA_prom); i += 2) { for (i = 0; i < sizeof(SA_prom); i += 2) {
SA_prom[i] = ei_inb(ioaddr + NE_DATAPORT); SA_prom[i] = ei_inb(ioaddr + NE_DATAPORT);
SA_prom[i + 1] = ei_inb(ioaddr + NE_DATAPORT); SA_prom[i + 1] = ei_inb(ioaddr + NE_DATAPORT);
} }
ei_outb(ENISR_RDC, ioaddr + EN0_ISR); /* Ack intr. */
if (ax->plat->wordlength == 2) if (ax->plat->wordlength == 2)
for (i = 0; i < 16; i++) for (i = 0; i < 16; i++)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment