From patchwork Fri Nov 4 16:03:44 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: 9412765 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 276BC6022E for ; Fri, 4 Nov 2016 16:03:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 17BA52B189 for ; Fri, 4 Nov 2016 16:03:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0C9B82B1BC; Fri, 4 Nov 2016 16:03:55 +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 D5BDA2B189 for ; Fri, 4 Nov 2016 16:03:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936111AbcKDQDx (ORCPT ); Fri, 4 Nov 2016 12:03:53 -0400 Received: from mail-cys01nam02on0066.outbound.protection.outlook.com ([104.47.37.66]:7168 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S935059AbcKDQDw (ORCPT ); Fri, 4 Nov 2016 12:03:52 -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=D6qKbQ3ZIqqz7KWmDhuq+fgQJe7EZZGtT79DBfLuz3k=; b=JbZKIPS+i80Xw3qlrnk9x611M4DpKfxoraFwWjcun3xSQ58VmtJHNyWYfXvEIkphuGnBOaa7td8uCKJyy7mmSZsCYl77ezCAImT6uflL1sehTMsXIINSC5KCMZoEVs+3MLQjUv4COMc6rG3iKy4VbVj31jc5xvXVAA8EqyhB9eQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Gary.Hook@amd.com; Received: from [10.236.19.42] (165.204.77.1) by DM5PR12MB1401.namprd12.prod.outlook.com (10.168.238.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.693.12; Fri, 4 Nov 2016 16:03:49 +0000 Subject: [PATCH V2 2/9] crypto: ccp - Update the command queue on errors From: Gary R Hook To: CC: , , Date: Fri, 4 Nov 2016 11:03:44 -0500 Message-ID: <20161104160343.18155.11509.stgit@taos> In-Reply-To: <20161104160140.18155.75618.stgit@taos> References: <20161104160140.18155.75618.stgit@taos> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: BY2PR1001CA0043.namprd10.prod.outlook.com (10.164.163.11) To DM5PR12MB1401.namprd12.prod.outlook.com (10.168.238.140) X-MS-Office365-Filtering-Correlation-Id: bcb0cbcc-c48f-4546-b348-08d404cc2aca X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1401; 2:Yw5ltl1yUf7Y8L1XjoSAJubnLeidLGV2GOqnJ5wM/xzpxjli3ZY8ktoUUr53udEaDlQ+H+MTdSEnntuOYcKvSHYA0TgXlnhuLdyiJU+ijViYCk2C6XFklfuLPWXBmvEogHnI9m3aYVG+8pSYSNx6J13FUr+R/H2ocINhGHKs8AmTKusvTBBJL2PvGojp20A4H8WzWNVENblS3Jpaws3ewg==; 3:nNTF2xV61dJmMj7OMfDSqTRabGwF78HmkfsDDyGfRpUI5aptUCfrITLvKU1UvAh4UrrphKboISujIcRZ3dGa9ZecjS7oZWUPdnum+C4NDsLGNQd1U005M1UQ+db1vvj4aCkOIQnT6oMzIdrKEQsPDg==; 25:Rz0BzKoFNGOlGbxlgwoS+ntc34jdxkpWWAdxbkUozNet+4dqP0iMkXqv5UmbDnHn8GsCAku0HspUqg9g6XJ1I/MmsUUZ9NglzsMKBrbiF9C+PWUdZWAB0FCkXSd35hscMOmh91ze4vMpKKmlhlmiIq4WNFipTEAAvQMa7KSVW5UDWo2Lta6vIk9R4CfOHeM70KHh5dS8OEZF8udYEVtkJcpW4b3UT/XDd4kw7IZPM4lnyDuR99dPIINMFHLll5O6aKRUItdV0o50b/2eM6H9rMsWwWat7OMXB1Ff5+yYpnphbrDukSAASTReoLqjFkC3ZRnQmrbTQ14evU2eP2IHd8zybTU49UEhwecAXZwJXlszp1EdWFQ8HT+zjjfy+tz412rP72BNlTRz2N28gKjhYhyzpmukV9pLQkLyRlKTmq35sc+rydwsjb1Q1a0bVYMP X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM5PR12MB1401; X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1401; 31:rlMB8f4j3oRK1+lLnWHZRjeeACtB6W5uL5TU3LYyX3hNFuMpAW+gtaLIP+uDdZZXZfyqTKAuFrJjc2rfZF/HvLr/GDx7iVo9AmJfAAei4Mr4iJm6lBE0zl2F92GVPnH43uxZxyg0ZP96hitulMnhijYBgYnFlXVPCVE8wBqbvLfNS+fjIbcLbj6VjLzQt9kaahFkpKHGYLje9QVntdn0T/0+EqYhuguaf6445xDImcUDsUbeAv/M9nuitbJU+W0r; 20:G8ZMrxjDLJGQYIb+zrRcvQTUpxB5V+U12TkkrawAuCFnnKSraQLyY3P5JimSehjTLZOhGwsQZVTMyI8Ru4dYyVCigjavG/95ewykRwrdvu3lSFRa376qsJL/N55acebCRUOGrdJzvhASRjzzvDrarD4N7CQDlQuoKkt/tNaIAG2n94SbQq5u355nDwmCxP3qRCizQFBcFbBmEd4rZvJZi5s0tD/mzuuMnfqcZTcvg/tid2c5mrw3AGI+NuZ4U85JK7QLmQH2rRZgK7cWupQK3rhDmEoACuFp8djEXJn4hsu8q9Ch/NaYFX8KmPEOrzH6l8hH7valKQtRKF7bas+Fsf9Llw2jjB+iqLqdtOh3VoQHYfviPaHFQB9cH5BF8hepAonpnsLx11lSDsbY+XKfb9yjPHO0KNbv5fyBLLbGswP0a6qz77YNuSz1WWsCa6/c93yw9jWE4l1+LXOhRqjq6rn1XFtW7y64vyz9o0iAsM/Ojfq47Gelw2W7EQd9PBAb 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:DM5PR12MB1401; BCL:0; PCL:0; RULEID:; SRVR:DM5PR12MB1401; X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1401; 4:TOumTs/pJZQdfWctusB+R9oMEyJAS4utj9LXH3N9QTvLr5KOx9tiqJKwRr25RGuVLgUF3qctmJbJBTQsBRZ5/KyZI1/tmesmds5LsvnNzwQLlojaFX6yfcdwuPA7800yYX0phM39GjPfIZ81KGN0ZTVRilcXUZhrKWqpaCNtv5BdAaP9lhYCgUaeaPARj5wcGHlqe3PLnMnmpvH9Ea6yZ9S2FLPqaUIEy9EsSa3s+0SxnjaKUnJjTssqylcShwysYOGeronIEEzXB346yTOJXyvNKKMSSoaspocrrf6x0u7XoCiwyXZw8qcntkEhMVUBXGbxz0JOA7O1CZVD+IwK5/+5d8cdSA69P+PwfqRWUb4O0e1rSKayqTNg6tGKIIyoZY14GZPD0gXEhHSWeYoKfzqwz1IGVsMwDJoP+SteU83/ydo3dOmUovj8ff93Gso6Vvg3T6lsGv0JE2PKn4XVyA== X-Forefront-PRVS: 01165471DB X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6049001)(7916002)(199003)(189002)(9686002)(68736007)(54356999)(83506001)(97736004)(101416001)(76176999)(4001350100001)(33646002)(50986999)(97746001)(42186005)(77096005)(2351001)(92566002)(189998001)(229853001)(19580395003)(4326007)(6916009)(7846002)(7736002)(8676002)(2950100002)(66066001)(6666003)(105586002)(110136003)(47776003)(81156014)(305945005)(106356001)(103116003)(1076002)(19580405001)(86362001)(6116002)(50466002)(586003)(23676002)(5660300001)(2906002)(230700001)(33716001)(81166006)(3846002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR12MB1401; 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?MTtETTVQUjEyTUIxNDAxOzIzOmxuWVRCUGN2S01vaHk4Uzhva01jL0o5ZFlR?= =?utf-8?B?bzdHZUhCenZWNDVUZG93QzlRVlhSeUtyZGp4bVF0NWRZT2l6MHM5VGI0YW9y?= =?utf-8?B?OVNwR2YzMDExNWIwTmRmbENWdWNteTd1V3lPUTFRVk5OL2U5clBVR29rVU5o?= =?utf-8?B?cWFqS1ZNNUV4Zm42V3JCYTYrR0dVc0N6S2lKNndWSTBObFQzNjlVdzJyOURS?= =?utf-8?B?MWNpYUJVMVVIcldKeEFaUkVycm12cjZKdlp2azU4ejBsM09lK0V4REgwVGJK?= =?utf-8?B?Mkgza1FjRlNnaTN6QkVUYldjcWJsQzJhYjAxMFBrOUh6VW9nNlg0bFpNdENq?= =?utf-8?B?Ti9Wa1d6TzdveW5lYlFJVnNJL05TaHJBQUZyQjJzUEJjU0xybjZtVVpjVkR6?= =?utf-8?B?WlNhNTQzcE1ySHkwVHJiSkQ4WjJNRFpXMCtRaGtjTW5FdkYvSHdDaWxKZG4r?= =?utf-8?B?RUloOUJES2R2Mi9sTzdJTTJrVDV1VnZRMXByQ3VqZHJsWElFdXV3OFBEbmtP?= =?utf-8?B?bjN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99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1401; 7:JXhjQ1HjubqX5SrjtYrns3AT7YF0A8+lHMejkweZVeQSiMKvoJLKqQ0sRlXh8nqpTaOk9S8nyYwRyo0DAUdaCw4yc3eAL69IapSYx7decI+l8tKUaSYzcVPX03oG20x+IH/Nz8y7C9htwlRG4Gn0OeVUO94fl8dN0jwyT54RkI4HmpRoG61yqKYdvM8hygBWg8zBBYcgunV83bjQ9y0Jz2eRj9sy1fjXaWhsfR1iUxG3AwD3ZW/u09zFRZ7XCpTRDAE9rcLekIr/L34q9Pt/OBzXnO+Ry5I7QdB6Bq18uPKOVdFnG94OORvfdZtg/7l+g83hpDDCA9J9Hg0kC4FXGtv88QdYmh8elSkZCb6ghbw=; 20:3V8T5bCRb80MgKGO/HH/NDqE+w+uBzqx89aHGHhA+kOxWvHKEXAed1vQ7kyaUk93dlkKZNGynTCKwJ8B2mhJai+s6BnoWsY+EkVgw8GoudaSAJCXyGR+zZeggmEGHceqG0E4ndrgj8eUiDAQ9P7Y2XSY2C6dt5Mtdj4OTjj2JymzFtBmRaeI9ERj9+7We8Va9+LnZ0LAamwr7akfqKSTbwtAF7NvrVm9STRTJyxcwrJReJJUdN6OYwGI/Bt1Uhtd X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Nov 2016 16:03:49.8655 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1401 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 e2ce819..05300a9 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)