Quantcast

Duovero ethernet dropping connection

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Duovero ethernet dropping connection

Scott Ellis
I only have one Duovero to test with currently so I'm wondering if
anyone else is seeing random network connection drops using a
Duovero/Parlour setup.

I've gone through multiple cables and hubs in testing with no change in
behavior and the same network hardware always works with Overo/Tobi
setups.

I've reseated the COM multiple times and I'm running with a heatsink on
the COM.

The connection will drop whether or not data is being transferred.

ifconfig continues to show an UP status, but ethtool will show the true
down state when the link is dropped.

I increased the debug level for the smsc911x driver and I'm seeing both
connection state changes and an smsc911x_mii_read errors. The latter is
the one that's causing the connection drop.

Errors are like the following (DEBUG level = 2)

...
[ 6155.613189] smsc911x smsc911x.0: eth0: smsc911x_mii_read: MII is busy in smsc911x_mii_read???  phyaddr = 1  regidx = 4
[ 6155.624664] smsc911x smsc911x.0: eth0: duplex state has changed
[ 6155.630981] smsc911x smsc911x.0: eth0: configuring for half duplex mode
[ 6155.637939] smsc911x smsc911x.0: eth0: half duplex
[ 6157.636932] smsc911x smsc911x.0: eth0: duplex state has changed
[ 6157.643249] smsc911x smsc911x.0: eth0: configuring for full duplex mode
[ 6157.650573] smsc911x smsc911x.0: eth0: rx pause disabled, tx pause disabled
[ 6165.652221] smsc911x smsc911x.0: eth0: smsc911x_mii_read: MII is busy in smsc911x_mii_read???  phyaddr = 1  regidx = 5
[ 6169.659942] smsc911x smsc911x.0: eth0: smsc911x_mii_read: MII is busy in smsc911x_mii_read???  phyaddr = 1  regidx = 1
[ 6171.667816] smsc911x smsc911x.0: eth0: smsc911x_mii_read: MII is busy in smsc911x_mii_read???  phyaddr = 1  regidx = 1
[ 6177.675720] smsc911x smsc911x.0: eth0: smsc911x_mii_read: MII is busy in smsc911x_mii_read???  phyaddr = 1  regidx = 4
[ 6177.687103] smsc911x smsc911x.0: eth0: duplex state has changed
[ 6177.693359] smsc911x smsc911x.0: eth0: configuring for half duplex mode
[ 6177.700439] smsc911x smsc911x.0: eth0: half duplex
...

The duplex state changes are unexpected, but they don't cause a
connection drop.

The extra info in the smsc911x_mii_read() error is some additional
debug I added. The mii reads when the error occurs are basically link
status checks (MII_BMSR, MII_ADVERTISE, MII_LPA).

Putting a wait loop in smsc911x_mii_read() to wait for the MII busy bit
to clear when entering the function allows the connection to stay up.

It does not noticeably degrade performance adding this code to the
driver, but other hardware using the same driver doesn't need this
modification.

Without a second unit to test with it's difficult to tell whether it's
hardware or software.

So anyone else seeing this?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Duovero ethernet dropping connection

ashcharles
Hi Scott,

What rev. of Parlor board do you have? I saw issues on a Parlor board
that had ESD protection diodes D82-D85 populated---depopulating them
won't do any harm for testing.

I'll keep my eyes peeled for similar behaviour as I'm checking some
DuoVeros today.
--Ash

On Mon, Jan 28, 2013 at 7:20 AM, jumpnowdev <[hidden email]> wrote:

> I only have one Duovero to test with currently so I'm wondering if
> anyone else is seeing random network connection drops using a
> Duovero/Parlour setup.
>
> I've gone through multiple cables and hubs in testing with no change in
> behavior and the same network hardware always works with Overo/Tobi
> setups.
>
> I've reseated the COM multiple times and I'm running with a heatsink on
> the COM.
>
> The connection will drop whether or not data is being transferred.
>
> ifconfig continues to show an UP status, but ethtool will show the true
> down state when the link is dropped.
>
> I increased the debug level for the smsc911x driver and I'm seeing both
> connection state changes and an smsc911x_mii_read errors. The latter is
> the one that's causing the connection drop.
>
> Errors are like the following (DEBUG level = 2)
>
> ...
> [ 6155.613189] smsc911x smsc911x.0: eth0: smsc911x_mii_read: MII is busy in
> smsc911x_mii_read???  phyaddr = 1  regidx = 4
> [ 6155.624664] smsc911x smsc911x.0: eth0: duplex state has changed
> [ 6155.630981] smsc911x smsc911x.0: eth0: configuring for half duplex mode
> [ 6155.637939] smsc911x smsc911x.0: eth0: half duplex
> [ 6157.636932] smsc911x smsc911x.0: eth0: duplex state has changed
> [ 6157.643249] smsc911x smsc911x.0: eth0: configuring for full duplex mode
> [ 6157.650573] smsc911x smsc911x.0: eth0: rx pause disabled, tx pause
> disabled
> [ 6165.652221] smsc911x smsc911x.0: eth0: smsc911x_mii_read: MII is busy in
> smsc911x_mii_read???  phyaddr = 1  regidx = 5
> [ 6169.659942] smsc911x smsc911x.0: eth0: smsc911x_mii_read: MII is busy in
> smsc911x_mii_read???  phyaddr = 1  regidx = 1
> [ 6171.667816] smsc911x smsc911x.0: eth0: smsc911x_mii_read: MII is busy in
> smsc911x_mii_read???  phyaddr = 1  regidx = 1
> [ 6177.675720] smsc911x smsc911x.0: eth0: smsc911x_mii_read: MII is busy in
> smsc911x_mii_read???  phyaddr = 1  regidx = 4
> [ 6177.687103] smsc911x smsc911x.0: eth0: duplex state has changed
> [ 6177.693359] smsc911x smsc911x.0: eth0: configuring for half duplex mode
> [ 6177.700439] smsc911x smsc911x.0: eth0: half duplex
> ...
>
> The duplex state changes are unexpected, but they don't cause a
> connection drop.
>
> The extra info in the smsc911x_mii_read() error is some additional
> debug I added. The mii reads when the error occurs are basically link
> status checks (MII_BMSR, MII_ADVERTISE, MII_LPA).
>
> Putting a wait loop in smsc911x_mii_read() to wait for the MII busy bit
> to clear when entering the function allows the connection to stay up.
>
> It does not noticeably degrade performance adding this code to the
> driver, but other hardware using the same driver doesn't need this
> modification.
>
> Without a second unit to test with it's difficult to tell whether it's
> hardware or software.
>
> So anyone else seeing this?
>
>
>
>
> --
> View this message in context: http://gumstix.8.n6.nabble.com/Duovero-ethernet-dropping-connection-tp4966633.html
> Sent from the Gumstix mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. ON SALE this month only -- learn more at:
> http://p.sf.net/sfu/learnnow-d2d
> _______________________________________________
> gumstix-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gumstix-users

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Duovero ethernet dropping connection

Scott Ellis
Hi Ash,

The numbers on my Parlor

WO 28693 201244
BRD40002-R3902

D82-D85 are populated.

I'm waiting on another Parlor now. I'll try depopulating the caps
on the current board once that gets here.

I don't want to risk being without hardware for development.

Trivial as it looks, I know my skills with a soldering iron ;-)

As I mentioned earlier, I have a patch to smsc911x.c that can
keep the connection up.

Scott
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Duovero ethernet dropping connection

ashcharles
On Tue, Jan 29, 2013 at 1:04 PM, jumpnowdev <[hidden email]> wrote:
> I'm waiting on another Parlor now. I'll try depopulating the caps
> on the current board once that gets here.
>
> I don't want to risk being without hardware for development.
>
> Trivial as it looks, I know my skills with a soldering iron ;-)
Fair enough!  I've destroyed too many boards with a slip of the soldering iron.
>
> As I mentioned earlier, I have a patch to smsc911x.c that can
> keep the connection up.
I didn't see any issues as I was testing this afternoon but I have a
board with different ESD diodes on the ethernet interface.

--Ash

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Duovero ethernet dropping connection

ashcharles
Hi Scott,

I also saw this error (regardless of the diodes).  I patched the file
as you proposed which seems to be effective but haven't dug in to find
a deeper fix.  Do you have any insight?

--Ash

On Tue, Jan 29, 2013 at 2:31 PM, Ash Charles <[hidden email]> wrote:

> On Tue, Jan 29, 2013 at 1:04 PM, jumpnowdev <[hidden email]> wrote:
>> I'm waiting on another Parlor now. I'll try depopulating the caps
>> on the current board once that gets here.
>>
>> I don't want to risk being without hardware for development.
>>
>> Trivial as it looks, I know my skills with a soldering iron ;-)
> Fair enough!  I've destroyed too many boards with a slip of the soldering iron.
>>
>> As I mentioned earlier, I have a patch to smsc911x.c that can
>> keep the connection up.
> I didn't see any issues as I was testing this afternoon but I have a
> board with different ESD diodes on the ethernet interface.
>
> --Ash

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Duovero ethernet dropping connection

Scott Ellis
No insights.

I haven't really looked as unfortunately that hack hides the
problem and I've been working on other things.

The problem continued with the new COM/Parlor I received.
It occurs in any combination of the two COMs and Parlors.

I also removed the diodes as you suggested and the behaviour
did not change.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Duovero ethernet dropping connection

Ash Charles
On Sat, Mar 2, 2013 at 6:34 AM, jumpnowdev <[hidden email]> wrote:
> No insights.
>
> I haven't really looked as unfortunately that hack hides the
> problem and I've been working on other things.
Understandably.  This is definitely a code issue and not related to
the diodes.  Maybe the interface to the SMSC9221 is just running
slowly compared to the speed of the OMAP.
--Ash

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Duovero ethernet dropping connection

Scott Ellis
I could try playing around with the GPMC timings. Looks like
they are still done in u-boot.

From <u-boot-src>/board/duovero/duovero.c
...
/* GPMC CS configuration for an SMSC LAN9221 ethernet controller */
#define NET_LAN9221_GPMC_CONFIG1    0x2a001203
#define NET_LAN9221_GPMC_CONFIG2    0x000a0a02
#define NET_LAN9221_GPMC_CONFIG3    0x00020200
#define NET_LAN9221_GPMC_CONFIG4    0x0a030a03
#define NET_LAN9221_GPMC_CONFIG5    0x000a0a0a
#define NET_LAN9221_GPMC_CONFIG6    0x8a070707
#define NET_LAN9221_GPMC_CONFIG7    0x00000f6c

/* GPMC definitions for LAN9221 chips on expansion boards */
static const u32 gpmc_lan_config[] = {
    NET_LAN9221_GPMC_CONFIG1,
    NET_LAN9221_GPMC_CONFIG2,
    NET_LAN9221_GPMC_CONFIG3,
    NET_LAN9221_GPMC_CONFIG4,
    NET_LAN9221_GPMC_CONFIG5,
    NET_LAN9221_GPMC_CONFIG6,
    /*CONFIG7- computed as params */
};
...

I don't know if this is the problem, but it's easy enough to
do a little fiddling. I'll let you know if I find anything.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Duovero ethernet dropping connection

alex0486
Scott,

I'm actually having very similar issues. I can get mine to fail by doing a ping -f to an external IP address.
Here is the log from my testing:

smsc911x smsc911x.0: eth0: smsc911x_mii_read: MII is busy in smsc911x_mii_read???
smsc911x smsc911x.0: eth0: carrier state has changed
smsc911x smsc911x.0: eth0: configuring for no carrier
smsc911x smsc911x.0: eth0: maccr 0x1010200C,HASHH 0x00000000, HASHL 0x80000000

I'll try to put a similar patch in my code and see if it fixes it.  Do you have any updates from this?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Duovero ethernet dropping connection

Scott Ellis
A little research on the gpmc values currently set in u-boot.

http://www.jumpnowtek.com/duovero/gpmc-nic-config.ods

Look at the duovero tab. I wasn't 100% on the 200 MHz GPMC_FCLK.
And don't trust that spreadsheet too much. I was just making some
notes.

Here's the hack patch I'm using that keeps the nic up for now

http://www.jumpnowtek.com/duovero/smsc911x-busy-wait.patch


And another patch to enable the smsc911x driver debugging

http://www.jumpnowtek.com/duovero/smsc911x-debug-enable.patch


That's all I've done so far.

Some unexpected work showed up recently and I've been really busy.

I'm not even sure if the gpmc values are the problem. It was just a
suggestion from Ash worth taking a look at.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Duovero ethernet dropping connection

alex0486
Do you recommend a busy wait? I put a udelay of 1 in there for my patch as it seems that for other register read loops they do a udelay.  I don't want to overwhelm the PHY with requests.

I think I'll keep it like that until the problem is fully flushed out as I'm already a bit behind. I'll be monitoring this thread to see if anything else comes up. Thanks for posting the workaround, this saved me a bunch of time debugging this driver.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Duovero ethernet dropping connection

Philipp Lutz
In reply to this post by Scott Ellis
So finally I also ran into this issue when I begun working with the DuoVeros including the network connection....
I applied your patch and made the driver chatty. Find attached the kernel log with smsc911x related messages from booting until the ethernet-connection was dropped.

You know what's funny? I desperately tried to reproduce the issue when I read about it on the mailing list here and when my colleague finally experienced it. But I wasn't able, even after 1h of flood pinging ([hidden email] claimed that he could reproduce the issue with that).
But as soon as my colleague and I did the same thing on the Gumstix (compiling a bigger piece of software) I ran into the same trouble.
This means that the Gumstix became really hot (yes, we use the big heatspreader) and cpu-freq was clocking it to 1 GHz, in my case /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq tells me "1008000".
Clocking up the CPU requires also the system clock and other clocks to go up, which could lead to timing-issues. The resulting heat could lead to thermal problems affecting the networking (PHY or MAC, or both). I don't think the latter makes any sense.
 
I can't reproduce the error when I work with a low CPU clock (cpu governer: powersave):
$ echo powersave > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
What about you guys (particularly [hidden email])? Can you still reproduce the issue?

Btw.: after running into the issue when I down the interface and up it again, it's also working again.

Cheers
Phil


-------- Original Message --------
Subject: Re: [Gumstix-users] Duovero ethernet dropping connection
From: jumpnowdev [hidden email]
To: [hidden email]
Date: 03/13/2013 08:53 AM
A little research on the gpmc values currently set in u-boot.

http://www.jumpnowtek.com/duovero/gpmc-nic-config.ods

Look at the duovero tab. I wasn't 100% on the 200 MHz GPMC_FCLK.
And don't trust that spreadsheet too much. I was just making some 
notes.

Here's the hack patch I'm using that keeps the nic up for now

http://www.jumpnowtek.com/duovero/smsc911x-busy-wait.patch


And another patch to enable the smsc911x driver debugging

http://www.jumpnowtek.com/duovero/smsc911x-debug-enable.patch


That's all I've done so far. 

Some unexpected work showed up recently and I've been really busy.

I'm not even sure if the gpmc values are the problem. It was just a 
suggestion from Ash worth taking a look at.



--
View this message in context: http://gumstix.8.n6.nabble.com/Duovero-ethernet-dropping-connection-tp4966633p4966991.html
Sent from the Gumstix mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users



------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game
on Steam. $5K grand prize plus 10 genre and skill prizes.
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users

smsc911x-1.log (43K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Duovero ethernet dropping connection

Ash Charles
On Thu, Mar 28, 2013 at 8:06 AM, Philipp Lutz <[hidden email]> wrote:
> Btw.: after running into the issue when I down the interface and up it
> again, it's also working again.
More than anything else, this suggests timing rather than heat to me.
Does that seem like a reasonable conclusion?

--Ash

------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game
on Steam. $5K grand prize plus 10 genre and skill prizes.
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Duovero ethernet dropping connection

alex0486
In reply to this post by Philipp Lutz
Hi Phil,
Out of the box I could run Steve's xfce image and reproduce the issue with the ping flood test. There would have been no way for me to run it for an hour without it crashing, it seemed to happen rather quickly.
I first experienced this issue when running my test application that puts about a 30% load on the processor and passes a large amount of data over the ethernet interface. I ended up narrowing it down to the ping test that could cause the problem.
I would suspect that it is a timing issue and not so much a heat issue. I can do a limited amount of testing to come up with a better solution if my unit is a better failure case, but it seems like it can be reproduced pretty easily on other targets.
With the patch that Scott provided, I haven't seen the problem occur again.

I also agree that when the issue occurred I could bring the interface down and back up again and the device would go return to a working state, but that wasn't acceptable for my application.



On Thu, Mar 28, 2013 at 11:06 AM, Philipp Lutz <[hidden email]> wrote:
So finally I also ran into this issue when I begun working with the DuoVeros including the network connection....
I applied your patch and made the driver chatty. Find attached the kernel log with smsc911x related messages from booting until the ethernet-connection was dropped.

You know what's funny? I desperately tried to reproduce the issue when I read about it on the mailing list here and when my colleague finally experienced it. But I wasn't able, even after 1h of flood pinging ([hidden email] claimed that he could reproduce the issue with that).
But as soon as my colleague and I did the same thing on the Gumstix (compiling a bigger piece of software) I ran into the same trouble.
This means that the Gumstix became really hot (yes, we use the big heatspreader) and cpu-freq was clocking it to 1 GHz, in my case /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq tells me "1008000".
Clocking up the CPU requires also the system clock and other clocks to go up, which could lead to timing-issues. The resulting heat could lead to thermal problems affecting the networking (PHY or MAC, or both). I don't think the latter makes any sense.
 
I can't reproduce the error when I work with a low CPU clock (cpu governer: powersave):
$ echo powersave > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
What about you guys (particularly [hidden email])? Can you still reproduce the issue?

Btw.: after running into the issue when I down the interface and up it again, it's also working again.

Cheers
Phil



-------- Original Message --------
Subject: Re: [Gumstix-users] Duovero ethernet dropping connection
From: jumpnowdev [hidden email]
To: [hidden email]
Date: 03/13/2013 08:53 AM
A little research on the gpmc values currently set in u-boot.

http://www.jumpnowtek.com/duovero/gpmc-nic-config.ods

Look at the duovero tab. I wasn't 100% on the 200 MHz GPMC_FCLK.
And don't trust that spreadsheet too much. I was just making some 
notes.

Here's the hack patch I'm using that keeps the nic up for now

http://www.jumpnowtek.com/duovero/smsc911x-busy-wait.patch


And another patch to enable the smsc911x driver debugging

http://www.jumpnowtek.com/duovero/smsc911x-debug-enable.patch


That's all I've done so far. 

Some unexpected work showed up recently and I've been really busy.

I'm not even sure if the gpmc values are the problem. It was just a 
suggestion from Ash worth taking a look at.



--
View this message in context: http://gumstix.8.n6.nabble.com/Duovero-ethernet-dropping-connection-tp4966633p4966991.html
Sent from the Gumstix mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users



------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game
on Steam. $5K grand prize plus 10 genre and skill prizes.
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users



------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game
on Steam. $5K grand prize plus 10 genre and skill prizes.
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Duovero ethernet dropping connection

Michael
This post has NOT been accepted by the mailing list yet.
In reply to this post by Scott Ellis
Hello, I was wondering if the issue with the ethernet connection dropping was ever resolved. I have the issue where if I bump the cpu clock speed on the duovero to 1008000 then the ethernet stops working, at 800000 speed the ethernet connection is fine; I am using the parlor board.

I was looking at the OMAP4330 documentation where there is a summary of the GPMC_CONFIG registers. I am not really sure what the settings are supposed to be for the LAN9221 chip. I have been messing with the GPMCFCLKDIVIDER which divides the GPMC_FCLK clock and rebuilding u-boot, but I have not had any luck yet. Has anyone been able to get the ethernet to work when the duovero is running at 1008000? Is the issue with the GPMC CS configurations?

The file I am editing my changes for is duovero-poky-linux-gnueabi/u-boot/2012.10-r1/git/board/duovero/duovero.c
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Duovero ethernet dropping connection

huhydro
I also want to know if there is a fix for this problem.
My current solution is using Phillipp's suggestion which is
$ echo powersave > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ,

this can make duovero ethernet on for 3 weeks now, but the processing speed is significantly reduced.
I wish there could be another way.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Duovero ethernet dropping connection

Vlad
This post has NOT been accepted by the mailing list yet.
This post was updated on .
In reply to this post by Scott Ellis
Hi guys,

I have observed the same issue on my DuoVero running 3.6.0+ Linux kernel.
I think the problem is in smsc911x_hard_start_xmit() function.
According to the Ethernet controller LAN9118 (or LAN9221) datasheet, the application should never write more data than the Tx FIFO free space.
This is not done in smsc911x_hard_start_xmit() and  when the FIFO free space drops bellow the Ethernet PDU size (1500 octets), the FIFO is overwritten.

In this case, the "freespace " variable will be miscalculated and the code:

        if (freespace < TX_FIFO_LOW_THRESHOLD) {
                netif_stop_queue(dev);
                ...

will not run netif_stop_queue().

Anyway, this simple patch fixes the issue:

diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c
index 69034e4..2e65cc0 100644
--- a/drivers/net/ethernet/smsc/smsc911x.c
+++ b/drivers/net/ethernet/smsc/smsc911x.c
@@ -1629,9 +1629,11 @@ static int smsc911x_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)

        freespace = smsc911x_reg_read(pdata, TX_FIFO_INF) & TX_FIFO_INF_TDFREE_;

-       if (unlikely(freespace < TX_FIFO_LOW_THRESHOLD))
+       if (unlikely(freespace < TX_FIFO_LOW_THRESHOLD)) {
                SMSC_WARN(pdata, tx_err,
                          "Tx data fifo low, space available: %d", freespace);
+               return NETDEV_TX_BUSY;
+       }

With the patch above, the network connection does not drop under heavy traffic load.

Regards,
Vlad
Vlad Apostolov
Loading...