diff options
author | Gilad Ben-Yossef <gilad@benyossef.com> | 2017-10-18 08:00:34 +0100 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2017-11-03 22:11:16 +0800 |
commit | cfba73d25f0eca9f01f565f0243e3083f4667234 (patch) | |
tree | 341a9b523fb465376ae6225f161f0b87b399c1cf /drivers/crypto/ccp/ccp-dev.c | |
parent | 6b80ea389a0bceee6a0a801474b78ad0a8cd034d (diff) | |
download | blackbird-obmc-linux-cfba73d25f0eca9f01f565f0243e3083f4667234.tar.gz blackbird-obmc-linux-cfba73d25f0eca9f01f565f0243e3083f4667234.zip |
crypto: ccp - use -ENOSPC for transient busy indication
Replace -EBUSY with -ENOSPC when reporting transient busy
indication in the absence of backlog.
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Reviewed-by: Gary R Hook <gary.hook@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/ccp/ccp-dev.c')
-rw-r--r-- | drivers/crypto/ccp/ccp-dev.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/crypto/ccp/ccp-dev.c b/drivers/crypto/ccp/ccp-dev.c index 4e029b176641..1b5035d56288 100644 --- a/drivers/crypto/ccp/ccp-dev.c +++ b/drivers/crypto/ccp/ccp-dev.c @@ -292,9 +292,12 @@ int ccp_enqueue_cmd(struct ccp_cmd *cmd) i = ccp->cmd_q_count; if (ccp->cmd_count >= MAX_CMD_QLEN) { - ret = -EBUSY; - if (cmd->flags & CCP_CMD_MAY_BACKLOG) + if (cmd->flags & CCP_CMD_MAY_BACKLOG) { + ret = -EBUSY; list_add_tail(&cmd->entry, &ccp->backlog); + } else { + ret = -ENOSPC; + } } else { ret = -EINPROGRESS; ccp->cmd_count++; |