MPC5200B FEC TX packets getting stuck

Joey Nelson joey at joescan.com
Wed Feb 8 13:47:04 EST 2012


I've revisited my testing, and found I was wrong about the packets
getting stuck in the FEC queue.  The packets are getting stuck in the
bestcomm.

I generate a timestamp for each skb's ip_hdr->id at the beginning of
mpc52xx_fec_start_xmit, and for each skb retrieved from the bestcomm.

Typically the packets make it through bestcomm in under 200us.  But
sometimes a single packet will sit in bestcomm until the next packet
added.  In the case of a delayed ACK this can be around 400ms.

When I look at the state of the registers when this condition is
detected (before adding the next bd):

tx_dmatsk->flags = 1
tcr[1] = 0x20c1

Both of these values seem to indicate the the TX task is disabled.
I'm pretty sure that nothing in the kernel is disabling the task, so
it must be an automatic behavior.  I notice that
bcom_submit_next_buffer() checks the task->flags and if the LSB is set
it enables the task.  So I'm guessing that is what gets things moving
again when the freeze happens.

My best guess is this is a race condition between the driver and the
dma controller.  Is there any risk to just calling bcom_enable(tsk).
Maybe after a short sleep.


Joey Nelson


More information about the Linuxppc-dev mailing list