dmaengine: bcm-sba-raid: Use only single mailbox channel
authorAnup Patel <anup.patel@broadcom.com>
Tue, 3 Oct 2017 05:22:58 +0000 (10:52 +0530)
committerVinod Koul <vinod.koul@intel.com>
Mon, 23 Oct 2017 06:05:47 +0000 (11:35 +0530)
commit4e9f8187aecb00d90ec385f5061c91549103a3cf
tree88486f2e78bdf3419a6d94c1673b60f2196ea52e
parent5d74aa7f641a8bf778b87941ae6a955121f64f7d
dmaengine: bcm-sba-raid: Use only single mailbox channel

Each mailbox channel used by Broadcom SBA RAID driver is
a separate HW ring.

Currently, Broadcom SBA RAID driver creates one DMA channel
using one or more mailbox channels. When we are using more
than one mailbox channels for a DMA channel, the sba_request
are distributed evenly among multiple mailbox channels which
results in sba_request being completed out-of-order.

The above described out-of-order completion of sba_request
breaks the dma_async_is_complete() API because it assumes
DMA cookies are completed in orderly fashion.

To ensure correct behaviour of dma_async_is_complete() API,
this patch updates Broadcom SBA RAID driver to use only
single mailbox channel. If additional mailbox channels are
specified in DT then those will be ignored.

Signed-off-by: Anup Patel <anup.patel@broadcom.com>
Reviewed-by: Ray Jui <ray.jui@broadcom.com>
Reviewed-by: Scott Branden <scott.branden@broadcom.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/bcm-sba-raid.c