diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 3634223..eab85fa 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c @@ -147,6 +147,7 @@ #include #include #include +#include #include #include @@ -4992,6 +4993,26 @@ static int nv_close(struct net_device *dev) return 0; } +static int nv_reversed_macaddr(void) +{ + static const struct dmi_system_id sysids[] = { + { + .ident = "", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, ""), + DMI_MATCH(DMI_PRODUCT_NAME, ""), + }, + }, + + { } /* terminate list */ + }; + + if (dmi_check_system(sysids)) + return 1; + + return 0; +} + static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_id *id) { struct net_device *dev; @@ -5187,8 +5208,9 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i /* check the workaround bit for correct mac address order */ txreg = readl(base + NvRegTransmitPoll); - if ((txreg & NVREG_TRANSMITPOLL_MAC_ADDR_REV) || - (id->driver_data & DEV_HAS_CORRECT_MACADDR)) { + if (((txreg & NVREG_TRANSMITPOLL_MAC_ADDR_REV) || + (id->driver_data & DEV_HAS_CORRECT_MACADDR))) && + (!nv_reversed_macaddr())) { /* mac address is already in correct order */ dev->dev_addr[0] = (np->orig_mac[0] >> 0) & 0xff; dev->dev_addr[1] = (np->orig_mac[0] >> 8) & 0xff;