Fix potential stall with Coldfire Ethernet
Tarmo Kuuse
tarmo.kuuse@mail.ee
Tue Mar 3 11:45:00 GMT 2009
Hi,
While struggling with eCos on Coldfire 5208 I stumbled on a nasty bug.
The fast ethernet controller often stalls if transmission is flagged
immediately after copying data to buffer.
I have no idea why this happens. Maybe my compiler (from CodeSourcery,
not eCos) does something to confuse the FEC. Maybe the 5208 hardware is
buggy.
Hopefully the currently supported devices (5282 and 532x) are safe when
built with eCos toolchain (I cannot test it). The patch could save a few
neurons for someone.
Patch adds a NOP between filling the buffer and flagging the transmitter.
There is also a small change on how TX buffer descriptors are allocated
- a loop is used instead of two individual statements. It was quite
annoying having to debug after changing the BD count.
--
Kind regards,
Tarmo Kuuse
-------------- next part --------------
A non-text attachment was scrubbed...
Name: if_mcf5272_fix_stall.patch
Type: text/x-patch
Size: 3076 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/ecos-patches/attachments/20090303/0ea39351/attachment.bin>
More information about the Ecos-patches
mailing list