Skip to contentSkip to conversation

"transmit timed out" on FCC in MPC8260 as well as MPC8247

DISCUSSION Siju Viswanath K E 3 participants 7 messages Mar 24, 2006 – Mar 27, 2006

lore
Share & tools
lore
#0 lore raw

Hi,
I am using denk's linuxppc-2.4.20 . I am getting this problem of
"transmit timed out" on FCC in MPC8260 as well as MPC8247. It seems to be a case of late collision. I checked out earlier posts similar to this also. The problem occurs if I attempt to transfer large files and is not seen on all systems.

The messages on console are given below. I am seeing the
same 5th BD reporting LC. FCC_PSMR_LPB is already set in arch/ppc/8260_io/fcc_enet.c .

Can the 8247 errata CPM119 or some other errata be the cause ? What is
the solution for this ?

console messages:

NETDEV WATCHDOG: eth0: transmit timed out

eth0: transmit timed out.

Ring data dump: cur_tx c01ef560 (full) cur_rx c01ef4d0.

Tx @base c01ef508 :

5c00 0036 016d7da2

1c00 003e 00c25892

5c00 0036 00c2529a

1c00 0121 066b489a

1c00 05ea 0652e89a

1c80 01f0 0652e09a

9c00 0056 00c25c7a

9c00 003e 00c25e92

9c00 0056 00ad527a

9c00 003e 00ad5092

dc00 0036 00ad549a

9c00 004e 00c25682

1c00 003e 00c25492

5c00 0036 00c25a9a

1c00 0123 065c009a

3c00 040d 066b409a

Rx @base c01ef408 :

9c00 0040 07b34000

<deleted>

bc00 0040 07b25800

+++++++++++++++++ similar problems ++++++++++++++++++++

1. http://patchwork.ozlabs.org/linuxppc/patch?id=1853

2. From: hubert loewenguth <[email protected]>
To: [email protected]
Subject: MPC8260 fcc_enet transmit timed out
Date: Mon, 14 Nov 2005 18:34:32 +0100

<deleted>
I have found some personns in this mailling list who has encounter a problem wich seems similar:

http://ozlabs.org/pipermail/linuxppc-embedded/2005-January/016539.html
http://ozlabs.org/pipermail/linuxppc-embedded/2001-December/005714.html
<deleted>
+++++++++++++++++ similar problems ++++++++++++++++++++

Thanks,
Siju Viswanath K E
Tejas Networks

#1 lore raw
Quoted 2 lines · In message <1143177651.22246.3.camel@Blaze> you wrote:

I am using denk's linuxppc-2.4.20 . I am getting this problem of

Why don't you try using a more current version of the code? 2.4.20 is *very* old, and *lots* of bugs and problems have been fixed since.

It really does not make sense to spend effort on such old code.

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected]
Those who do not  understand  Unix  are  condemned  to  reinvent  it,
poorly.              - Henry Spencer, University of Toronto Unix hack
#2 lore raw

Hi Denk,
Thanks for the suggestion. I had a look at the source repository
at projects/linuxppc_2_4_devel.git site. Outdated code doesnt seem to be the issue. My repository is patched upto
"Patch by Wojciech Kromer, 06 Jan 2004" and later changes are only adding extra board support.

regards,
Siju Viswanath

Quoted 12 lines · Wolfgang Denk
Quoted 2 lines · In message <1143177651.22246.3.camel@Blaze> you wrote:

I am using denk's linuxppc-2.4.20 . I am getting this problem of

Why don't you try using a more current version of the code? 2.4.20 is *very* old, and *lots* of bugs and problems have been fixed since.

It really does not make sense to spend effort on such old code.

Best regards,

Wolfgang Denk

#3 lore raw

Re: "transmit timed out" on FCC in MPC8260 => bug corrected

Hi to the community.

I'm the man who has posted numerous questions about this problem of fcc_enet timeout in ppc8260.
I just want to say that the 2.6 kernel doesn't solve the problem if you have it on your board (I tried it, normally I have a 2.4-20 linux too). I have search for this bug during a long time, and fortunatly, I 'm happy to say you that finally, it is corrected since few days. Special thanks to "Hunter, David" for having take in consideration my problem, and proposing me some way of invastigations in this thread:

http://ozlabs.org/pipermail/linuxppc-embedded/2006-January/021842.html

In fact the solution comes from the new "MPC8260 PowerQUICC II Family Reference Manual" fresescale has delivered 01/19/2006.
http://www.freescale.com/files/product/doc/MPC8260UM.pdf

They have added a very interesting paragraph about error handling in ethernet mode:

/29.10.1.3 Adjusting Transmitter BD Handling
When a TXE event occurs, the TBPTR may already point beyond BDs still marked as ready due to internal
pipelining. If the TBPTR is not adjusted, these BDs would be skipped while still being marked as ready.
Software must determine if these BDs should be retransmitted or if they should be skipped, depending on
the protocol and application needs. This requires the following steps:
1. From the current TBPTR value, search backwards over all (if any) BDs still marked as ready to
find the first BD that has not been closed by the CPM. The search process should stop if the BD to
be checked next is not ready or if it is the most recent BD marked as ready by the CPU transmit
software. This is to avoid an endless loop in case the CPU software fills the BD ring completely.
2. A) For skipping BDs, manually close all BDs from the BD just found up to and including the BD
just before TBPTR. Leave the TBPTR value untouched.
B) For retransmitting BDs, change the TBPTR value to point to the BD just found.
/
So, here is the correction I have done to the fcc-enet.c driver, and wich I'am very satsify
I have tested it on my platform which was always entering in this infernal timeout loop when there was successive plug/unplug during important data transfert. Thanks to some trace, I have seen that, as it is said in the new manual, the error comes from the pipelining and a bad restart procedure in the driver. (I think it is the same restart procedure in the 2.6 kernel ??? to verify ...)
With this correction, I have no more infernal timeout loop.
In fact, I replace the restart procedure in the fcc_enet_interrupt method by this one, which respect the MPC8260 manual restart procedure:

if (must_restart) {
volatile cpm8260_t *cp;

/* Some transmit errors cause the transmitter to shut
* down. We now issue a restart transmit. Since the
* errors close the BD and update the pointers, the restart
* _should_ pick up without having to reset any of our
* pointers either. Also, To workaround 8260 device erratum
* CPM37, we must disable and then re-enable the transmitter
* following a Late Collision, Underrun, or Retry Limit error. */

// disable Transmitter
cep->fccp->fcc_gfmr &= ~FCC_GFMR_ENT; udelay(10); /* wait a few microseconds just on principle */

#ifdef THALES_DEBUG_TRACE
printk("Thales restart debug trace :\n"); printk("first dirty tx %d, final dirty_tx %d, tbptr

%d\n",cbt_ptr2index(dev,first_bdp_dirty_tx),cbt_ptr2index(dev,cep->dirty_tx),tbptr_ptr2index(dev,ep->fen_genfcc.fcc_tbptr));
       #endif
                                  
       // RESTART TX command to the cpm
       cp = cpmp;
       cp->cp_cpcr = mk_cr_cmd(cep->fip->fc_cpmpage, 
cep->fip->fc_cpmblock,0x0c, CPM_CR_RESTART_TX) | CPM_CR_FLG;
       while (cp->cp_cpcr & CPM_CR_FLG);
      
       // Adjusting Transmitter BD Handling
       /* HLO : I do not search backwards from the current TBPTR value 

to found skip BDs, but I directly
* adjust the tbptr value to the dirty_tx current value.
* In case of problemes occuring, change it and do like
indicated in 29.10.3 of MPC8260 manual

        */
       ep->fen_genfcc.fcc_tbptr = __pa(cep->dirty_tx);
      
       #ifdef THALES_DEBUG_TRACE
       printk(" Thales workaround tbptr value adjusted : 
%d\n",tbptr_ptr2index(dev,ep->fen_genfcc.fcc_tbptr));
       #endif
      
       // re-enable Transmitter       
       cep->fccp->fcc_gfmr |=  FCC_GFMR_ENT;

       }

I hope this correction will help you and the community.

Best regards

Quoted 25 lines · Siju Viswanath K E

Hi Denk,
Thanks for the suggestion. I had a look at the source repository
at projects/linuxppc_2_4_devel.git site. Outdated code doesnt seem to be
the issue. My repository is patched upto "Patch by Wojciech Kromer, 06 Jan 2004" and later changes are only adding extra board support.

regards,
Siju Viswanath

Quoted 13 lines · Wolfgang Denk
Quoted 3 lines · In message <1143177651.22246.3.camel@Blaze> you wrote:

I am using denk's linuxppc-2.4.20 . I am getting this problem of

Why don't you try using a more current version of the code? 2.4.20 is *very* old, and *lots* of bugs and problems have been fixed since.

It really does not make sense to spend effort on such old code.

Best regards,

Quoted 11 lines
Quoted 3 lines

Wolfgang Denk

_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded

begin:vcard
fn:Hubert Loewenguth
n:Loewenguth;Hubert
org:Thales Broadcast & Multimedia
adr:;;1 rue de l'hautil;Conflans Ste Honorine;;78700;France email;internet:[email protected] title:Software Engineer
tel;work:01-34-90-37-56
x-mozilla-html:TRUE
version:2.1
end:vcard

#5 lore raw
In reply to Siju Viswanath K E
Quoted 4 lines · In message <1143193658.22246.20.camel@Blaze> you wrote:

the issue. My repository is patched upto
"Patch by Wojciech Kromer, 06 Jan 2004" and later changes are only adding extra board support.

This is definitely *not* correct. A *long* list of bugs have been fixed in the last two years.

Best regards,

Wolfgang Denk

Signature · 3 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected]
Life is a game. Money is how we keep score.              - Ted Turner
#4 lore raw

Re: [BULK] Re: "transmit timed out" on FCC in MPC8260 => bug corrected

In reply to hubert.loewenguth

Thanks for the patch.. I have implemented the changes but since it is not very frequent in my case, I dont know whether it works for me yet.

regards,
siju

Quoted 17 lines · hubert.loewenguth

Hi to the community.

I'm the man who has posted numerous questions about this problem of fcc_enet timeout in ppc8260.
I just want to say that the 2.6 kernel doesn't solve the problem if you have it on your board (I tried it, normally I have a 2.4-20 linux too).
I have search for this bug during a long time, and fortunatly, I 'm happy to say you that finally, it is corrected since few days. Special thanks to "Hunter, David" for having take in consideration my problem, and proposing me some way of invastigations in this thread:

http://ozlabs.org/pipermail/linuxppc-embedded/2006-January/021842.html

In fact the solution comes from the new "MPC8260 PowerQUICC II Family
Reference Manual" fresescale has delivered 01/19/2006.
http://www.freescale.com/files/product/doc/MPC8260UM.pdf

#6 lore raw
In reply to Wolfgang Denk
Quoted 8 lines · Wolfgang Denk
Quoted 4 lines · In message <1143193658.22246.20.camel@Blaze> you wrote:

the issue. My repository is patched upto
"Patch by Wojciech Kromer, 06 Jan 2004" and later changes are only adding extra board support.

This is definitely *not* correct. A *long* list of bugs have been fixed in the last two years.

I meant it only regarding the timeout issue for FCC. I was not talking about the repository in general.

regards,
Siju