diff options
Diffstat (limited to 'drivers/net/sundance.c')
-rw-r--r-- | drivers/net/sundance.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/sundance.c b/drivers/net/sundance.c index d8a7e08cab2b..5de0554fd7c6 100644 --- a/drivers/net/sundance.c +++ b/drivers/net/sundance.c | |||
@@ -609,16 +609,17 @@ static int __devinit sundance_probe1 (struct pci_dev *pdev, | |||
609 | 609 | ||
610 | np->phys[0] = 1; /* Default setting */ | 610 | np->phys[0] = 1; /* Default setting */ |
611 | np->mii_preamble_required++; | 611 | np->mii_preamble_required++; |
612 | for (phy = 1; phy < 32 && phy_idx < MII_CNT; phy++) { | 612 | for (phy = 1; phy <= 32 && phy_idx < MII_CNT; phy++) { |
613 | int mii_status = mdio_read(dev, phy, MII_BMSR); | 613 | int mii_status = mdio_read(dev, phy, MII_BMSR); |
614 | int phyx = phy & 0x1f; | ||
614 | if (mii_status != 0xffff && mii_status != 0x0000) { | 615 | if (mii_status != 0xffff && mii_status != 0x0000) { |
615 | np->phys[phy_idx++] = phy; | 616 | np->phys[phy_idx++] = phyx; |
616 | np->mii_if.advertising = mdio_read(dev, phy, MII_ADVERTISE); | 617 | np->mii_if.advertising = mdio_read(dev, phyx, MII_ADVERTISE); |
617 | if ((mii_status & 0x0040) == 0) | 618 | if ((mii_status & 0x0040) == 0) |
618 | np->mii_preamble_required++; | 619 | np->mii_preamble_required++; |
619 | printk(KERN_INFO "%s: MII PHY found at address %d, status " | 620 | printk(KERN_INFO "%s: MII PHY found at address %d, status " |
620 | "0x%4.4x advertising %4.4x.\n", | 621 | "0x%4.4x advertising %4.4x.\n", |
621 | dev->name, phy, mii_status, np->mii_if.advertising); | 622 | dev->name, phyx, mii_status, np->mii_if.advertising); |
622 | } | 623 | } |
623 | } | 624 | } |
624 | np->mii_preamble_required--; | 625 | np->mii_preamble_required--; |