public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] ea2468 Ethernet overrun
@ 2009-06-03 13:43 Nikolay Marusov
  2009-06-03 13:55 ` Andrew Lunn
  0 siblings, 1 reply; 3+ messages in thread
From: Nikolay Marusov @ 2009-06-03 13:43 UTC (permalink / raw)
  To: ecos-discuss

Hello!

I am playing with Embedded Artists LPC2468-16 OEM Board.
Has anybody encounetered with a problem of TX overrun while
transmitting Ethernet packets?
Device works pretty well at 10Mbit/s but regullarly drops packet when
transmitting at 100Mbit/s.
What may be the cause?

Nikolay.

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ECOS] ea2468 Ethernet overrun
  2009-06-03 13:43 [ECOS] ea2468 Ethernet overrun Nikolay Marusov
@ 2009-06-03 13:55 ` Andrew Lunn
  2009-06-03 14:19   ` Nikolay Marusov
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Lunn @ 2009-06-03 13:55 UTC (permalink / raw)
  To: Nikolay Marusov; +Cc: ecos-discuss

On Wed, Jun 03, 2009 at 05:43:04PM +0400, Nikolay Marusov wrote:
> Hello!
> 
> I am playing with Embedded Artists LPC2468-16 OEM Board.
> Has anybody encounetered with a problem of TX overrun while
> transmitting Ethernet packets?
> Device works pretty well at 10Mbit/s but regullarly drops packet when
> transmitting at 100Mbit/s.
> What may be the cause?

Is it an overrun or an underrun?

I've seen underrun problems before in an intel chipset. The problem
was that the DMA would start transferring the packet from the host RAM
to the ethernet chipset. When X bytes of the packet had arrived at the
ethernet, the ethernet started sending them on the wire. Under heavy
memory load, the DMA was slower than the Ethernet sending bytes on the
wire, and with long packets the ethernet chip would empty its buffer
and then throw an underrun error. I had the change the Ethernet
chipset to have a bigger X so it had more buffered bytes before it
started sending them to the wire.

        Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ECOS] ea2468 Ethernet overrun
  2009-06-03 13:55 ` Andrew Lunn
@ 2009-06-03 14:19   ` Nikolay Marusov
  0 siblings, 0 replies; 3+ messages in thread
From: Nikolay Marusov @ 2009-06-03 14:19 UTC (permalink / raw)
  To: Nikolay Marusov, ecos-discuss

2009/6/3 Andrew Lunn <andrew@lunn.ch>:
> On Wed, Jun 03, 2009 at 05:43:04PM +0400, Nikolay Marusov wrote:
>
> Is it an overrun or an underrun?
>
> I've seen underrun problems before in an intel chipset. The problem
> was that the DMA would start transferring the packet from the host RAM
> to the ethernet chipset. When X bytes of the packet had arrived at the
> ethernet, the ethernet started sending them on the wire. Under heavy
> memory load, the DMA was slower than the Ethernet sending bytes on the
> wire, and with long packets the ethernet chip would empty its buffer
> and then throw an underrun error. I had the change the Ethernet
> chipset to have a bigger X so it had more buffered bytes before it
> started sending them to the wire.
>
>        Andrew
>

Yes, it is underrun - sorry. Exactly this case. So thought I.
I was interested whether anybody has such a thing at EA2468.
If this problem is insuperable, one could use this:

In phy_eth_drivers.cdl:

    cdl_option CYGOPT_DEVS_ETH_PHY_SPEED {
        display          "Preferred speed"
        flavor           data
        legal_values     10 100
        default_value    100
        description      "This option allows to select the preferred
                          interface speed during auto-negitiation."
    }

In dev/KSZ8001.c:

#if CYGOPT_DEVS_ETH_PHY_SPEED == 10
    _eth_phy_read(f, PHY_AN_ADV, f->phy_addr, &phy_anadv_reg);
    _eth_phy_write(f, PHY_AN_ADV, f->phy_addr,
      (phy_anadv_reg & ~PHY_AN_ADV_100HDX & ~PHY_AN_ADV_100FDX &
~PHY_AN_ADV_100_T4 )|
      PHY_AN_ADV_10HDX | PHY_AN_ADV_10FDX);
#endif

Thank you.
Nikolay.

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-06-03 14:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-03 13:43 [ECOS] ea2468 Ethernet overrun Nikolay Marusov
2009-06-03 13:55 ` Andrew Lunn
2009-06-03 14:19   ` Nikolay Marusov

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 read-only IMAP folder(s) and NNTP newsgroup(s).