Commit 29e0f486 authored by Anup Patel's avatar Anup Patel Committed by Vinod Koul

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: default avatarAnup Patel <anup.patel@broadcom.com>
Reviewed-by: default avatarRay Jui <ray.jui@broadcom.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 8529a927
...@@ -396,13 +396,17 @@ static int sba_send_mbox_request(struct sba_device *sba, ...@@ -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); dev_err(sba->dev, "send message failed with error %d", ret);
return ret; return ret;
} }
/* Check error returned by mailbox controller */
ret = req->msg.error; ret = req->msg.error;
if (ret < 0) { if (ret < 0) {
dev_err(sba->dev, "message error %d", ret); 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 */ /* Note: Must be called with sba->reqs_lock held */
...@@ -1724,7 +1728,7 @@ static int sba_probe(struct platform_device *pdev) ...@@ -1724,7 +1728,7 @@ static int sba_probe(struct platform_device *pdev)
sba->client.dev = &pdev->dev; sba->client.dev = &pdev->dev;
sba->client.rx_callback = sba_receive_message; sba->client.rx_callback = sba_receive_message;
sba->client.tx_block = false; sba->client.tx_block = false;
sba->client.knows_txdone = false; sba->client.knows_txdone = true;
sba->client.tx_tout = 0; sba->client.tx_tout = 0;
/* Allocate mailbox channel array */ /* Allocate mailbox channel array */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment