aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sis190.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/sis190.c')
-rw-r--r--drivers/net/sis190.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c
index 7eab072ae79..b570402f7fe 100644
--- a/drivers/net/sis190.c
+++ b/drivers/net/sis190.c
@@ -372,7 +372,7 @@ static void __mdio_cmd(void __iomem *ioaddr, u32 ctl)
372 msleep(1); 372 msleep(1);
373 } 373 }
374 374
375 if (i > 999) 375 if (i > 99)
376 printk(KERN_ERR PFX "PHY command failed !\n"); 376 printk(KERN_ERR PFX "PHY command failed !\n");
377} 377}
378 378
@@ -847,10 +847,8 @@ static void sis190_soft_reset(void __iomem *ioaddr)
847{ 847{
848 SIS_W32(IntrControl, 0x8000); 848 SIS_W32(IntrControl, 0x8000);
849 SIS_PCI_COMMIT(); 849 SIS_PCI_COMMIT();
850 msleep(1);
851 SIS_W32(IntrControl, 0x0); 850 SIS_W32(IntrControl, 0x0);
852 sis190_asic_down(ioaddr); 851 sis190_asic_down(ioaddr);
853 msleep(1);
854} 852}
855 853
856static void sis190_hw_start(struct net_device *dev) 854static void sis190_hw_start(struct net_device *dev)
@@ -1041,8 +1039,6 @@ static int sis190_open(struct net_device *dev)
1041 if (rc < 0) 1039 if (rc < 0)
1042 goto err_free_rx_1; 1040 goto err_free_rx_1;
1043 1041
1044 INIT_WORK(&tp->phy_task, sis190_phy_task);
1045
1046 sis190_request_timer(dev); 1042 sis190_request_timer(dev);
1047 1043
1048 rc = request_irq(dev->irq, sis190_interrupt, IRQF_SHARED, dev->name, dev); 1044 rc = request_irq(dev->irq, sis190_interrupt, IRQF_SHARED, dev->name, dev);
@@ -1549,28 +1545,31 @@ static int __devinit sis190_get_mac_addr_from_eeprom(struct pci_dev *pdev,
1549} 1545}
1550 1546
1551/** 1547/**
1552 * sis190_get_mac_addr_from_apc - Get MAC address for SiS965 model 1548 * sis190_get_mac_addr_from_apc - Get MAC address for SiS96x model
1553 * @pdev: PCI device 1549 * @pdev: PCI device
1554 * @dev: network device to get address for 1550 * @dev: network device to get address for
1555 * 1551 *
1556 * SiS965 model, use APC CMOS RAM to store MAC address. 1552 * SiS96x model, use APC CMOS RAM to store MAC address.
1557 * APC CMOS RAM is accessed through ISA bridge. 1553 * APC CMOS RAM is accessed through ISA bridge.
1558 * MAC address is read into @net_dev->dev_addr. 1554 * MAC address is read into @net_dev->dev_addr.
1559 */ 1555 */
1560static int __devinit sis190_get_mac_addr_from_apc(struct pci_dev *pdev, 1556static int __devinit sis190_get_mac_addr_from_apc(struct pci_dev *pdev,
1561 struct net_device *dev) 1557 struct net_device *dev)
1562{ 1558{
1559 static const u16 __devinitdata ids[] = { 0x0965, 0x0966, 0x0968 };
1563 struct sis190_private *tp = netdev_priv(dev); 1560 struct sis190_private *tp = netdev_priv(dev);
1564 struct pci_dev *isa_bridge; 1561 struct pci_dev *isa_bridge;
1565 u8 reg, tmp8; 1562 u8 reg, tmp8;
1566 int i; 1563 unsigned int i;
1567 1564
1568 net_probe(tp, KERN_INFO "%s: Read MAC address from APC.\n", 1565 net_probe(tp, KERN_INFO "%s: Read MAC address from APC.\n",
1569 pci_name(pdev)); 1566 pci_name(pdev));
1570 1567
1571 isa_bridge = pci_get_device(PCI_VENDOR_ID_SI, 0x0965, NULL); 1568 for (i = 0; i < ARRAY_SIZE(ids); i++) {
1572 if (!isa_bridge) 1569 isa_bridge = pci_get_device(PCI_VENDOR_ID_SI, ids[i], NULL);
1573 isa_bridge = pci_get_device(PCI_VENDOR_ID_SI, 0x0966, NULL); 1570 if (isa_bridge)
1571 break;
1572 }
1574 1573
1575 if (!isa_bridge) { 1574 if (!isa_bridge) {
1576 net_probe(tp, KERN_INFO "%s: Can not find ISA bridge.\n", 1575 net_probe(tp, KERN_INFO "%s: Can not find ISA bridge.\n",