diff options
author | Loic Poulain <loic.poulain@linaro.org> | 2020-12-02 17:35:43 +0100 |
---|---|---|
committer | Loic Poulain <loic.poulain@linaro.org> | 2020-12-04 10:07:35 +0100 |
commit | 26a89363493c0e518864f41f564eb9459ed097c1 (patch) | |
tree | a8543ce41b9d3a02e2138e5c28037ec9e898ce00 | |
parent | 35e5899fe95e4ff151462c8566a84cbd70d217bb (diff) |
mhi: core: Print message in case of DMA mapping error
Print a realelimited error in case of buffer mapping error. That can
be useful to determine root cause of buffer queuing issues.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
-rw-r--r-- | drivers/bus/mhi/core/main.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/bus/mhi/core/main.c b/drivers/bus/mhi/core/main.c index be542bfb3988..3aa085e6390b 100644 --- a/drivers/bus/mhi/core/main.c +++ b/drivers/bus/mhi/core/main.c @@ -155,8 +155,10 @@ int mhi_map_single_no_bb(struct mhi_controller *mhi_cntrl, buf_info->p_addr = dma_map_single(mhi_cntrl->cntrl_dev, buf_info->v_addr, buf_info->len, buf_info->dir); - if (dma_mapping_error(mhi_cntrl->cntrl_dev, buf_info->p_addr)) + if (dma_mapping_error(mhi_cntrl->cntrl_dev, buf_info->p_addr)) { + dev_err_ratelimited(mhi_cntrl->cntrl_dev, "Unable to map buffer\n"); return -ENOMEM; + } return 0; } |