I am using spi-omap2-mcspi to drive a network card based on enc28j60 and everything works perfect if I define
DMA_MIN_BYTES = 0 (force to use DMA only) or DMA_MIN_BYTES = 99999 (force to use PIO only).
But if I use the original value of 160, the board can send out 10 to 20 pings approximately
and if any time the drive switch from PIO to DMA what will be decided by the size of data,
some workqueue tasks hung and the card stops.
I am using the kernel 3.13.6 patched to beaglebone and did test also with the mainline 3.14.0 and the problem is exactly the same.
I am running with “lockdep” and “detect hung tasks” and I can see that four tasks are stopped,
three from enc28j60 and one from spi-omap2-mcspi.
The mcspi is stopped in spi-omap2.mcspi.c:480 to wait the completion of omap2_mcspi_rx_callback
that it never happens.
469 tx->callback = omap2_mcspi_rx_callback;
470 tx->callback_param = spi;
472 } ``else
473 ``/* FIXME: fall back to PIO? */``` 474 }
Any help/suggestion is welcome. Need more information, please let me know, I have more details.