From: "John W. Linville" <linville@tuxdriver.com>
To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Cc: jgarzik@pobox.com
Subject: [patch 2.6.14-rc3] sundance: include MII address 0 in PHY probe
Date: Wed, 19 Oct 2005 08:07:34 -0400 [thread overview]
Message-ID: <10192005080734.15936@bilbo.tuxdriver.com> (raw)
In-Reply-To: <20051019120022.GA15438@tuxdriver.com>
Include MII address 0 at the end of the PHY scan. This covers the
entire range of possible MII addresses.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/sundance.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/net/sundance.c b/drivers/net/sundance.c
--- a/drivers/net/sundance.c
+++ b/drivers/net/sundance.c
@@ -608,16 +608,17 @@ static int __devinit sundance_probe1 (st
np->phys[0] = 1; /* Default setting */
np->mii_preamble_required++;
- for (phy = 1; phy < 32 && phy_idx < MII_CNT; phy++) {
+ for (phy = 1; phy <= 32 && phy_idx < MII_CNT; phy++) {
int mii_status = mdio_read(dev, phy, MII_BMSR);
+ int phyx = phy & 0x1f;
if (mii_status != 0xffff && mii_status != 0x0000) {
- np->phys[phy_idx++] = phy;
- np->mii_if.advertising = mdio_read(dev, phy, MII_ADVERTISE);
+ np->phys[phy_idx++] = phyx;
+ np->mii_if.advertising = mdio_read(dev, phyx, MII_ADVERTISE);
if ((mii_status & 0x0040) == 0)
np->mii_preamble_required++;
printk(KERN_INFO "%s: MII PHY found at address %d, status "
"0x%4.4x advertising %4.4x.\n",
- dev->name, phy, mii_status, np->mii_if.advertising);
+ dev->name, phyx, mii_status, np->mii_if.advertising);
}
}
np->mii_preamble_required--;
next prev parent reply other threads:[~2005-10-19 12:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-19 1:31 [patch 2.6.14-rc3 0/3] misc fixes/cleanups for sundance John W. Linville
2005-10-19 1:31 ` [patch 2.6.14-rc3 1/3] sundance: remove if (1) { ... } block in sundance_probe1 John W. Linville
2005-10-19 1:31 ` [patch 2.6.14-rc3 2/3] sundance: probe PHYs from MII address 0 John W. Linville
2005-10-19 1:31 ` [patch 2.6.14-rc3 3/3] sundance: expand reset mask John W. Linville
2005-10-19 2:29 ` Jeff Garzik
2005-10-19 2:31 ` [patch 2.6.14-rc3 2/3] sundance: probe PHYs from MII address 0 Jeff Garzik
2005-10-19 12:00 ` John W. Linville
2005-10-19 12:07 ` John W. Linville [this message]
2005-10-20 14:07 ` [patch 2.6.14-rc3] sundance: include MII address 0 in PHY probe Jeff Garzik
2005-10-19 2:29 ` [patch 2.6.14-rc3 1/3] sundance: remove if (1) { ... } block in sundance_probe1 Jeff Garzik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=10192005080734.15936@bilbo.tuxdriver.com \
--to=linville@tuxdriver.com \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).