JIM LAMBERSON

FEC problem with EMRBR?

Discussion created by JIM LAMBERSON on Apr 19, 2007
Latest reply on May 8, 2007 by JIM LAMBERSON
I am using M52233 in a network application for which I have developed my own high performance driver and protocol stack.  Everything works fine except the fec seems to drop all packets that are larger than the value programmed into EMRBR (Receive Buffer Size Register).  I never get a receive interrupt when the received packet size exceeds the EMRBR value, but I always get an interrupt when the size is less than the EMRBR value.
 
I have verified that when I change the EMRBR value (and make a commensurate change to the buffer size) I can then receive packets up to that size.  Furthermore, I have inspected the Rx BD ring and verified that consecutive BDs have the Empty bit set, so I can find no reason that the fec would drop packets due to, say, insufficient buffer space.
 
It appears that EMRBR specifies not only the scatter/gather buffer size, but also the maximum packet size that the fec will accept.  Curiously, all reference designs I have seen program EMRBR to large values, on the order of a maximum-sized Ethernet packet.
 
Here's another curiosity.  All of the reference designs program the Rx BD Data Length fields before releasing the BDs to the dma engine, even though the documentation clearly states that this field is written by the dma engine upon packet receive (and so I assume the dma engine will never read this field).  I'm getting the feeling that the driver is supposed to pass the buffer size to the dma engine via the BD Data Length field instead of through EMRBR.
 
Is this a bug in the fec or documentation?  If not, would someone please give me some ideas about how I can resolve this?  Thanks!
 

Outcomes