OSDN Git Service

net: fec: Workaround for imx6sx enet tx hang when enable three queues
authorFugang Duan <B38611@freescale.com>
Tue, 16 Sep 2014 21:18:54 +0000 (05:18 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Sep 2014 19:36:50 +0000 (15:36 -0400)
commit37d6017b84f7a33f1089a7fc586554746e2c9f7b
tree79d735cffae4ee3417da527a3f8f1162b4ba3976
parent73e7228941b135ecca14ab101752bd2d38126046
net: fec: Workaround for imx6sx enet tx hang when enable three queues

When enable three queues on imx6sx enet, and then do tx performance
test with iperf tool, after some time running, tx hang.

Found that:
If uDMA is running, software set TDAR may cause tx hang.
If uDMA is in idle, software set TDAR don't cause tx hang.

There is a TDAR race condition for mutliQ when the software sets TDAR
and the UDMA clears TDAR simultaneously or in a small window (2-4 cycles).
This will cause the udma_tx and udma_tx_arbiter state machines to hang.
The issue exist at i.MX6SX enet IP.

So, the Workaround is checking TDAR status four time, if TDAR cleared by
hardware and then write TDAR, otherwise don't set TDAR.

The patch is only one Workaround for the issue ERR007885.

Signed-off-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: Frank Li <Frank.Li@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fec_main.c