diff -urN -x *.orig linux-2.4.24-orig/drivers/net/tulip/tulip_core.c linux-2.4.24/drivers/net/tulip/tulip_core.c --- linux-2.4.24-orig/drivers/net/tulip/tulip_core.c Fri Nov 28 12:26:20 2003 +++ linux-2.4.24/drivers/net/tulip/tulip_core.c Sun Feb 1 20:43:06 2004 @@ -1322,6 +1322,52 @@ } #endif +static int __devinit needs_mac_addr_byte_swapped(struct pci_dev *pdev, + struct net_device *dev) +{ + /* + * Lite-On boards have the mac address byte-swapped. + * + * The code below is checking for the following ethernet MAC + * address combinations (in byte-swapped order): + * + * 00:A0:** + * 00:C0:** + * + * However, only one of these maps directly to a Lite-On + * ethernet vendor code: + * + * 00-A0-CC LITE-ON COMMUNICATIONS, INC. + * + * The other code is probably for Kingston Technology, who + * distributed their own ethernet cards using Lite-On chips + * (confirmed via Google search of "00:C0 lite-on"): + * + * 00-C0-F0 KINGSTON TECHNOLOGY CORP. + * + * Ethernet vendor codes were found here: + * + * http://standards.ieee.org/regauth/oui/index.shtml + */ + if ((dev->dev_addr[0] == 0xA0 || dev->dev_addr[0] == 0xC0) + && dev->dev_addr[1] == 0x00) + return 1; + + /* + * Asante Technologies also produced an ethernet card based on + * the Lite-On chipset. + * + * Check the PCI (sub)vendor and (sub)device instead. + */ + if (pdev->vendor == PCI_VENDOR_ID_LITEON + && pdev->device == PCI_DEVICE_ID_LITEON_LNE100TX + && pdev->subsystem_vendor == PCI_SUBVENDOR_ID_ASANTE + && pdev->subsystem_device == PCI_SUBDEVICE_ID_ASANTE_FAST_10_100_REV_B) + return 1; + + return 0; +} + static int __devinit tulip_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) { @@ -1623,9 +1669,9 @@ sum += ee_data[i + sa_offset]; } } - /* Lite-On boards have the address byte-swapped. */ - if ((dev->dev_addr[0] == 0xA0 || dev->dev_addr[0] == 0xC0) - && dev->dev_addr[1] == 0x00) + /* Boards with the Lite-On LC82C168 chipset have the address + byte-swapped. */ + if (needs_mac_addr_byte_swapped(pdev, dev)) for (i = 0; i < 6; i+=2) { char tmp = dev->dev_addr[i]; dev->dev_addr[i] = dev->dev_addr[i+1]; diff -urN -x *.orig linux-2.4.24-orig/include/linux/pci_ids.h linux-2.4.24/include/linux/pci_ids.h --- linux-2.4.24-orig/include/linux/pci_ids.h Fri Nov 28 12:26:21 2003 +++ linux-2.4.24/include/linux/pci_ids.h Sun Feb 1 20:24:29 2004 @@ -1306,6 +1306,9 @@ #define PCI_VENDOR_ID_LITEON 0x11ad #define PCI_DEVICE_ID_LITEON_LNE100TX 0x0002 +#define PCI_SUBVENDOR_ID_ASANTE 0x128a +#define PCI_SUBDEVICE_ID_ASANTE_FAST_10_100_REV_B 0xf001 + #define PCI_VENDOR_ID_V3 0x11b0 #define PCI_DEVICE_ID_V3_V960 0x0001 #define PCI_DEVICE_ID_V3_V350 0x0001