gen83xx ethernet transmit problem
Thomas Dörfler
Thomas.Doerfler at embedded-brains.de
Tue Jun 9 08:47:09 UTC 2009
Hi David,
David Brooke wrote:
> Hello,
>
> I've spent some time investigating a problem with ethernet
> transmitting corrupt data. From the viewpoint of the CPU (debug
> prints and RTEMS shell memory dumps) all the data structures appear
> to be correct and I'm now fairly sure that the problem is that the
> data buffer is not being pushed out from cache to main memory before
> the TSEC DMA transfer reads the data. A quick hack to create 2
> buffer descriptors pointing to the same data buffer results in a
> corrupt packet followed immediately by a correct packet. The corrupt
> packet contains mostly the specific data with which I initialised
> the heap but with a few bytes set to the correct data.
This really sounds like a cache problem.
>
> The TSEC driver sets both of the snoop enable bits (TBDSEN and
> TDSEN) in the TSEC DMACTRL register and it seems that the BD are
> being read correctly, but the actual data buffer is not correct. My
> understanding is that setting these bits should ensure that the
> buffer is pushed out of cache before the DMA transfer is allowed to
> continue.
Right, this wokrs fine on MPC8349 and MPC8313.
>
> The ethernet works fine in U-Boot and I'm network loading the RTEMS
> image.
Does U-Boot have the data cache enabled?
>
> I suspect that something is being misconfigured in the RTEMS BSP
> initialisation (although mostly that just uses what U-Boot already
> set up) but have not been able to find anything obviously wrong.
Just a guess: did you check the chip errata from freescale? Is the TSEC
in this chip placed somewhere away from the main processor bus, so
snooping will not work properly?
I do not expect these hints to solve your problem, but have no other
idea right now :-(
wkr,
Thomas.
>
> I would be grateful for any suggestions and can provide more
> information if required.
>
> Regards,
>
> David
>
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-users
--
--------------------------------------------
Embedded Brains GmbH
Thomas Doerfler Obere Lagerstrasse 30
D-82178 Puchheim Germany
email: Thomas.Doerfler at embedded-brains.de
Phone: +49-89-18908079-2
Fax: +49-89-18908079-9
More information about the users
mailing list