diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/sis190.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c index 7eab072ae792..c63f484f9072 100644 --- a/drivers/net/sis190.c +++ b/drivers/net/sis190.c | |||
@@ -1549,28 +1549,31 @@ static int __devinit sis190_get_mac_addr_from_eeprom(struct pci_dev *pdev, | |||
1549 | } | 1549 | } |
1550 | 1550 | ||
1551 | /** | 1551 | /** |
1552 | * sis190_get_mac_addr_from_apc - Get MAC address for SiS965 model | 1552 | * sis190_get_mac_addr_from_apc - Get MAC address for SiS96x model |
1553 | * @pdev: PCI device | 1553 | * @pdev: PCI device |
1554 | * @dev: network device to get address for | 1554 | * @dev: network device to get address for |
1555 | * | 1555 | * |
1556 | * SiS965 model, use APC CMOS RAM to store MAC address. | 1556 | * SiS96x model, use APC CMOS RAM to store MAC address. |
1557 | * APC CMOS RAM is accessed through ISA bridge. | 1557 | * APC CMOS RAM is accessed through ISA bridge. |
1558 | * MAC address is read into @net_dev->dev_addr. | 1558 | * MAC address is read into @net_dev->dev_addr. |
1559 | */ | 1559 | */ |
1560 | static int __devinit sis190_get_mac_addr_from_apc(struct pci_dev *pdev, | 1560 | static int __devinit sis190_get_mac_addr_from_apc(struct pci_dev *pdev, |
1561 | struct net_device *dev) | 1561 | struct net_device *dev) |
1562 | { | 1562 | { |
1563 | static const u16 __devinitdata ids[] = { 0x0965, 0x0966, 0x0968 }; | ||
1563 | struct sis190_private *tp = netdev_priv(dev); | 1564 | struct sis190_private *tp = netdev_priv(dev); |
1564 | struct pci_dev *isa_bridge; | 1565 | struct pci_dev *isa_bridge; |
1565 | u8 reg, tmp8; | 1566 | u8 reg, tmp8; |
1566 | int i; | 1567 | unsigned int i; |
1567 | 1568 | ||
1568 | net_probe(tp, KERN_INFO "%s: Read MAC address from APC.\n", | 1569 | net_probe(tp, KERN_INFO "%s: Read MAC address from APC.\n", |
1569 | pci_name(pdev)); | 1570 | pci_name(pdev)); |
1570 | 1571 | ||
1571 | isa_bridge = pci_get_device(PCI_VENDOR_ID_SI, 0x0965, NULL); | 1572 | for (i = 0; i < ARRAY_SIZE(ids); i++) { |
1572 | if (!isa_bridge) | 1573 | isa_bridge = pci_get_device(PCI_VENDOR_ID_SI, ids[i], NULL); |
1573 | isa_bridge = pci_get_device(PCI_VENDOR_ID_SI, 0x0966, NULL); | 1574 | if (isa_bridge) |
1575 | break; | ||
1576 | } | ||
1574 | 1577 | ||
1575 | if (!isa_bridge) { | 1578 | if (!isa_bridge) { |
1576 | net_probe(tp, KERN_INFO "%s: Can not find ISA bridge.\n", | 1579 | net_probe(tp, KERN_INFO "%s: Can not find ISA bridge.\n", |