This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: bugs in AT91 Ethernet driver


Thanks for your replies.

> -----Original Message-----
> From: ecos-discuss-owner@ecos.sourceware.org [mailto:ecos-discuss-
> owner@ecos.sourceware.org] On Behalf Of Andrew Lunn
> Sent: zaterdag 31 mei 2008 14:04
> To: I-Yanaslov
> Cc: Andrew Lunn; ecos-discuss@sources.redhat.com
> Subject: Re: [ECOS] bugs in AT91 Ethernet driver
> 
> On Sat, May 31, 2008 at 03:49:24PM +0400, I-Yanaslov wrote:
> >
> >> However, you are wrong about the TX buffers being on the heap. The
> >> buffer is inside the at91_eth_priv_t structure. This is allocated at
> >> the end of if_at91.c. It will be placed in the data segment.
> >
> > at91_eth_priv structure is contains only RX buffers, RX buffer
> > descriptors and "TX buffer descriptors". No contains "TX buffers".
> >
> > at91_eth_send() shows " priv->tbd[priv->curr_tbd_idx].addr =
> > sg_list[i].buf; " - no memory copy, only address assigment.
> > But, sg_list[] it is mbuf, dynamically allocated in TCP/IP stack.
> 
> Ah, OK. My error. That makes it more messy.
> 
> How big is the SRAM on these ARM9 devices? 32K, 64K? If it is big
> enough maybe we can move net_mbufs_area[] into the SRAM. Otherwise a
> copy is needed for every packet to be transmitted.
>
The AT91SAM9620 has only 2 SRAMs of 4kB each.
(The AT91SAM9621 has 160kB of SRAM, but no EMAC and LCD controller instead)
So it will have to be the last option.
To have a reliable driver, the fix is needed, but that (errata) is not why my TX does not work.
The AT91SAM9620 errata is only valid at heavy network load (when there is RX and TX at the same time and then an SDRAM refresh or SDRAM bank opening or so). I only do a ping on a private network for test.
And moreover, the Ethernet driver works in Redboot RAM (ok, not that well, 9% of the pings get lost).

I will further debug tomorrow...
And then copy every packet to SRAM before doing DMA...

Kind regards,
Jürgen
 
>      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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]