diff options
author | Francois Romieu <romieu@fr.zoreil.com> | 2007-12-04 16:58:41 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-23 06:11:43 -0500 |
commit | ebc71647309539aaf9088f4e41b9f364cce8f7eb (patch) | |
tree | 338f3b9386aae940c3e43ac9d0c32a1358b45a26 /drivers/net | |
parent | f945fa7ad9c12a3356a3de7fb2143ccc2f2c3bca (diff) |
sis190: add cmos ram access code for the SiS19x/968 chipset pair
More work is needed to handle correctly the PHY of the new devices
when connected to a 10Mb link but this change already helps some
users as is.
Fix for:
http://bugzilla.kernel.org/show_bug.cgi?id=9467
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: K.M. Liu <kmliu@sis.com.tw>
Cc: J. Gleacher <jgleacher@yahoo.com>
Cc: Alexandre Penasso Teixeira <alexandre@keepsoftware.com>
Cc: Arliton Rocha <arliton@gmail.com>
Cc: Juan Jose Pablos <juanjo@apertus.es>
Cc: Wipat Srutiprom <wipat.s@psu.ac.th>
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", |