imx6q: work around fec tx-queue timeouts when SATA/SD + ethernet is active with high throughput

Message ID
State New
Headers show

Commit Message

Thomas Scheiblauer Oct. 15, 2013, 9:38 a.m.
When data is transferred from SATA or is SD-card tx-queue timeouts occur
on the ethernet leading to network bandwidth drops to zero every few
seconds lasting for about 2-3 seconds (NETDEV WATCHDOG timeout?).
This issue gets more apparent the higher the throughput on on all of the
mentioned data channels becomes.
To reproduce it ethernet throughput should be beyond 40MB/s and SATA or
SD at least 35MB/s. Below these values the problem may not be
According to Duan Fugang-B38611 <> it is an SMP
related problem that does not appear to happen when running on only one
CPU. His proposed work around (fix?) was to increase TX_RING_SIZE in
drivers/net/ethernet/freescale/fec.h to 64.
In my tests this helped a lot though it didn't completely remedy the
issue. I was now able to run at least a couple of minutes with high
throughput not having tx-queue timeouts but they still happened now and
I'm submitting this patch based on Duan Fugang's findings for review and
possible further improvement since it doesn't seem like this issue will
be explored further by the Freescale(?) people judging by Duan Fugang's
most recent email he sent to me and I'm not sure which further
consequences the TX_RING_SIZE change will have (increased network

Signed-off-by: Thomas Scheiblauer <>
 drivers/net/ethernet/freescale/fec.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


diff --git a/drivers/net/ethernet/freescale/fec.h
index 0120217..ee9a1da 100644
--- a/drivers/net/ethernet/freescale/fec.h
+++ b/drivers/net/ethernet/freescale/fec.h
@@ -246,7 +246,7 @@  struct bufdesc_ex {
 #define FEC_ENET_TX_FRSIZE     2048
-#define TX_RING_SIZE           16      /* Must be power of two */
+#define TX_RING_SIZE           64      /* Must be power of two */
 #define TX_RING_MOD_MASK       15      /*   for this to work */
 #define BD_ENET_RX_INT          0x00800000