dmaengine: cppi41: Fix teardown warnings
authorAlexandre Bailon <abailon@baylibre.com>
Mon, 30 Jan 2017 17:49:21 +0000 (18:49 +0100)
committerVinod Koul <vinod.koul@intel.com>
Tue, 7 Mar 2017 08:12:28 +0000 (13:42 +0530)
commit4f68b09ea3ed5b9619568625d967569da055f487
treec31bdb502a76c1beabf1207a16ed7e92225c816f
parente3fa49acf00a6db3bfdee725ac5d688dd98dc2c9
dmaengine: cppi41: Fix teardown warnings

During the teardown of a RX channel, because there is only one
completion queue available for RX channel, descriptor of another
channel may be popped which will cause 2 warnings:
- the first one because we popped a wrong descriptor
  (neither the channel's descriptor, nor the teardown descriptor).
- the second one happen during the teardown of another channel,
  because we can't find the channel descriptor
  (that is, the one that caused the first warning).
To avoid that, use one free queue instead of a transmit completion queue.

Note that fix doesn't fix all the teardown warnings:
I still get some when I run some corner case.

Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/cppi41.c