Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ebc71647309539aaf9088f4e41b9f364cce8f7eb
Commit:     ebc71647309539aaf9088f4e41b9f364cce8f7eb
Parent:     f945fa7ad9c12a3356a3de7fb2143ccc2f2c3bca
Author:     Francois Romieu <[EMAIL PROTECTED]>
AuthorDate: Tue Dec 4 22:58:41 2007 +0100
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Jan 23 03:11:43 2008 -0800

    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 <[EMAIL PROTECTED]>
    Cc: K.M. Liu <[EMAIL PROTECTED]>
    Cc: J. Gleacher <[EMAIL PROTECTED]>
    Cc: Alexandre Penasso Teixeira <[EMAIL PROTECTED]>
    Cc: Arliton Rocha <[EMAIL PROTECTED]>
    Cc: Juan Jose Pablos <[EMAIL PROTECTED]>
    Cc: Wipat Srutiprom <[EMAIL PROTECTED]>
---
 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 7eab072..c63f484 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,
 }
 
 /**
- *     sis190_get_mac_addr_from_apc - Get MAC address for SiS965 model
+ *     sis190_get_mac_addr_from_apc - Get MAC address for SiS96x model
  *     @pdev: PCI device
  *     @dev:  network device to get address for
  *
- *     SiS965 model, use APC CMOS RAM to store MAC address.
+ *     SiS96x model, use APC CMOS RAM to store MAC address.
  *     APC CMOS RAM is accessed through ISA bridge.
  *     MAC address is read into @net_dev->dev_addr.
  */
 static int __devinit sis190_get_mac_addr_from_apc(struct pci_dev *pdev,
                                                  struct net_device *dev)
 {
+       static const u16 __devinitdata ids[] = { 0x0965, 0x0966, 0x0968 };
        struct sis190_private *tp = netdev_priv(dev);
        struct pci_dev *isa_bridge;
        u8 reg, tmp8;
-       int i;
+       unsigned int i;
 
        net_probe(tp, KERN_INFO "%s: Read MAC address from APC.\n",
                  pci_name(pdev));
 
-       isa_bridge = pci_get_device(PCI_VENDOR_ID_SI, 0x0965, NULL);
-       if (!isa_bridge)
-               isa_bridge = pci_get_device(PCI_VENDOR_ID_SI, 0x0966, NULL);
+       for (i = 0; i < ARRAY_SIZE(ids); i++) {
+               isa_bridge = pci_get_device(PCI_VENDOR_ID_SI, ids[i], NULL);
+               if (isa_bridge)
+                       break;
+       }
 
        if (!isa_bridge) {
                net_probe(tp, KERN_INFO "%s: Can not find ISA bridge.\n",
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to