public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* RE: [ECOS] "packets eaten" with AT91 EMAC Ethernet driver
@ 2008-06-09 20:55 Lambrecht Jürgen
  2008-06-10 16:11 ` Jürgen Lambrecht
  0 siblings, 1 reply; 7+ messages in thread
From: Lambrecht Jürgen @ 2008-06-09 20:55 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: ecos-discuss, I-Yanaslov



> -----Original Message-----
> From: Andrew Lunn [mailto:andrew@lunn.ch]
> Sent: maandag 9 juni 2008 17:32
> To: Lambrecht Jürgen
> Cc: ecos-discuss@ecos.sourceware.org; I-Yanaslov
> Subject: Re: [ECOS] "packets eaten" with AT91 EMAC Ethernet driver
> 
> On Mon, Jun 09, 2008 at 05:19:02PM +0200, J?rgen Lambrecht wrote:
> > Hello,
> >
> > Since I solved the bugs in the AT91 EMAC driver
> > (RX: reset of ?bytes_in_list? (position in current sg_list))(TX: at
> > TXERR IRQ, reset SW pointer; set all used bits to 0 instead of 1),
> > I always had the same problem: after a while of communicating over
> > Ethernet with the AT91 EMAC, packets get ?eaten?.
> >
> > TX Packets get stuck, and they need an RX packet to get out.
> 
> It sounds like missed interrupts, or a race condition in the interrupt
> handling.
Yes indeed.
The original driver does not mask interrupts at the start of the ISR and unmask them at the end of the DSR.
Is it correct that this mask/unmask is not needed because it is an internal interrupt and at the end of the ISR 'cyg_interrupt_acknowledge(vector)' is called - this acknowledge clears the interrupt? So this should be ok.

Maybe there is a sort of race condition with can_send()?


> 
> You might be interested in looking at the Linux drivers/net/macb.c
> file. This is i think the Linux driver for the EMAC. It might give you
Indeed. I'll do.

> some clues. It is interesting that they initialize all the TX buffers
> as being used, the opposite to what you do.

Yes, the original driver did the same.
But the datasheet (section 36.4.1.3 for SAM9260 vG and 37.4.1.3 for SAM7 vG point 2) is clear about this. 
I actually think it is an error in the datasheet, because my driver causes an "error" (TXERR IRQ with BEX (buffers exhausted)). With all TX buffers marked being used (original driver), you only get an UND (underrun) "warning" (UND in TSR is set, but no TXERR IRQ).
But Atmel will have to clarify this.
> 
>      Andrew

Thanks,
Jürgen

--
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] 7+ messages in thread
* [ECOS]  ÄãÏëÔÚÊé³ÇÅÔÓиöÕÐÉúµã»ò°ìÊ´¦Âð£¿
@ 2005-01-16  5:40 any
  0 siblings, 0 replies; 7+ messages in thread
From: any @ 2005-01-16  5:40 UTC (permalink / raw)
  To: ecos-discuss

[-- Attachment #1: Type: text/plain, Size: 258 bytes --]

    ÄãÏëÔÚÊé³ÇÅÔÓиöÕÐÉúµã»ò°ìÊ´¦Âð£¿Ç뾡¿ìÓëÎÒ¹«Ë¾ÁªÏµ£¬ÊʺÏÕÐÉú¡¢×Éѯ¡¢Æ±Îñ¡¢¹«Ë¾°ìÊ´¦µÈ£¬½»Í¨Ê®·Ö·½±ã£¬ÓÐн¨µÄµØÌú£¬ºóÃæÊÇÍòÏó³Ç£¬¶ÔÃæÊǵØÍõ£¬ÓµÓÐСС°ì¹«µã£¬´´ÔìÎÞÏÞÉÌ»ú£¡Ã¿¸öС°ì¹«ÊÒÖ»ÐèÒª2000Ôª/Ô£¬³¬Öµ£¡£¡Ãû¶îÓÐÏÞ£¬Ïȵ½Ïȵã¡    ÁªÏµ£º13631681932

[-- Attachment #2: Type: text/plain, Size: 148 bytes --]

-- 
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] 7+ messages in thread
* [ECOS]
@ 2001-06-12 21:51 Piteir
  2002-08-21  9:31 ` [ECOS] Robert Cragie
  0 siblings, 1 reply; 7+ messages in thread
From: Piteir @ 2001-06-12 21:51 UTC (permalink / raw)
  To: ECOS

Hi,

I always failed to download hello example in srec
format the hello example that I compile in cygwin size
is 1029KB and I create srec format using

arm-elf-objcopy -O hello.exe hello.srec

the hello.srec size only 178KB from hello.exe 1029KB
Is the arm-elf-objcopy produce an error result?

Thanks
Piteir

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

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

end of thread, other threads:[~2008-06-11 10:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-09 20:55 [ECOS] "packets eaten" with AT91 EMAC Ethernet driver Lambrecht Jürgen
2008-06-10 16:11 ` Jürgen Lambrecht
2008-06-11  6:30   ` I-Yanaslov
2008-06-11 10:12     ` [ECOS] ` Jürgen Lambrecht
  -- strict thread matches above, loose matches on Subject: below --
2005-01-16  5:40 [ECOS] ÄãÏëÔÚÊé³ÇÅÔÓиöÕÐÉúµã»ò°ìÊ´¦Â𣿠any
2001-06-12 21:51 [ECOS] Piteir
2002-08-21  9:31 ` [ECOS] Robert Cragie

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).