summaryrefslogtreecommitdiff
path: root/drivers/dma/bcm-sba-raid.c
diff options
context:
space:
mode:
authorAnup Patel <anup.patel@broadcom.com>2017-08-22 12:57:05 +0300
committerVinod Koul <vinod.koul@intel.com>2017-08-28 14:14:24 +0300
commit29e0f486d975fabbadb770f957adeb75d73ab2d0 (patch)
treed276e26ac131e6e8a4040a876663100501310582 /drivers/dma/bcm-sba-raid.c
parent8529a927e2fcaab010e9c3ed261b96e6ec1f375b (diff)
downloadlinux-29e0f486d975fabbadb770f957adeb75d73ab2d0.tar.xz
dmaengine: bcm-sba-raid: Explicitly ACK mailbox message after sending
We should explicitly ACK mailbox message because after sending message we can know the send status via error attribute of brcm_message. This will also help SBA-RAID to use "txdone_ack" method whenever mailbox controller supports it. Signed-off-by: Anup Patel <anup.patel@broadcom.com> Reviewed-by: Ray Jui <ray.jui@broadcom.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/bcm-sba-raid.c')
-rw-r--r--drivers/dma/bcm-sba-raid.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/dma/bcm-sba-raid.c b/drivers/dma/bcm-sba-raid.c
index 53161b3ca8b9..c3643d30e31b 100644
--- a/drivers/dma/bcm-sba-raid.c
+++ b/drivers/dma/bcm-sba-raid.c
@@ -396,13 +396,17 @@ static int sba_send_mbox_request(struct sba_device *sba,
dev_err(sba->dev, "send message failed with error %d", ret);
return ret;
}
+
+ /* Check error returned by mailbox controller */
ret = req->msg.error;
if (ret < 0) {
dev_err(sba->dev, "message error %d", ret);
- return ret;
}
- return 0;
+ /* Signal txdone for mailbox channel */
+ mbox_client_txdone(sba->mchans[mchans_idx], ret);
+
+ return ret;
}
/* Note: Must be called with sba->reqs_lock held */
@@ -1724,7 +1728,7 @@ static int sba_probe(struct platform_device *pdev)
sba->client.dev = &pdev->dev;
sba->client.rx_callback = sba_receive_message;
sba->client.tx_block = false;
- sba->client.knows_txdone = false;
+ sba->client.knows_txdone = true;
sba->client.tx_tout = 0;
/* Allocate mailbox channel array */