Message ID | 20170209214957.11781.30020.stgit@taos (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Herbert Xu |
Headers | show
Return-Path: <linux-crypto-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D23D9601C3 for <patchwork-linux-crypto@patchwork.kernel.org>; Thu, 9 Feb 2017 21:51:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C44102854A for <patchwork-linux-crypto@patchwork.kernel.org>; Thu, 9 Feb 2017 21:51:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B932C28553; Thu, 9 Feb 2017 21:51:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1275F28552 for <patchwork-linux-crypto@patchwork.kernel.org>; Thu, 9 Feb 2017 21:51:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753927AbdBIVv0 (ORCPT <rfc822;patchwork-linux-crypto@patchwork.kernel.org>); Thu, 9 Feb 2017 16:51:26 -0500 Received: from mail-cys01nam02on0069.outbound.protection.outlook.com ([104.47.37.69]:51472 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752301AbdBIVvK (ORCPT <rfc822;linux-crypto@vger.kernel.org>); Thu, 9 Feb 2017 16:51:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=3ru+bWMEP1L9IDUcEuTnSYvyQG/GcnmleoDVzQgKMKw=; b=npLurAGbhDWvnNyfx1O+ahwUlXHIarOK9v3705dvmKodEHPNzydy1Dk83TbNoKU+hk4wobFJm3uUQlMrguRDebD2a46kHVpLWcYL5IYq4C2l7J60EG8smbg2z/M/T8YaoPU6SG5Bq8WArArDtRotuKk9c+mUvSEbvtPG6OgO/Po= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Gary.Hook@amd.com; Received: from [10.236.19.42] (165.204.77.1) by MWHPR12MB1407.namprd12.prod.outlook.com (10.169.206.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.16; Thu, 9 Feb 2017 21:50:04 +0000 Subject: [PATCH v2 2/3] crypto: ccp - Update the command queue on errors From: Gary R Hook <gary.hook@amd.com> To: <linux-crypto@vger.kernel.org> CC: <thomas.lendacky@amd.com>, <herbert@gondor.apana.org.au>, <davem@davemloft.net> Date: Thu, 9 Feb 2017 15:49:57 -0600 Message-ID: <20170209214957.11781.30020.stgit@taos> In-Reply-To: <20170209214704.11781.28640.stgit@taos> References: <20170209214704.11781.28640.stgit@taos> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: DM5PR16CA0044.namprd16.prod.outlook.com (10.172.42.158) To MWHPR12MB1407.namprd12.prod.outlook.com (10.169.206.18) X-MS-Office365-Filtering-Correlation-Id: 9d639111-f537-4410-e016-08d451359b8a X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081); SRVR:MWHPR12MB1407; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1407; 3:Y9HbfbEEAXs/T3+hii14NIlD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BW1q6qProG/W7aMJaC1l2cQ+NQ3x4DFTCgfZdPoWgKMz8uOFYmL5pgxLp1yyaFGyPnwYlndMlNcWb+peYPM7rCns/OdacWfku+wr4xJhjlG7V5RHwtS9i2KJL6IBUtt7Nn7t63hj57O/qteskYdMLWNpRDnSgu2d6nwT+cZqX0I+spfnUuH7MeVvpYBeOj+DJyC2tJOm7Msp7OaPUbZLCvJd4pDOY5bfBTMTWi/S2W0AKrFa2Hs2Nqphmt3aci8Zg+kQbMMlBJjQxffzOm4T33RVwaqspCOsmOa6D3k+i5oizO8uGjNbVHcCVd5OpyU6L6DOffD4rG9bnq4kWP0Z/t6+WWvKzNE1+RRrpihDejIk2w5IEN1A5VxRwCogr9JCFnV6iX7es8OhP8LyLYGuo+jbRtqvwSpEfpSyKXWWH4Wd+BrTIFUiBlyYEDiBR7hiOHi8ePPdDobeXniExKLd/nvE4 X-Microsoft-Antispam-PRVS: <MWHPR12MB140726FFE82E87695456B27DFD450@MWHPR12MB1407.namprd12.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026)(6041248)(20161123558025)(20161123560025)(20161123555025)(20161123564025)(20161123562025)(6072148); SRVR:MWHPR12MB1407; BCL:0; PCL:0; RULEID:; SRVR:MWHPR12MB1407; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1407; 4:M4Less1D0w+zAn6K0uFckc7qYQIyjz0S8HR8LGIJDasH06lx+U5Mj2E2heD0QB+/qoqJwbUUdcTX7BprWF92Yw1/3EVUX6q4+Ro8zlMYLMy9kS3IVPjxgCMsH5B19oODgEiu0nb4wRTkHLOgHhWxc9AZRWiyZMWhx1i+TVO5w9rOBBGEnwE4irP0KtTBYIa9g67+EoRh2bbqR5sTvE82ZKuHwPfchGlf942PpQcmOsZwSPO7R1yHqTAalpX8RrxwWcjhHS+N9EvvI3bufSrrpKerLgGQCrrJTQMcgviGHrCb7ls3ofPC8uLW/v5S/hU9oc2y0d5OPRZjaXbagUXdcDXiozvztIDY4uI7ExB7w7KSWLmPaHk1NM4UVAZfdATd3uVxDNwNFFgHbjomnLkI6jxWK+W1iOKNR4ty2kN6uFRjesZYSSsK46ff7jENED//6nu4J660CknuBikdpHRx0Z/l5U++JMaNaktcpFEiwUyQTdVIJhVBFXCOnLh2a8QyzPjJOmdON5Hk9O3TAs8HSo4LKOvBMHuPCZMb29S5u3QyBQ6PxfEgtPsIe0WKK3R4S7xfxwbb2hQ2TFv0t+TNViBlJQCxJjB63SW9L4K5YJRCHnI8ziBqRv30nss2lQfIaAiVjAlpsObuy/Qe2kRuzl4q7Bf+iH3lIUf/44u8YWc= X-Forefront-PRVS: 02135EB356 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6049001)(6009001)(7916002)(39840400002)(39860400002)(39450400003)(39850400002)(39410400002)(189002)(199003)(9686003)(66066001)(2351001)(105586002)(47776003)(1076002)(3846002)(6116002)(103116003)(106356001)(110136004)(33716001)(54906002)(90366009)(23676002)(6486002)(77096006)(53936002)(38730400002)(25786008)(42186005)(50466002)(92566002)(7736002)(86362001)(2906002)(305945005)(5660300001)(97746001)(83506001)(68736007)(4001350100001)(4326007)(54356999)(81156014)(230700001)(6666003)(6916009)(101416001)(2950100002)(189998001)(8676002)(76176999)(33646002)(50986999)(97736004)(81166006); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR12MB1407; H:[10.236.19.42]; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtNV0hQUjEyTUIxNDA3OzIzOmY5Y2ptWUF0dG5RTDI0Sm5KSHhxWHk0aCt0?= =?utf-8?B?QyttY2ZUeDdrSUhndXRGWGE1b3U1VE51VDFnQWdIM1dVNGFna3ljWlVxWVZ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h7AVynuDjF5ekMdQvqiEq+YNf7kHSRJK3cBO1K2opFP5Za2Fc0+4aOeiynqm8h7DCFWEQ+5VnUz5Cyi08S3gmzfSdyqOPHlQyytMcENyvAmAtFW1iMPGls31sZNcXod22tmk55/NtTNyvwgE5x6urSDCmkOL/o9lzTClbUMa52M+3k10rhJv/SN9R7UzkDW9ne+4dkVzzcMlabMusGKKixHJZTvvH1oxJEM8VCJkWkrTnGvlcEvoHHMnjKFCmrppb359Q==; 20:7d506tnZU3WdEgdqe/ifymJ/+pzXWeCffqlD9zWMUyTJeQwbnhDtYnuvQX1d1GYC2VQz9KN/t5pBes0Vi0YE9d6wFb68k8AleSyyY0luiQprGlpcy+PL6plgQ6WdFw7L/DR16HD3C4AzJ/sfyzbwmzexwCUe6qYAgW7bcqeusZ4trOTdYIgJni402rJ1fmPJY5vL+FYfnm0ZD9DiMZbAwQYCUM5/OfsN7c6ucX4Tv4s7/8afL6QVe1lO/gubqDuD X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Feb 2017 21:50:04.7306 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1407 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: <linux-crypto.vger.kernel.org> X-Mailing-List: linux-crypto@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/crypto/ccp/ccp-dev-v5.c b/drivers/crypto/ccp/ccp-dev-v5.c index 5fb6c8c..d9e1876 100644 --- a/drivers/crypto/ccp/ccp-dev-v5.c +++ b/drivers/crypto/ccp/ccp-dev-v5.c @@ -250,17 +250,20 @@ static int ccp5_do_cmd(struct ccp5_desc *desc, ret = wait_event_interruptible(cmd_q->int_queue, cmd_q->int_rcvd); if (ret || cmd_q->cmd_error) { + /* Log the error and flush the queue by + * moving the head pointer + */ if (cmd_q->cmd_error) ccp_log_error(cmd_q->ccp, cmd_q->cmd_error); - /* A version 5 device doesn't use Job IDs... */ + iowrite32(tail, cmd_q->reg_head_lo); if (!ret) ret = -EIO; } cmd_q->int_rcvd = 0; } - return 0; + return ret; } static int ccp5_perform_aes(struct ccp_op *op)
Move the command queue tail pointer when an error is detected. Always return the error. Signed-off-by: Gary R Hook <gary.hook@amd.com> --- drivers/crypto/ccp/ccp-dev-v5.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)