From patchwork Wed Apr 12 22:54:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gary R Hook X-Patchwork-Id: 9678473 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 239A660382 for ; Wed, 12 Apr 2017 22:55:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 133D328644 for ; Wed, 12 Apr 2017 22:55:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 04E482864C; Wed, 12 Apr 2017 22:55:03 +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 7211028644 for ; Wed, 12 Apr 2017 22:55:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755562AbdDLWzB (ORCPT ); Wed, 12 Apr 2017 18:55:01 -0400 Received: from mail-bl2nam02on0080.outbound.protection.outlook.com ([104.47.38.80]:24400 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755387AbdDLWzA (ORCPT ); Wed, 12 Apr 2017 18:55:00 -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=KR/fhv2ACcTiX9mCl4VhNJUluTbgs9ggmPpLjfnfTWo=; b=RE2KUsr5rfl0rQv/o4F+XFT2B3bfla0CvioxuqHRCvZGh/qG71BeFT0uP8Q0Dn6oIep7Nh7AlZrnMsfoI/1XZzou1qFbR7tOErRZUJlnYoYmG0uNytc6t7LFdD3hSqyRsvRKU6PKalLy2+E0x+cXbIRa37yLo5/i94ZoxWOQ42g= Authentication-Results: amd.com; dkim=none (message not signed) header.d=none;amd.com; dmarc=none action=none header.from=amd.com; Received: from [10.236.19.42] (165.204.77.1) by BLUPR12MB0465.namprd12.prod.outlook.com (10.162.92.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1019.17; Wed, 12 Apr 2017 22:54:56 +0000 Subject: [PATCH 2/2] crypto: ccp - Disable interrupts early on unload From: Gary R Hook To: CC: , , Date: Wed, 12 Apr 2017 17:54:43 -0500 Message-ID: <20170412225443.17707.83299.stgit@taos> In-Reply-To: <20170412225324.17707.75176.stgit@taos> References: <20170412225324.17707.75176.stgit@taos> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: DM5PR16CA0033.namprd16.prod.outlook.com (10.172.42.147) To BLUPR12MB0465.namprd12.prod.outlook.com (10.162.92.146) X-MS-Office365-Filtering-Correlation-Id: e4a88ffb-a24d-4ac2-b0cf-08d481f6f0ec X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081)(201703131423075)(201703031133081); SRVR:BLUPR12MB0465; X-Microsoft-Exchange-Diagnostics: 1; BLUPR12MB0465; 3:i1mc9sNgcWNJKk+gElzKQCWHA7f4Vuq+vX37MnMPCl+tlC5lfB3Lj0SfvtxPU6+BiVR2knf7Hx4Xzey6V24eQm8Nn8rLUEoVzuuBMVjpFC5+NVJKJKNKb9CG8dA1OhZ5vOkv7dMrsLTxvC+i4Fp3Kj+vQDAP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o1x8ar7gwvyYSkihfwb0AAOlW80NSakHRIlMFC+ZNzQqFAlDQY890dtZCdKtdgzucFRXeorhxgjFatQpdrPUTa8Tbw4a+2B1cnUBvBXsZTjaM2Dci3xpDLwTFbNb8Km3dXmRCNPAGnGtDz5IyWKTm6Hlr12oqSsMIrOy8X2uNINmGLVA8Xkrh0y6SAxtF8mSph9cdQidLyNJmfGEuMrMLXBhNwAIvNvWQjd3S2y2yBPG97QGFJjtOpeR4yeY73gICKVYrX/OI1vBQ28DTeccvqeKP2Y3OWGiBiUOQf35XFe69GzPSiZn3y36r+lAqRxfg81UF+sqQDRjEejGx7hIOFXK1z3LhCJ/MhxbOT7A+PmosZG0LOqwEhweT7vJ04v3LzZA7vbuHUZMhBePamW+hxj0IfgBsAcv1R+2 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3002001)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(20161123564025)(20161123560025)(20161123555025)(20161123562025)(6072148); SRVR:BLUPR12MB0465; BCL:0; PCL:0; RULEID:; SRVR:BLUPR12MB0465; X-Microsoft-Exchange-Diagnostics: 1; BLUPR12MB0465; 4:JJUIkWThClQg1S+KxfbKW+sVr8sSnm1zn+/etyU8YnYBq+HzPKsMFlWBv3AaFLcPHjQisRjNpQIQAihXFk3MmOdDDz0k+PqteJJcOv9Y4QZjAIV8vyUV06bkjoBGsrhAlhnog4/iyaxoYhhf58aC1We7qkPXRfjIGrbdqlHPrN5zxttc5EwZJ0mJvSVoQoRMlMiLYRj80cXE2NzZ6fvzL4DeoOrGHqJcXM3dKskE0CA9rZz14r1neuhcNIBiO/CpKHuayFtYcxyqqdE4S0cmJIM7iqhNDXQG2QkMSaqaxwYinxllENlDWFbnJ2DkR2+E650dpPjPeTYWG+CJeqKGWNTfR3/DZsOlch2s+R6AGNJZuT1IZOAVuxinzv2wE0Jf6fd/W9ynvnWJTOeivfDMbM5bj1Uukfosqmig8klP0FwOSQwxT9ohNMa9wqxN4+gWQTRvqSugh8JtWqj0u5RlS25zbchIKN8Dh/9uorHrszXZADM2eqkQs511kf5qS5yqte02MhTg8YTXOM0h3reK5TuG95Fy/f1eIj7Iw+aRPo/8n5kSf40OKqrWeAH5YwW3A6QJHTe6/tcnoCIFwKnSlu5RBk8XW15tr2bwcAeZz7wLkQqH/ybeYljMrG30BeLbLqaBb85Ybu0hHHXTemKoDeJoG/Ju6AO0CkXL9o/6lWa3ihvUjNfy/dVEMQi3P5cs0JpO1KnInTPeYQPITGB5Fpo2XkYvF8C8HkwCyGVLe2a1iseOKYeWksDewtswn30dZ7XdZU7WUQByeWWgu2Rf4A== X-Forefront-PRVS: 027578BB13 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6049001)(6009001)(39850400002)(39840400002)(39400400002)(39450400003)(39410400002)(5660300001)(33716001)(103116003)(50466002)(23676002)(9686003)(54906002)(2950100002)(6116002)(230700001)(90366009)(76176999)(50986999)(86362001)(97746001)(2906002)(1076002)(3846002)(54356999)(47776003)(53936002)(189998001)(6916009)(2351001)(33646002)(6666003)(305945005)(4326008)(25786009)(77096006)(7736002)(110136004)(38730400002)(66066001)(42186005)(6486002)(8676002)(71626007); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR12MB0465; H:[10.236.19.42]; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTFVQUjEyTUIwNDY1OzIzOk5YUnNTNloxdjFUQlAzS245WW9CaitaQk5y?= =?utf-8?B?elFzL0tCbmplYWFkZ0ZYYUEya0c4WU1SQ0VjQm9DSCtxT1VjN2cwSlJDRC9M?= =?utf-8?B?RjB4eHZsZzlGaGdIOCtDZm9ibmlncUN0TmdkR2pGeWFidmtDdzRrSUcyWGll?= =?utf-8?B?WHNWWjhkUnluL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4ExKJiOlcY=; 5:M2V967kvCI1pGCME3jWlE/mS4q6Go2+jg4HWGJuXlGFSwMJJwBjUDEYwdsL51qEOBx4wTV/2A1o8k8cy3h5mDTQLCH5A9hGjYV6jPG9AbMejiNmTzQer65n5uwVKLPu/FH/d6NYyZ6Itfm2T68rxxg==; 24:eTcBfMLBklFgNS9iyXCX5au2ZOdkskZBVVxJe1niyJQ5Yy+b52fdxYGxdQ76UCuHA2JcgLnqrFSgIKqh4Jfs83apU1oylizkIWC1QjKwNoY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR12MB0465; 7:t9jK9z4Qbz0dd+vjv8f2BwpppJetYRpSJOwgS8uH1Bgu3fmrLDfq8lNd5Ji64TPLcH+QL90HFghMYFEmB53G7oFfV5M37BmaGPFbyd4usiPqndi7HOy885CeS8We9hWTz08++08JJAhipNZ5ykpC3noqSz/J97P4pDVd7v7EG8BjLOOf2KNaEzcXwVTiXyFkWJUIXgXKb0w2qq0Q7hNIJOkqODmL/Ld67FtiOmF6hN/aHPPok8Cyb7Q+F4cohWRGRDAuee0mba5tiWevVkVHQEcTC24N5oCNx4gxkkrWqw9eboUVRZA+pv2MovL3wavn71it1TW2V+LsOk+ttdGt9Q==; 20:vR0gOMgG+DqAeGaBDi0Kmhd+XenfebWvzNCP0AYj50NZfe42L33B/i4rXMMmeGIHyLLhKgbnlhu9i24dwJhK71TNX+V1otYleKDkXjpctPkl1F4yWwICbJPZ6kQjQo1Ghd8YcTYDHuf6tIFggzmKq034QiZRmvzUuLom42oHIuf0JmBLhrYfBEbc8f27oLJwWrZDaFZfpfOckUzu+qts9gXaCQ+QahKQWTDjAnZ1hiUSj7hPUidoZPjrFLAbiBEc X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2017 22:54:56.5740 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR12MB0465 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 From: Gary R Hook Ensure that we disable interrupts first when shutting down the driver. Signed-off-by: Gary R Hook --- drivers/crypto/ccp/ccp-dev-v5.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/ccp/ccp-dev-v5.c b/drivers/crypto/ccp/ccp-dev-v5.c index e03d06a..293c08e 100644 --- a/drivers/crypto/ccp/ccp-dev-v5.c +++ b/drivers/crypto/ccp/ccp-dev-v5.c @@ -942,10 +942,10 @@ static void ccp5_destroy(struct ccp_device *ccp) iowrite32(cmd_q->qcontrol & ~CMD5_Q_RUN, cmd_q->reg_control); /* Disable the interrupts */ - iowrite32(ALL_INTERRUPTS, cmd_q->reg_interrupt_status); + iowrite32(0x00, cmd_q->reg_int_enable); /* Clear the interrupt status */ - iowrite32(0x00, cmd_q->reg_int_enable); + iowrite32(ALL_INTERRUPTS, cmd_q->reg_interrupt_status); ioread32(cmd_q->reg_int_status); ioread32(cmd_q->reg_status); }