From patchwork Wed Nov 2 15:14:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gary R Hook X-Patchwork-Id: 9409363 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: 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 D54EF601C2 for ; Wed, 2 Nov 2016 15:29:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C6AFD2A321 for ; Wed, 2 Nov 2016 15:29:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BAD402A324; Wed, 2 Nov 2016 15:29:28 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 131AF2A321 for ; Wed, 2 Nov 2016 15:29:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754932AbcKBP31 (ORCPT ); Wed, 2 Nov 2016 11:29:27 -0400 Received: from mail-cys01nam02on0088.outbound.protection.outlook.com ([104.47.37.88]:42144 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754748AbcKBP3Z (ORCPT ); Wed, 2 Nov 2016 11:29:25 -0400 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=Z63m22iQI3gLz9P7HJB538qw8lcEidMKXLTb0FE4m5k=; b=rPaH6FcbmNeas6o5EUIz0mPOlrZSwpFYkCnDRV5BfRp+uYXe+LREzMWfKZ8mLpoi8tYJrE/8qSdwncJXgZ1eIqVsdc9A1eY24UVKgJeIMnAMypyApfm4zWGSSv6XZte3kqxbV0G+2I5hW5LQ70ZOihVQmr26QdFUtNoYdrXBe3U= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Gary.Hook@amd.com; Received: from [10.236.19.42] (165.204.77.1) by DM5PR12MB1402.namprd12.prod.outlook.com (10.168.238.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.693.12; Wed, 2 Nov 2016 15:14:09 +0000 Subject: [PATCH] crypto: ccp - Update the command queue on errors From: Gary R Hook To: CC: , , , Date: Wed, 2 Nov 2016 10:14:03 -0500 Message-ID: <20161102151403.17167.72785.stgit@taos> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: BLUPR0401CA0022.namprd04.prod.outlook.com (10.162.114.160) To DM5PR12MB1402.namprd12.prod.outlook.com (10.168.238.141) X-MS-Office365-Filtering-Correlation-Id: 7c8905ba-7fac-4f08-79e5-08d40332e549 X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1402; 2:gC7+ALvukXTHCEIhrOpSRYYNYNhmEaz9ox07cJjTWN9VaLDr28ZUMacAYO3do2R5zOttt6V0qFhWdaWLLy/ZZOArdayR7yN4rt7Om/x8KBdKqb/Smy7rFkOPN/qqaBM5CYvBISuIq88DUUb2AsN7YlolEi2zSp/VNEqMDnvRRCCmcmhUqi36I7d9wt6nVARWnxF4tmhjmg9zgZ1zRYe3HQ==; 3:4lV6y0Yawki3GAQb+B5KhRVzIMcrMZFjqZqvhMLkrwWDVAh3HVh2mmrUoEry+hAf7ryC42mQI17+hOLJCsPARuR/GoJO70S1Ki/RiF/kEXrbi6Yw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Bh1zQiDK9fGrknrN+bvt4lCtQoyyVmhM+hF3Wglf0vKcaXTTEJ1MN9BI8gl43wn/+z0fOnYHEObSOoAQkPKpzuluyta/gGrtQ2F88xgfvA9NRANr9js21pCsQoEnqGpraYwC+oqkRnhSFdC4/2d7v4JKMV6y2lZSVDRNlc0yzHhzawtfPtJUXfr1VCUl5iDcQQUOFhI3m8RsTtkN+ayk/X1pn/gKOPEt6XX8XkEOfvo6/1SqxY2Q1Pf5x49c69o/l6Wdiq624wz4o2n06RznMb6Y7YRI6Jm+exzWrSZ723dB X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026); SRVR:DM5PR12MB1402; BCL:0; PCL:0; RULEID:; SRVR:DM5PR12MB1402; X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1402; 4:AtJ9g5/o9cHWeA9++yuv7dRmN7jEKTIBLmj7DCPdbtxQ6AH6jm0hZ9v4zaIh3AEq1nvD7+PsyJsWjOQDF9ISoaWNyYWMRRJGV3JMkJfG5rkMFxwx7c14C+CtN2gUEQmOMTjZp3C15eCN2kzcFrU5vZf/C7KJfExCVbr8qsNZEFAk+8uo7++vIKiC342VFfDJf/SNP0A8NZTKuBhV7OpXhCwyUOJcbMFtv9QKDReNSxnyzdcguJ8xmIr4y+pGL6prsWXjrW7QWBzSgz7hLu9UkZMZymMrv2eqFCFJYBnJtXavncIM1hY1YrsHb3bZixSwgF9pU592H3LRO44aJ7V0fsEYYfZ+9pK+R87FePotx6u3OMFC8RZU2Bzo09HII4aKk8gaEi4DPg4gQJkIYafaWpPSLzbG083+9ojuLsmKm21B7pD8z0VoqyJ4GS1khOmaRdsfhZbizCk9+J8hfO3kJA== X-Forefront-PRVS: 0114FF88F6 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6049001)(6009001)(7916002)(199003)(189002)(229853001)(42186005)(305945005)(106356001)(7846002)(1076002)(2906002)(6916009)(19580395003)(101416001)(7736002)(103116003)(105586002)(4326007)(5660300001)(230700001)(189998001)(33716001)(19580405001)(47776003)(83506001)(23676002)(2351001)(9686002)(110136003)(97746001)(4001350100001)(586003)(97736004)(86362001)(77096005)(6116002)(50466002)(81166006)(8676002)(68736007)(81156014)(92566002)(54356999)(66066001)(50986999)(3846002)(6666003)(33646002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR12MB1402; H:[10.236.19.42]; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtETTVQUjEyTUIxNDAyOzIzOnhGV1BYcTVlQXlqdEkvRTRWQ1RUMGZNYmdv?= =?utf-8?B?NGswUHpoVVpEVUdnT1hEamVGTTNkNW5sTGFaVmhKbFZ2QnBKaWJnWmNiTVRU?= =?utf-8?B?Z3Z2SU10TE1aOTBSMlZOWStGajg1NUpiR1g4RDN6d0xVM0F6MXVOb0J0Y0M0?= =?utf-8?B?eTViQUF0a0hmWUxWNTVtR0lOWmdjOWhDT093dEpuaGpqM3A0SDZad1AwM1U0?= =?utf-8?B?R1gyUURMNTB3OC9pa00wcVgrYm04WFBNZ2tmTFBTMWlNR0o4VEJaT3ZlVGRE?= =?utf-8?B?U3M0VDVkVkNUaDRpckQzSTFZeE9ERlpwaExIaTlQR3lWTTBEZXduZHZyYTJ3?= =?utf-8?B?dzNaMStVMEtIODJWZWNHTVNnNHZsc24wT2dxeEI3dmVPRkVQSnoreDdXUWRk?= =?utf-8?B?NnVqVEhJUnNTMmluYVliQmlzdHFOWEhSMjJiV1VZMU1haDVJWTJYY2ZidXdT?= =?utf-8?B?TzZ5TG5OQlI3MytTUjlTN1FvUnBvZXpBY2lRMmhMYnVQclN0dDJZdmcwWldK?= =?utf-8?B?aUZNYVNJdkhPU3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?utf-8?B?TU9RWVpRMzlyWitUcXBOTHQreHlKSmRNSGxvQ2t2R2RxeTVLZkRaSkI2emJ3?= =?utf-8?B?OHFWVUlmUVNIYmNJTitVM1N2elBmU0cybzJ3dTdxSkd6RTEyVTBaYnphVm1L?= =?utf-8?B?N2RPT1dyekJQbkg1YTIwYk1ScVE1Y3QySmpzVmNPbmlDQnhseWdqUmFhMlRO?= =?utf-8?B?V0d3blVML3hydW5ZQ25UeFpJVDZHTHN6bWZIcFlsUXdlMUprdUhCUnVRPT0=?= X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1402; 6:4qydSyB+cioh5d/owLEOIbdE0U23Hg3iZDloNm3OByZmDe1nDzpbC56DsMvYiIrWeBNLH0QOlSw68/QeBPLRINWgsmpRTsQtsAFHRgMLe9uCqDlMDDA+pAk2vsoZtthclstrWG4Tvge/XMIqRfBbJWjH0/TVZMAs6LwVmHcstLuoTLeUcKYDExHsl17ZQvOeqq8ncDayo2drCHorH/Vri/w1tSco9PSFqqLE1WCpYnMfVoaXhGVXPcL9n/kEy7abfsB7JFJgnqjTmTncAeEgWVqeHKDNjMWJDO7d2gWy8b7L+PGfC+qVn2GuMIiojkiiWTOV/d7snS6UKXG/E3ThHm1LlRgQDjIjOwzqiilNXK0=; 5:m9nssAZSyVWJjpIAeE127Sc/8Y7Fj9Ws3mTCwHTN9UpA2oF0/Feeig3mzAypFfLN5IPhAtk84e59NK0fiecStEYCiJ4gNuib070fqMkBtnYF59U0WTSz3zzib5GMD4HUcmJ6M0jZOg1XnJp8+I2kfhUl1aO1lXrc9+Llj2WWssg=; 24:X5gwXgq96zPAr+uMS7utnGO91drka0eNKApC9jCqNXXAmIT27mjBJQhIYG4MLuz34q2/gNn8lhN+jl+aGeqSexs8iNJcL/30PeB6RxGjTZg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1402; 7:4lh0MIy1X4cSJRQ0r82znqARZ7ls0n4dAyqST/YUzBT42ZPO1LGTPrBfluPKJj4Ak3brcNKn0Z9VcQq8w3gBa4TyetH6GQ1k8exw8HxYDaX4MAA+NkTIfiZUlY9ojPsingfkKd1XDAnP6i/lbfyZ9UP/UdCGMAGTysHfRu95BYXfaBVru7Bf2MjvJ22qbMdUtlgbnMEy5I4GtxHOEnUS+/nAVr/42yy91VbTcy6EwQxXS50v0KbsTMj2AZycJZa9iVG/dD/1aCEf1a1J+Tl42u7QqPiPSLaleHopXxlUD5w2bHurF6BjRQrKbIlPhwzHDuUKXbCLYwxtAfrgPF08a3HgnIQoKFKGbp0PVSXUaXk=; 20:wzeJUsrybueZSfI0JzSuMlBSUaFer0GLdDnWrodV1Vn/xszBr1de8HFKW1ASEfwKYJ6NwtQZsn8V7JbYiwKtk5eV7J5pIqRvFa153gwLIQUX93CctGcASpGviH6WEDmUTaQws7bIZvnDhpQzrWVAYVB8yjNJd24Pt87ycxN3FDUshd/jPSfyQ8v3sHc4yWqOrctTM47MU+voriqb7Yhc/atb3tEVDy0eEDrUFRVNMQ11Fn+5vGW57RaPgklvP6bA X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Nov 2016 15:14:09.0814 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1402 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Move the command queue tail pointer when an error is detected. Always return the error. Signed-off-by: Gary R Hook --- drivers/crypto/ccp/ccp-dev-v5.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/crypto/ccp/ccp-dev-v5.c b/drivers/crypto/ccp/ccp-dev-v5.c index ff7816a..0baa99e 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)