From: Rick Bronson <rick@efn.org>
To: linux-omap@vger.kernel.org
Cc: premi@ti.com
Subject: RE: Mistral AM37x (with AM3715) devel board networking broken
Date: Thu, 11 Nov 2010 12:10:32 -0800 [thread overview]
Message-ID: <E1PGdTc-0002PY-Rp@amazonia.comcast.net> (raw)
In-Reply-To: <B85A65D85D7EB246BE421B3FB0FBB5930234992A00@dbde02.ent.ti.com> (premi@ti.com)
Hi,
I've found the problem and below is the fix. It appears your
SMSC9200 is faster than mine ;-) Once in a while mine gets through the
smsc911x_soft_reset() in 100 us but most of the time it takes a full
250 ms.
Rick
--- linux/drivers/net/smsc911x.c.~1~ 2010-11-08 19:53:03.000000000 -0800
+++ linux/drivers/net/smsc911x.c 2010-11-11 12:00:18.000000000 -0800
@@ -791,8 +791,8 @@
return -ENODEV;
}
- SMSC_TRACE(PROBE, "PHY %d: addr %d, phy_id 0x%08X",
- phy_addr, phydev->addr, phydev->phy_id);
+ SMSC_TRACE(PROBE, "PHY %s: addr %d, phy_id 0x%08X",
+ dev_name(&phydev->dev), phydev->addr, phydev->phy_id);
ret = phy_connect_direct(dev, phydev,
&smsc911x_phy_adjust_link, 0,
@@ -1124,11 +1124,11 @@
/* Reset the LAN911x */
smsc911x_reg_write(pdata, HW_CFG, HW_CFG_SRST_);
- timeout = 10;
- do {
- udelay(10);
- temp = smsc911x_reg_read(pdata, HW_CFG);
- } while ((--timeout) && (temp & HW_CFG_SRST_));
+ timeout = 10000; /* this can take up to 1/4 sec */
+ while ((smsc911x_reg_read(pdata, HW_CFG) & HW_CFG_SRST_) && timeout) {
+ udelay(100);
+ timeout--;
+ }
if (unlikely(temp & HW_CFG_SRST_)) {
SMSC_WARNING(DRV, "Failed to complete reset");
next parent reply other threads:[~2010-11-11 20:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <B85A65D85D7EB246BE421B3FB0FBB5930234992A00@dbde02.ent.ti.com>
2010-11-11 20:10 ` Rick Bronson [this message]
2010-11-09 4:53 Mistral AM37x (with AM3715) devel board networking broken Rick Bronson
2010-11-09 5:02 ` Gadiyar, Anand
2010-11-10 13:04 ` Premi, Sanjeev
2010-11-10 13:03 ` Premi, Sanjeev
-- strict thread matches above, loose matches on Subject: below --
2010-11-07 15:44 Rick Bronson
2010-11-08 12:06 ` Premi, Sanjeev
2010-11-08 15:25 ` Premi, Sanjeev
2010-11-06 15:20 Rick Bronson
2010-11-06 19:02 ` Premi, Sanjeev
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=E1PGdTc-0002PY-Rp@amazonia.comcast.net \
--to=rick@efn.org \
--cc=linux-omap@vger.kernel.org \
--cc=premi@ti.com \
/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