summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2006-02-07 01:47:33 -0500
committerJeff Garzik <jgarzik@pobox.com>2006-02-07 01:47:33 -0500
commit6bd0e10e53cc4824cd8cdaab8c370e53ab2e23c2 (patch)
tree239e89177a17a99d94bfdc799d62eb6d48b4f201 /drivers
parent3c9b3a8575b4f2551e3b5b74ffa1c3559c6338eb (diff)
parent0d615ec2bb1cb8c38087bb24f6d2876dec3a9751 (diff)
downloadkernel-crypto-6bd0e10e53cc4824cd8cdaab8c370e53ab2e23c2.tar.gz
kernel-crypto-6bd0e10e53cc4824cd8cdaab8c370e53ab2e23c2.tar.xz
kernel-crypto-6bd0e10e53cc4824cd8cdaab8c370e53ab2e23c2.zip
Merge branch 'sundance'
Diffstat (limited to 'drivers')
-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 0ab9c38b4a3..8cdeb5cbab5 100644
--- a/drivers/net/sundance.c
+++ b/drivers/net/sundance.c
@@ -633,9 +633,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);