When DMA packet completion and timer expiry take place at the same time,
do not terminate the DMA engine, leading by submission of new
descriptors, as the DMA communication hasn't necessarily stopped here.
Signed-off-by: Muhammad Hamza Farooq <mfarooq@visteon.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
}
status = dmaengine_tx_status(s->chan_rx, s->active_rx, &state);
- if (status == DMA_COMPLETE)
+ if (status == DMA_COMPLETE) {
dev_dbg(port->dev, "Cookie %d #%d has already completed\n",
s->active_rx, active);
+ spin_unlock_irqrestore(&port->lock, flags);
+
+ /* Let packet complete handler take care of the packet */
+ return;
+ }
/* Handle incomplete DMA receive */
dmaengine_terminate_all(s->chan_rx);