summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/ccp
diff options
context:
space:
mode:
authorTom Lendacky <thomas.lendacky@amd.com>2014-02-24 08:42:02 -0600
committerHerbert Xu <herbert@gondor.apana.org.au>2014-02-27 05:57:00 +0800
commit0611451b4e78ecb77b3323657f2ab4aadd6d28b3 (patch)
tree0b8ae396f8cf95d415bb5c0309ab7840613474a9 /drivers/crypto/ccp
parentf829e7a32c9434e31e565bc79f5804a7a984c10f (diff)
downloadlinux-0611451b4e78ecb77b3323657f2ab4aadd6d28b3.tar.gz
linux-0611451b4e78ecb77b3323657f2ab4aadd6d28b3.tar.bz2
linux-0611451b4e78ecb77b3323657f2ab4aadd6d28b3.zip
crypto: ccp - Prevent a possible lost CCP command request
If a CCP command has been queued for processing at the crypto layer then, when dequeueing it for processing, the "can backlog" flag must be set so that the request isn't lost if the CCP backlog queue limit is reached. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/ccp')
-rw-r--r--drivers/crypto/ccp/ccp-crypto-main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/crypto/ccp/ccp-crypto-main.c b/drivers/crypto/ccp/ccp-crypto-main.c
index 010fded5d46b..9d30d6fbfd3d 100644
--- a/drivers/crypto/ccp/ccp-crypto-main.c
+++ b/drivers/crypto/ccp/ccp-crypto-main.c
@@ -174,6 +174,10 @@ static void ccp_crypto_complete(void *data, int err)
/* Submit the next cmd */
while (held) {
+ /* Since we have already queued the cmd, we must indicate that
+ * we can backlog so as not to "lose" this request.
+ */
+ held->cmd->flags |= CCP_CMD_MAY_BACKLOG;
ret = ccp_enqueue_cmd(held->cmd);
if (ccp_crypto_success(ret))
break;