Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

crypto: qce - Provide dev_err_probe() status on DMA failure

On multiple occasions the qce device have shown up in devices_deferred,
without the explanation that this came from the failure to acquire the
DMA channels from the associated BAM.

Use dev_err_probe() to associate this context with the failure to faster
pinpoint the culprit when this happens in the future.

Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
Reviewed-by: Abel Vesa <abel.vesa@linaro.org>
Reviewed-by: David Heidelberg <david@ixit.cz>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Bjorn Andersson and committed by
Herbert Xu
f5e297a1 12ad5b23

+4 -2
+4 -2
drivers/crypto/qce/dma.c
··· 24 24 25 25 dma->txchan = dma_request_chan(dev, "tx"); 26 26 if (IS_ERR(dma->txchan)) 27 - return PTR_ERR(dma->txchan); 27 + return dev_err_probe(dev, PTR_ERR(dma->txchan), 28 + "Failed to get TX DMA channel\n"); 28 29 29 30 dma->rxchan = dma_request_chan(dev, "rx"); 30 31 if (IS_ERR(dma->rxchan)) { 31 - ret = PTR_ERR(dma->rxchan); 32 + ret = dev_err_probe(dev, PTR_ERR(dma->rxchan), 33 + "Failed to get RX DMA channel\n"); 32 34 goto error_rx; 33 35 } 34 36