* [PATCH -next] crypto: ux500 catch dma submission error
@ 2018-12-28 6:10 ` YueHaibing
0 siblings, 0 replies; 4+ messages in thread
From: YueHaibing @ 2018-12-28 6:10 UTC (permalink / raw)
To: Herbert Xu, Markus Elfring, Greg Kroah-Hartman,
Nathan Chancellor, Randy Dunlap
Cc: YueHaibing, linux-crypto, kernel-janitors
Test cookie return by dmaengine_submit() and return error if any.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/crypto/ux500/cryp/cryp_core.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/crypto/ux500/cryp/cryp_core.c b/drivers/crypto/ux500/cryp/cryp_core.c
index a92a66b..db94f89 100644
--- a/drivers/crypto/ux500/cryp/cryp_core.c
+++ b/drivers/crypto/ux500/cryp/cryp_core.c
@@ -595,6 +595,12 @@ static int cryp_set_dma_transfer(struct cryp_ctx *ctx,
}
cookie = dmaengine_submit(desc);
+ if (dma_submit_error(cookie)) {
+ dev_dbg(ctx->device->dev, "[%s]: DMA submission failed\n",
+ __func__);
+ return cookie;
+ }
+
dma_async_issue_pending(channel);
return 0;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH -next] crypto: ux500 catch dma submission error
@ 2018-12-28 6:10 ` YueHaibing
0 siblings, 0 replies; 4+ messages in thread
From: YueHaibing @ 2018-12-28 6:10 UTC (permalink / raw)
To: Herbert Xu, Markus Elfring, Greg Kroah-Hartman,
Nathan Chancellor, Randy Dunlap
Cc: YueHaibing, linux-crypto, kernel-janitors
Test cookie return by dmaengine_submit() and return error if any.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/crypto/ux500/cryp/cryp_core.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/crypto/ux500/cryp/cryp_core.c b/drivers/crypto/ux500/cryp/cryp_core.c
index a92a66b..db94f89 100644
--- a/drivers/crypto/ux500/cryp/cryp_core.c
+++ b/drivers/crypto/ux500/cryp/cryp_core.c
@@ -595,6 +595,12 @@ static int cryp_set_dma_transfer(struct cryp_ctx *ctx,
}
cookie = dmaengine_submit(desc);
+ if (dma_submit_error(cookie)) {
+ dev_dbg(ctx->device->dev, "[%s]: DMA submission failed\n",
+ __func__);
+ return cookie;
+ }
+
dma_async_issue_pending(channel);
return 0;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH -next] crypto: ux500 catch dma submission error
2018-12-28 6:10 ` YueHaibing
@ 2019-01-11 6:31 ` Herbert Xu
-1 siblings, 0 replies; 4+ messages in thread
From: Herbert Xu @ 2019-01-11 6:31 UTC (permalink / raw)
To: YueHaibing
Cc: Markus Elfring, Greg Kroah-Hartman, Nathan Chancellor,
Randy Dunlap, linux-crypto, kernel-janitors
On Fri, Dec 28, 2018 at 06:10:33AM +0000, YueHaibing wrote:
> Test cookie return by dmaengine_submit() and return error if any.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> drivers/crypto/ux500/cryp/cryp_core.c | 6 ++++++
> 1 file changed, 6 insertions(+)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -next] crypto: ux500 catch dma submission error
@ 2019-01-11 6:31 ` Herbert Xu
0 siblings, 0 replies; 4+ messages in thread
From: Herbert Xu @ 2019-01-11 6:31 UTC (permalink / raw)
To: YueHaibing
Cc: Markus Elfring, Greg Kroah-Hartman, Nathan Chancellor,
Randy Dunlap, linux-crypto, kernel-janitors
On Fri, Dec 28, 2018 at 06:10:33AM +0000, YueHaibing wrote:
> Test cookie return by dmaengine_submit() and return error if any.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> drivers/crypto/ux500/cryp/cryp_core.c | 6 ++++++
> 1 file changed, 6 insertions(+)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-01-11 6:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-28 6:10 [PATCH -next] crypto: ux500 catch dma submission error YueHaibing
2018-12-28 6:10 ` YueHaibing
2019-01-11 6:31 ` Herbert Xu
2019-01-11 6:31 ` Herbert Xu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.