aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sundance.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/sundance.c')
-rw-r--r--drivers/net/sundance.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/sundance.c b/drivers/net/sundance.c
index 0ab9c38b4a34..8cdeb5cbab5b 100644
--- a/drivers/net/sundance.c
+++ b/drivers/net/sundance.c
@@ -633,9 +633,13 @@ static int __devinit sundance_probe1 (struct pci_dev *pdev,
633 633
634 np->phys[0] = 1; /* Default setting */ 634 np->phys[0] = 1; /* Default setting */
635 np->mii_preamble_required++; 635 np->mii_preamble_required++;
636 /*
637 * It seems some phys doesn't deal well with address 0 being accessed
638 * first, so leave address zero to the end of the loop (32 & 31).
639 */
636 for (phy = 1; phy <= 32 && phy_idx < MII_CNT; phy++) { 640 for (phy = 1; phy <= 32 && phy_idx < MII_CNT; phy++) {
637 int mii_status = mdio_read(dev, phy, MII_BMSR);
638 int phyx = phy & 0x1f; 641 int phyx = phy & 0x1f;
642 int mii_status = mdio_read(dev, phyx, MII_BMSR);
639 if (mii_status != 0xffff && mii_status != 0x0000) { 643 if (mii_status != 0xffff && mii_status != 0x0000) {
640 np->phys[phy_idx++] = phyx; 644 np->phys[phy_idx++] = phyx;
641 np->mii_if.advertising = mdio_read(dev, phyx, MII_ADVERTISE); 645 np->mii_if.advertising = mdio_read(dev, phyx, MII_ADVERTISE);