[<prev] [next>] [day] [month] [year] [list]
Message-ID: <5D308BD40154E4439D82454FE483A50205C33795@EVS4.nam.ci.root>
Date: Tue, 24 Jan 2012 14:03:30 -0500
From: "Bishop, Mark" <Mark.Bishop@...perindustries.com>
To: <netdev@...r.kernel.org>, <janet.mccreary@...ales.com>,
<Thomas.Walter@...c.com>
Cc: "Onstine, Elliott" <Elliott.Onstine@...perindustries.com>,
"Bishop, Mark" <Mark.Bishop@...perindustries.com>
Subject: [BUG] smsc911x.c - writes are too fast into TX FIFO
I've been running into all kinds of issues with this part (LAN9215) and the final issue I've had was with the linux driver (smsc911x.c).
I was getting the "eth1: smsc911x_phy_check_loopbackpkt: Failed to transmit during loopback test" and traced the issue to the PHY TX FIFO.
In an effort to try and figure out what was going on with the TX FIFO, I added the line of code between line 262 and 263 (Linux 3.3rc1). After I added it, things started working.
I do not see any min/max timing requirements for FIFO writes in the datasheet. I've included a SMSC technical contact in the hopes that he can get the factory to comment on those ranges.
Note: I am working on an embedded controller project based off 2.6, but the driver looks essentially the same concerning this issue between versions.
Adding a wait state, while quick and dirty doesn't seem like a long term solution. I would appreciate any comments on a better way to resolve it.
Thomas, the original diver was written back in Nov 2008 by Steve Glendinning @ SMSC. Not sure he is even still there, but if he is, he might be able to provide some insight.
Original code (line numbers from 3.3rc1):
smsc911x_tx_writefifo(...
...
260 if (pdata->config.flags & SMSC911X_USE_16BIT) {
261 while (wordcount--)
262 __smsc911x_reg_write(pdata, TX_DATA_FIFO, *buf++);
263 goto out;
264 }
265
266 BUG();
Modified Code:
260 if (pdata->config.flags & SMSC911X_USE_16BIT) {
261 while (wordcount--){
262 __smsc911x_reg_write(pdata, TX_DATA_FIFO, *buf++);
SMSC_TRACE(HW, "TX_STATUS_PEEK WRITE FIFO: 0x%x",smsc911x_reg_read(pdata, TX_STATUS_FIFO_PEEK));
}
263 goto out;
264 }
265
266 BUG();
This was brought up a few years ago but no solution was provided to the "eth1: smsc911x_phy_check_loopbackpkt: Failed to transmit during loopback test":
http://markmail.org/thread/lvt4l3hyufxbqzfb#query:+page:1+mid:lvt4l3hyufxbqzfb+state:results
and adding the wait state could be one way to resolve this for some people who are experiencing it.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists