Message ID | 20171221173420.8213-23-RaghavaAditya.Renukunta@microsemi.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show
Return-Path: <linux-scsi-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 5102060318 for <patchwork-linux-scsi@patchwork.kernel.org>; Thu, 21 Dec 2017 17:35:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3ECCE2847A for <patchwork-linux-scsi@patchwork.kernel.org>; Thu, 21 Dec 2017 17:35:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 33A0F29D37; Thu, 21 Dec 2017 17:35:37 +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 B8A1D2847A for <patchwork-linux-scsi@patchwork.kernel.org>; Thu, 21 Dec 2017 17:35:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755126AbdLURfe (ORCPT <rfc822;patchwork-linux-scsi@patchwork.kernel.org>); Thu, 21 Dec 2017 12:35:34 -0500 Received: from mail-sn1nam02on0043.outbound.protection.outlook.com ([104.47.36.43]:60032 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754621AbdLURew (ORCPT <rfc822;linux-scsi@vger.kernel.org>); Thu, 21 Dec 2017 12:34:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mscc365.onmicrosoft.com; s=selector1-microsemi-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=/LfmI9NK85Y+r4vKQRCxXZJxhocSyPeBQMgYA2U6i/o=; b=JnvdMvZKAof7kZEk6pXELWoUpwIkHC7aEqqymZbLfdrOJij2NG+ogsvEBqiA8wcYV23voGBJk5aJm8+2aDPvDakpsI/G1UiL5kdkAVTWumS60wzvWk8ZT4Hn4X/hTcsqs0j/qqzxiE1DRU8RETBGQkUARSZIav/W6DbYn/E4dhM= Received: from MWHPR0201CA0061.namprd02.prod.outlook.com (10.167.160.38) by BLUPR0201MB1826.namprd02.prod.outlook.com (10.162.239.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.323.15; Thu, 21 Dec 2017 17:34:49 +0000 Received: from BN1BFFO11FD012.protection.gbl (2a01:111:f400:7c10::1:183) by MWHPR0201CA0061.outlook.office365.com (2603:10b6:301:73::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.345.14 via Frontend Transport; Thu, 21 Dec 2017 17:34:48 +0000 Authentication-Results: spf=pass (sender IP is 208.19.100.21) smtp.mailfrom=microsemi.com; linux.vnet.ibm.com; dkim=none (message not signed) header.d=none; linux.vnet.ibm.com; dmarc=bestguesspass action=none header.from=microsemi.com; Received-SPF: Pass (protection.outlook.com: domain of microsemi.com designates 208.19.100.21 as permitted sender) receiver=protection.outlook.com; client-ip=208.19.100.21; helo=avsrvexchhts1.microsemi.net; Received: from avsrvexchhts1.microsemi.net (208.19.100.21) by BN1BFFO11FD012.mail.protection.outlook.com (10.58.144.75) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.302.6 via Frontend Transport; Thu, 21 Dec 2017 17:34:34 +0000 Received: from localhost (10.181.72.13) by avsrvexchhts1.microsemi.net (10.100.34.105) with Microsoft SMTP Server (TLS) id 14.3.361.1; Thu, 21 Dec 2017 09:34:27 -0800 From: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> To: <jejb@linux.vnet.ibm.com>, <martin.petersen@oracle.com>, <linux-scsi@vger.kernel.org> CC: <Scott.Benesh@microsemi.com>, <aacraid@microsemi.com>, <tom.white@microsemi.com>, "Guilherme G . Piccoli" <gpiccoli@linux.vnet.ibm.com> Subject: [PATCH 22/29] scsi: aacraid: Merge adapter setup with resolve luns Date: Thu, 21 Dec 2017 09:34:13 -0800 Message-ID: <20171221173420.8213-23-RaghavaAditya.Renukunta@microsemi.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20171221173420.8213-1-RaghavaAditya.Renukunta@microsemi.com> References: <20171221173420.8213-1-RaghavaAditya.Renukunta@microsemi.com> MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:208.19.100.21; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(396003)(39380400002)(376002)(346002)(39860400002)(2980300002)(438002)(189003)(199004)(50466002)(48376002)(1076002)(6666003)(2950100002)(76506005)(5660300001)(2906002)(86362001)(4326008)(77096006)(106466001)(57986006)(8936002)(305945005)(81166006)(36756003)(478600001)(106002)(81156014)(69596002)(8676002)(110136005)(54906003)(356003)(16586007)(72206003)(76176011)(97736004)(316002)(53936002)(59450400001)(104016004)(51416003)(47776003)(68736007)(50226002)(2201001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0201MB1826; H:avsrvexchhts1.microsemi.net; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD012; 1:Eqwb7qG/is4dFlz1V1feuVvgjbJ5F++cz62m0GXV+An3F2si+2mckRaL6bqhbgUOZIwUzuJiXuQWX5IwkAJ7PaCEHiHA1NY666Lwq67lOL0IquRvAjQK1hB1ZB/dGB7h X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5267e9a5-622a-4544-69f0-08d548991a10 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4608076)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603307)(7153060); SRVR:BLUPR0201MB1826; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0201MB1826; 3:YihL0GDfgSy+LVRUoaZQ+jsW7++GlAi38nmvI5Kin3PiqtcWvkMbP45q1h+fkKPkUFTHXOIimkwD7h7VqisisUHLI8FHLM/lfyDqHExOP7COU1wrFIdY2u217+aOShzOPi7GN/wN29H/+02Fm4xhsLX4pMGT9A0ihpnJJ6wlWzVt8eGVFcy5RekDSJe70fFlQ9X1BA83lEZT7bMkOe8mHODX81m9Lojr2eGaOjEwsIGm+4SN2SQT2cXQ0/pJr0dnaGobO5cJQ8pDyz/48hrSYNyfm/5NzEw+uakcXtmSmPvt+Vt18ne150jhGY9eJxxz/3Wj961gytK7NnxbydJ1nMVvT3tr8hkpGsSwN2prn4g=; 25:LSVJ0jMkpr/oDncU0srQ8mY/HQAIWts/B7SxUsmHTYyoR39Sd8WLO9Iqk3Ob7owj22igxDANvnm8sCTqszFEZ4cz0zUwiwTx8whWyzbBv6NLbBcTg8bcmAPxQ6Cr1JoQ09rT4ZPROBqziHZypjsOZeHeOZNmbR8nk5M+S4VkmBvWAs5TGI42AU+F4i7BUIY37nH+ENAFZSmGog0z0Smrjwq0zL6S2QEP9Acso3UQmwThIyBSQ39kJSoyv33RwTxy3DsMXn/PlFWkr32wmRGD9cpJJfRAIr8cmfEX1uoTDoZ8R+YyzXRUS3stSaHlXA3Gbj4RZECw1Lb/dp1VCUBmPw== X-MS-TrafficTypeDiagnostic: BLUPR0201MB1826: X-Microsoft-Exchange-Diagnostics: 1; BLUPR0201MB1826; 31:ftouGK88P5gSLBqjty8aWcChzqRHxfbARjFrNjwN0EWfPobpjOV+yqU4zxF28QmOfGczeoTLFJWGW7Kkc0nlUuoXCd9W4B5M9OZn9mdqJ9uG1WNIisBI9RE/3t2XlMEM2rDVyYMqCk6DFuL4C9GvRlLqycnf7giU2gdohBz20eui1qjdwDatMpSP/SyKeZ40fVmfEtQBmFVc7ulpPSVCk0I64VLZjaqhJ6zPjnOUg7I=; 20:IBvbOfhhLir4U4YBukVK9ZBBt0+6GHnv7l5lPsb6Cfk6tMf3rk5hEHYZ+eFBHVCmjJZWizELt0c6VJGQ7Ctm7DiJZ0/GQWXQWPzNKNKLj51hkBhaV90P/tFNzPamIAFXkVtUpRXy8gx82Lft4ZgEQnkx0+oTu4nF7msni/qMc13VSJO6Srw+nNBZvDOter84sWaKZwCjfxg3Ng3S5NAWD9PKkrUjeCgzDYwgVUOC4KDe0ahilVFo+Uxvp3YzzNCWY8RG+dY6+uu1j8ReOsDr2Yat2ebdjbJ3jI3spnxdp8arBMxTvyDwLrThaJUDTquVALL/+azGXh99PvCSpMyBJq5RriSPmMJ1/ecPFUkB6aS//mT/rb9qMiZpu4Mi6jy3McjhDr4OuCFpnKKxC65iHx4jE2rZEntORnOanAF9XFpHHxK7z5lPPdDL++zowhqWVk9HhoQisGntrtCGPXtor5nFl5+bCu4f+oTAnxOkx8DGRBgojcthpYJmx6AxXtzwLgqqviBjN7RbTTlQOfNshqSgDQbLUHBAtEh+2Lq4aOIV11agQuhKtIqYDbf6CzRpZdw+ribj/DeFLdeBxmbpWgXi3tPN2mZsAxvcC2Tqb3A= X-Microsoft-Antispam-PRVS: <BLUPR0201MB1826B5D58EBD8AF83EBC7B68F00D0@BLUPR0201MB1826.namprd02.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(72170198267865); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(5005006)(8121501046)(93006095)(93004095)(3231023)(10201501046)(3002001)(6055026)(6041268)(20161123564045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(6072148)(201708071742011); SRVR:BLUPR0201MB1826; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:BLUPR0201MB1826; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0201MB1826; 4:yBw4U+I7dJ3Izj6xIW3oIMuRX6BoU17b/V+yadFeWxp0F+ceq+tdKfU0RSU70kq3oDD3c1ikQK5pcsmRjeDScrZRq+GyE53eZ/PvSlqXIIUqfBj9R4bh5yeLCoMqt5gj1XBI1XQCVc14UsbxVixLBN44CaD5sW1eNGabQ+7KlDgjIfPQX33kn71vd+ZiU1kB/viEpaxor4QFxKGiTOYPI0dlh/cQtANYMMBn0IET/C1FUWO0CYnU6+I4iH5DO59ce5eCKsrukBTZjRPscDBbi7NyTpmQuB5PU2VgKz5NdAqWI0FhchrAU2u6WYCNvUWZ X-Forefront-PRVS: 0528942FD8 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0201MB1826; 23:q4V0LxcRjBMVQxBQoNd9gkTq7K9CXbPkEOKTMmd?= =?us-ascii?Q?RMtH6L1lR9AOHRnAyEFv256CcMUahAxmKX46ieo971Ish13V54fglLv7lBW0?= =?us-ascii?Q?kgWRvDPfBMcfma198DDbO9nOBt2v64cvpNaEJVUQGMh+kCZIM91f7d0si2Ej?= =?us-ascii?Q?eIiNI6bdRVLfLQbkI5GF0c+VUFTJ9q7asDcAssLBNPoZPbaqFin7lMF+lCGv?= =?us-ascii?Q?uXTW4QoJWiJU4YyL4gSYOrPN/DosowR51ghAjMl1322KwejIMwkvrJ/Yi+ds?= =?us-ascii?Q?8yT+MYinLjCeO6jAigpyiwLQIBmPjyHYlj5ZIRv6mu2OXOdGSy1i6zNpGtFI?= =?us-ascii?Q?fAp89RTYUHJSf5P6GKt9BRvdoMl95tA65xQltatcafeI6IEIN5dXQsoLWuDN?= =?us-ascii?Q?ArReAZgIlHrBBgRaxvai0AFRndqO4FYiLfqxbhLeL6IAA0EfrKW1CekD2obx?= =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Q/qr/0m2XR78q1cFWcASYnHqumQIy5XvVXfvMvRnko17PfFuzNcHlYhYuR/oEFiZhVF5r7eaQlyXgpSU5lV79LTVaaleGOVjnjh/K9LqvE7nMVIMKRSzcoFfYysGiE01vigVdLXbG3nb/2G8cu6N4e5ZQOlYgHbzsM7VBTpxE3rN8s=; 5:KL+A160W8mVLhTgV5Zis/vZRM0mS5jbnXHOAhatLaarN39j3Cda3m+kFNTVWoBalEKnDG5wm/J/Ezc9mC8v4hXkJwTe5otvmKissYrXu0HmPw0tymimI8j9q0lwW8hG9Quc3mN2RkN8VSRLF/GdmGw0IW0lMoFBSur4gq0STZ94=; 24:0clTeGbvkSHcY7ivoPUjN+OqmpBwOefh+E5hDbZOTjSJlbx9M58E+m6UyMHk84SdluJyuoCVYVnvRiislr+u8csdToj8hyitJ5JkD7S4OTA=; 7:vEbCy92+4nHtku3qrjtxetQiVCJfNri4B75fPn42hJF1rDJCsWDl4ahfXPoecJRkdi0NtLJtvtFePZFf297UOuPA0Aex3uK5XWNQAZDcbDoebWZNmKABNiHvWghT3i8ojqLfpvnc4VCrb/dzHlx3TIXP8ydfbJtQo5yRLUuuV/nBo6RWa+YzUasUtUBDPozn4BiXjtrIYjz77jgO0vXURV/LgO5ukQYUpS0/FMR9Y71KRRJVFi8yCvZHuNWFU/IG SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: microsemi.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Dec 2017 17:34:34.3372 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5267e9a5-622a-4544-69f0-08d548991a10 X-MS-Exchange-CrossTenant-Id: f267a5c8-86d8-4cc9-af71-1fd2c67c8fad X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f267a5c8-86d8-4cc9-af71-1fd2c67c8fad; Ip=[208.19.100.21]; Helo=[avsrvexchhts1.microsemi.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0201MB1826 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: <linux-scsi.vger.kernel.org> X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index 2cd880f..f781076 100644 --- a/drivers/scsi/aacraid/commsup.c +++ b/drivers/scsi/aacraid/commsup.c @@ -1938,11 +1938,18 @@ static int aac_is_safw_device_exposed(struct aac_dev *dev, int bus, int target) return is_exposed; } -static void aac_resolve_luns(struct aac_dev *dev) +static int aac_update_safw_host_devices(struct aac_dev *dev, int rescan) { int i; - int bus, target; + int bus; + int target; int is_exposed = 0; + int rcode = 0; + + rcode = aac_setup_safw_adapter(dev, rescan); + if (unlikely(rcode < 0)) { + goto out; + } for (i = 0; i < AAC_BUS_TARGET_LOOP; i++) { @@ -1957,6 +1964,8 @@ static void aac_resolve_luns(struct aac_dev *dev) is_exposed) aac_remove_safw_device(dev, bus, target); } +out: + return rcode; } /** @@ -1992,9 +2001,7 @@ static void aac_handle_sa_aif(struct aac_dev *dev, struct fib *fibptr) case SA_AIF_LDEV_CHANGE: case SA_AIF_BPCFG_CHANGE: - aac_setup_safw_adapter(dev, AAC_RESCAN); - - aac_resolve_luns(dev); + aac_update_safw_host_devices(dev, AAC_RESCAN); break; case SA_AIF_BPSTAT_CHANGE:
The device hotplug events are processed only after retrieving the updated lun information from the fw. Does not make sense to keep them separate. Merge both the hotplug handling and safw adapter setup code into single function. Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> --- drivers/scsi/aacraid/commsup.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-)