All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Romain Perier <romain.perier@free-electrons.com>
Cc: Arnaud Ebalard <arno@natisbad.org>,
	"David S. Miller" <davem@davemloft.net>,
	linux-crypto@vger.kernel.org,
	Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	Jason Cooper <jason@lakedaemon.net>, Andrew Lunn <andrew@lunn.ch>,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	Gregory Clement <gregory.clement@free-electrons.com>
Subject: Re: [PATCH] crypto: marvell - Don't chain at DMA level when backlog is disabled
Date: Fri, 22 Jul 2016 15:22:55 +0200	[thread overview]
Message-ID: <20160722152255.3847cfde@bbrezillon> (raw)
In-Reply-To: <1469191255-17443-1-git-send-email-romain.perier@free-electrons.com>

On Fri, 22 Jul 2016 14:40:55 +0200
Romain Perier <romain.perier@free-electrons.com> wrote:

> The flag CRYPTO_TFM_REQ_MAY_BACKLOG is optional and can be set from the
> user to put requests into the backlog queue when the main cryptographic
> queue is full. Before calling mv_cesa_tdma_chain we must check the value
> of the return status to be sure that the current request has been
> correctly queued or added to the backlog.
> 
> Fixes: 85030c5168f1 ("crypto: marvell - Add support for chaining...")
> Signed-off-by: Romain Perier <romain.perier@free-electrons.com>

Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>

> ---
>  drivers/crypto/marvell/cesa.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/crypto/marvell/cesa.c b/drivers/crypto/marvell/cesa.c
> index e373cc6..d64af86 100644
> --- a/drivers/crypto/marvell/cesa.c
> +++ b/drivers/crypto/marvell/cesa.c
> @@ -180,10 +180,11 @@ int mv_cesa_queue_req(struct crypto_async_request *req,
>  	struct mv_cesa_engine *engine = creq->engine;
>  
>  	spin_lock_bh(&engine->lock);
> -	if (mv_cesa_req_get_type(creq) == CESA_DMA_REQ)
> -		mv_cesa_tdma_chain(engine, creq);
> -
>  	ret = crypto_enqueue_request(&engine->queue, req);
> +	if ((mv_cesa_req_get_type(creq) == CESA_DMA_REQ) &&
> +	    (ret == -EINPROGRESS ||
> +	    (ret == -EBUSY && req->flags & CRYPTO_TFM_REQ_MAY_BACKLOG)))
> +		mv_cesa_tdma_chain(engine, creq);
>  	spin_unlock_bh(&engine->lock);
>  
>  	if (ret != -EINPROGRESS)

  reply	other threads:[~2016-07-22 13:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-22 12:40 [PATCH] crypto: marvell - Don't chain at DMA level when backlog is disabled Romain Perier
2016-07-22 13:22 ` Boris Brezillon [this message]
2016-07-28  5:19 ` Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160722152255.3847cfde@bbrezillon \
    --to=boris.brezillon@free-electrons.com \
    --cc=andrew@lunn.ch \
    --cc=arno@natisbad.org \
    --cc=davem@davemloft.net \
    --cc=gregory.clement@free-electrons.com \
    --cc=jason@lakedaemon.net \
    --cc=linux-crypto@vger.kernel.org \
    --cc=romain.perier@free-electrons.com \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=thomas.petazzoni@free-electrons.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.