serial-tegra dma bug?

In the file:
./drivers/tty/serial/serial-tegra.c
in the function:
tegra_uart_tx_dma_complete(void *args)
in the line:
dmaengine_tx_status(tup->tx_dma_chan, tup->rx_cookie, &state);

Should this not be passing: tup->tx_cookie, to the function?

I’ve not spent a lot of time in this driver or the DMA engine so could you speculate as to what kind of errors this would cause? Tx errors? Rx errors? Both?

Ian Melhuish
Embedded Systems Developer

In that file under both the source_sync.sh version (R28.1) and the separate kernel source download version I do have “tx” cookie in the “tx” functions. Is it possible something edited the dmaengine_tx_status call in your version? I suspect there was some simple “gotcha” causing this, and if you download the source again, it’ll be tx used with tx.

We’re on R24.2 and have never touched this file. I suspect git log would provide some evidence on when this changed. I would be interested to know if there are any other changes in this particular domain that I might need along with this. I can fix this locally as I can’t unilaterally upgrade to R28.1.

R24.2 is rather old, it looks like this was changed to be tx_cookie in later releases. I’d recommend going to R28.1, but it does look like this is in need of patching if you are going to stick with R24.2 (after R24.2 used tx_cookie instead of rx_cookie at that location).