]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/sundance.c
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfashe...
[linux-2.6-omap-h63xx.git] / drivers / net / sundance.c
index 059141814fecbd4e8d2e9689dd868edb39a64d64..f13b2a195c708fe32d8c53d05988875a51bd52e1 100644 (file)
        Version LK1.10 (Philippe De Muyter phdm@macqel.be):
        - Make 'unblock interface after Tx underrun' work
 
+       Version LK1.11 (Pedro Alejandro Lopez-Valencia palopezv at gmail.com):
+       - Add support for IC Plus Corporation IP100A chipset
 */
 
 #define DRV_NAME       "sundance"
-#define DRV_VERSION    "1.01+LK1.10"
-#define DRV_RELDATE    "28-Oct-2005"
+#define DRV_VERSION    "1.01+LK1.11"
+#define DRV_RELDATE    "14-Jun-2006"
 
 
 /* The user-configurable values.
@@ -287,6 +289,7 @@ static struct pci_device_id sundance_pci_tbl[] = {
        {0x1186, 0x1002, 0x1186, 0x1040, 0, 0, 3},
        {0x1186, 0x1002, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4},
        {0x13F0, 0x0201, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 5},
+       {0x13F0, 0x0200, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 6},
        {0,}
 };
 MODULE_DEVICE_TABLE(pci, sundance_pci_tbl);
@@ -305,6 +308,7 @@ static const struct pci_id_info pci_id_tbl[] = {
        {"D-Link DFE-530TXS FAST Ethernet Adapter"},
        {"D-Link DL10050-based FAST Ethernet Adapter"},
        {"Sundance Technology Alta"},
+       {"IC Plus Corporation IP100A FAST Ethernet Adapter"},
        {NULL,},                        /* 0 terminated list. */
 };
 
@@ -633,9 +637,13 @@ static int __devinit sundance_probe1 (struct pci_dev *pdev,
 
        np->phys[0] = 1;                /* Default setting */
        np->mii_preamble_required++;
+       /*
+        * It seems some phys doesn't deal well with address 0 being accessed
+        * first, so leave address zero to the end of the loop (32 & 31).
+        */
        for (phy = 1; phy <= 32 && phy_idx < MII_CNT; phy++) {
-               int mii_status = mdio_read(dev, phy, MII_BMSR);
                int phyx = phy & 0x1f;
+               int mii_status = mdio_read(dev, phyx, MII_BMSR);
                if (mii_status != 0xffff  &&  mii_status != 0x0000) {
                        np->phys[phy_idx++] = phyx;
                        np->mii_if.advertising = mdio_read(dev, phyx, MII_ADVERTISE);