aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/8139too.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/8139too.c')
-rw-r--r--drivers/net/8139too.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c
index feae7832fc846b..42038c91421cba 100644
--- a/drivers/net/8139too.c
+++ b/drivers/net/8139too.c
@@ -257,7 +257,7 @@ static struct pci_device_id rtl8139_pci_tbl[] = {
{0x018a, 0x0106, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
{0x126c, 0x1211, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
{0x1743, 0x8139, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
- {0x021b, 0x8139, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
+ {0x021b, 0x8139, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8139 },
#ifdef CONFIG_SH_SECUREEDGE5410
/* Bogus 8139 silicon reports 8129 without external PROM :-( */
@@ -970,11 +970,17 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev,
ioaddr = tp->mmio_addr;
assert (ioaddr != NULL);
+#ifdef CONFIG_SH_SECUREEDGE5410
+ /* Don't rely on the eeprom, get MAC from chip. */
+ for (i = 0; i < 6; i++)
+ dev->dev_addr[i] = readb(ioaddr + MAC0 + i);
+#else
addr_len = read_eeprom (ioaddr, 0, 8) == 0x8129 ? 8 : 6;
for (i = 0; i < 3; i++)
((u16 *) (dev->dev_addr))[i] =
le16_to_cpu (read_eeprom (ioaddr, i + 7, addr_len));
memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
+#endif
/* The Rtl8139-specific entries in the device structure. */
dev->open = rtl8139_open;