From patchwork Thu Dec 21 17:34:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raghava Aditya Renukunta X-Patchwork-Id: 10128149 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 3D9EF60318 for ; Thu, 21 Dec 2017 17:36:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2BC3B29CE3 for ; Thu, 21 Dec 2017 17:36:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 20BFD29D3C; Thu, 21 Dec 2017 17:36:01 +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 5FB3F29D38 for ; Thu, 21 Dec 2017 17:36:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754637AbdLURf7 (ORCPT ); Thu, 21 Dec 2017 12:35:59 -0500 Received: from mail-cys01nam02on0069.outbound.protection.outlook.com ([104.47.37.69]:53597 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753944AbdLURfF (ORCPT ); Thu, 21 Dec 2017 12:35:05 -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=ciRbD3b4kIhxymqdA2L/0+jTSLodd9bcwX/QGvk9hvY=; b=SqVa2tX5acZK6L5PZ8yS2RY8EaQ0GJVMNiCA1kUY51dLIYdi7o4S7V87UGnouUOQ+sumCpwfNuqmgOdBSffETDE6ZbwvL9Rig4KwYZBoOquQkV8k34FuLd1jaGssQQDD4ZP5qyvFHuZF9DT99cZMAh0/P+QMyYQlc5LxZ5yD8Uw= Received: from MWHPR0201CA0061.namprd02.prod.outlook.com (2603:10b6:301:73::38) by BN1PR02MB136.namprd02.prod.outlook.com (2a01:111:e400:20::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.345.14; Thu, 21 Dec 2017 17:34:50 +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:50 +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:36 +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:28 -0800 From: Raghava Aditya Renukunta To: , , CC: , , , "Guilherme G . Piccoli" Subject: [PATCH 25/29] scsi: aacraid: Reschedule host scan in case of failure Date: Thu, 21 Dec 2017 09:34:16 -0800 Message-ID: <20171221173420.8213-26-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 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)(376002)(396003)(39380400002)(346002)(39860400002)(2980300002)(438002)(189003)(199004)(97736004)(106002)(316002)(86362001)(69596002)(2950100002)(50226002)(104016004)(36756003)(6666003)(77096006)(8936002)(16586007)(478600001)(2201001)(53936002)(54906003)(72206003)(110136005)(81156014)(5660300001)(47776003)(1076002)(305945005)(8676002)(51416003)(356003)(59450400001)(4326008)(2906002)(50466002)(76506005)(106466001)(68736007)(57986006)(48376002)(81166006)(76176011); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1PR02MB136; H:avsrvexchhts1.microsemi.net; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD012; 1:AMBOz5dr2bW2WwkNzk2uH8C3zyEjtqzk1tP0pacpxa+O7M9YCRnhg7uebGmwYTSATZNHm0TZwutb5fKlYSsxH642MTWKx7wNMGTQ5Not8fV6O9kw0CGALBsf99lH6Eee X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9ff1eccd-7f8d-4e72-97f7-08d548991b05 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(4608076)(2017052603307)(7153060); SRVR:BN1PR02MB136; X-Microsoft-Exchange-Diagnostics: 1; BN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z/jEn5wHLrQfd5rTen8EkvY3SbfCpMBcy9Ct1Mt87Wjo0bQgkKq6790pTeRaX2KLUkjmDvvkc4D+CaEzwywCe8uw92YzaejMf9qBOBlMo8dl5qHdmKG19FwQIh9HEjnXjPmugGoq55/WVGSYQJt9Kn1tc/l6p3YFiHpMty4wJnOenjpJbtWwlqYbOiPAqN1y7fHE/XB/+cEm5ojvDwzpJQw3Hxu6/WHhovUUt4H7R7Bxj52/dDF3iV9aK+h3kIm4SGL9gZ5vSJUFIY7kRr1YbY8zb2A6VILZhyYpIXPbf+fGR25kLyfx5LsmjQu7X1K+AlNsy8D+WkOwJ7zduFMIZHxeC6xw75AbZxviVt7n4Ec7D2sxFkE9J4PlmLztd+ew6VyyrApQ6QstjYIH06E9316qubKsRaMbwSDcsGvxQM+Z+ILkjDF6wQ+Ye75v66/kQ56+Mfi3ucC7ktUibDKJGlvntMrcDlyOyE47a4BEtgaURQKl3hE1ysSWmB76sj7L0hvh6vSf0lg5I50fa1zHIVaYjGdv0vVbQpbfSKQqKqCzn1dS2hLFGZyZGep+Hn6w8LFIchkBA3yHo= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(72170198267865); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(8121501046)(5005006)(3002001)(93006095)(93004095)(3231023)(10201501046)(6055026)(6041268)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011); SRVR:BN1PR02MB136; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:BN1PR02MB136; X-Microsoft-Exchange-Diagnostics: 1; BN1PR02MB136; 4:GH70vOcIVsYSlQDCyZzAzveH+8eX2hL5EQvievvAZluplTXiIHvC51ZESc7Gb4BMw6MH10KLFheKP42aZQyTZamaDrySIua4cB0vRQvpSpul3B0RKcQ1nhvM9vNBmmoAVq3IsFw/GGtgUD/jx6LqvSovZsKnEXXy0B0T7c67wHZ+lnDETtzovPWC2l7B7BDske4KQbT/UOLVc26lrBtutSqg+3GjhXF6DwWHbmMXI8wrTGfS3cSyzt86wn6GigzJpYaYxL7apHBXSPAOFXbeL/DRuB9IvrnlntpyOMywaZtdwsuGry4z5kVdxi7AyL7I X-Forefront-PRVS: 0528942FD8 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN1PR02MB136; 23:zK/MPnrY4jkFqtsRtPNTpUxl5PHXLFd7Fw5pHsjK9x?= =?us-ascii?Q?5KcA+zbqbCVbIaSP9jLTsHTPb6eclCycAfUbOhEfS5SJ6HOxbVwKttxvb7sP?= =?us-ascii?Q?RgG09kVDGGCm7vbhx6JiL8b68EaYuMQM2Pi0Fyh9RLmcCNhJdJcpmIT67SI2?= =?us-ascii?Q?k88AIEUc5sE1ySIIWXybAlg8mEOjGRUXF1IChZjVWcewrRY57jHYxqNiW889?= =?us-ascii?Q?RQgp7tUpJHIv/ug1I71gcPAbL/aAqqZ6zo2PVtri1pCzi5UJiHAHslI0gUfp?= =?us-ascii?Q?UpX0N8NRy7t4GwoHRcxC3F3iWruUyRi5HeDltWvLx4ncZFDgcw5l2LVJ2yCC?= =?us-ascii?Q?NqVIqWvovltn8JGwvW61ixH4B0V0gCTHE78DdYEUZsuGMmQL1xjPx4VQR2vX?= =?us-ascii?Q?Lg1vR7idkxX1gy/1Kp2OqXReN4TxvN8X4efvKjvqEEzdk7ZttEcDQ2+R69S2?= =?us-ascii?Q?2ULGjkdVnAwMqgE/8VPOBqyPEARESMhMCx4QFDGLFMvoP+4nvbW8ihkigL8E?= =?us-ascii?Q?u0XZA37IhnXwRtT/teSXQj6EIpoHkGHh8txIRsZcBxdqYYuvnWGS+LsjBCLD?= =?us-ascii?Q?fGi3AISn4KKaVRq2733A/ba4259JoYIpDJhLT5YIV6fARV9v9cU7Hg0LiNpt?= =?us-ascii?Q?3qk6MgsI+ZILm3Vubmu+EAuTY39+rrhkfbxZkOMahKou4Uh1N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/El11vTfMlt1cpYvXB2E67TDy2PIjBO4WmXo5M0f5XUHpO6g8q7lbPEWEJXs=; 24:DPTuU+Ij41kpUNW+yIG/YTQw9vwH1uehTDmYGmo0aMc17AzpP36oUySL0UacuryWTAcLW68DWTXtyOL7vvbtlEjIDkcYIO5bmMqhObosKE0=; 7:CzFD704mvYJgtW5bY0zIPNHUek0zjpfa+nv9WPqqHHn2eYYCRLJLtnU0Mnk+pS2Ni1qlFMUxtTEExW4EdQFlnl0E2CRrioIDmxVnNeTMuprqYyIPTp7emyjfyKTwJtKjv0BdAi2BcNWrhwKtXtUNtApigh0IFvur0jPHFUxQVObTs8nzqNvSdj8DyxO5iT0XB7Wk434rooqVudrLf7sR2f8avdcbWhBbOACAKN8i2FvAKYJtAU5x34z3+RtG3YZZ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: microsemi.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Dec 2017 17:34:36.0064 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9ff1eccd-7f8d-4e72-97f7-08d548991b05 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: BN1PR02MB136 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If the driver fails to retrieve information from the fw (could happen when the fw is not fully in its senses), the driver does nothing and change is not processed correctly by the driver Schedule host rescan in case of failure. This is only for SAFW, since the information retrieval failure will happen on SAFW devices. Signed-off-by: Raghava Aditya Renukunta --- drivers/scsi/aacraid/aacraid.h | 27 ++++++++++++++++++++++++++- drivers/scsi/aacraid/commsup.c | 14 +++++++++++++- drivers/scsi/aacraid/linit.c | 5 +++++ 3 files changed, 44 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h index ba84d99..70e03ed 100644 --- a/drivers/scsi/aacraid/aacraid.h +++ b/drivers/scsi/aacraid/aacraid.h @@ -1341,6 +1341,8 @@ struct fib { #define AAC_EXPOSE_DISK 0 #define AAC_HIDE_DISK 3 +#define AAC_SAFW_RESCAN_DELAY 10 + struct aac_hba_map_info { __le32 rmw_nexus; /* nexus for native HBA devices */ u8 devtype; /* device type */ @@ -1611,6 +1613,7 @@ struct aac_dev int maximum_num_channels; struct fsa_dev_info *fsa_dev; struct task_struct *thread; + struct delayed_work safw_rescan_worker; int cardtype; /* *This lock will protect the two 32-bit @@ -2639,12 +2642,35 @@ static inline int aac_adapter_check_health(struct aac_dev *dev) return (dev)->a_ops.adapter_check_health(dev); } + +int aac_scan_host(struct aac_dev *dev, int rescan); + +static inline void aac_schedule_safw_scan_worker(struct aac_dev *dev) +{ + schedule_delayed_work(&dev->safw_rescan_worker, AAC_SAFW_RESCAN_DELAY); +} + +static inline void aac_safw_rescan_worker(struct work_struct *work) +{ + struct aac_dev *dev = container_of(to_delayed_work(work), + struct aac_dev, safw_rescan_worker); + + aac_scan_host(dev, AAC_RESCAN); +} + +static inline void aac_cancel_safw_rescan_worker(struct aac_dev *dev) +{ + if (dev->sa_firmware) + cancel_delayed_work_sync(&dev->safw_rescan_worker); +} + /* SCp.phase values */ #define AAC_OWNER_MIDLEVEL 0x101 #define AAC_OWNER_LOWLEVEL 0x102 #define AAC_OWNER_ERROR_HANDLER 0x103 #define AAC_OWNER_FIRMWARE 0x106 +void aac_safw_rescan_worker(struct work_struct *work); int aac_acquire_irq(struct aac_dev *dev); void aac_free_irq(struct aac_dev *dev); int aac_setup_safw_adapter(struct aac_dev *dev, int rescan); @@ -2719,7 +2745,6 @@ static inline int aac_supports_2T(struct aac_dev *dev) return (dev->adapter_info.options & AAC_OPT_NEW_COMM_64); } -int aac_scan_host(struct aac_dev *dev, int rescan); char * get_container_type(unsigned type); extern int numacb; extern char aac_driver_version[]; diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index 46ee7ba..48b5234 100644 --- a/drivers/scsi/aacraid/commsup.c +++ b/drivers/scsi/aacraid/commsup.c @@ -1968,16 +1968,28 @@ static int aac_update_safw_host_devices(struct aac_dev *dev, int rescan) return rcode; } +static int aac_scan_safw_host(struct aac_dev *dev, int rescan) +{ + int rcode = 0; + + rcode = aac_update_safw_host_devices(dev, rescan); + if (rcode) + aac_schedule_safw_scan_worker(dev); + + return rcode; +} + int aac_scan_host(struct aac_dev *dev, int rescan) { int rcode = 0; mutex_lock(&dev->scan_mutex); if (dev->sa_firmware) - rcode = aac_update_safw_host_devices(dev, rescan); + rcode = aac_scan_safw_host(dev, rescan); else scsi_scan_host(dev->scsi_host_ptr); mutex_unlock(&dev->scan_mutex); + return rcode; } diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index 7ea7b2c..d39dc5e 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c @@ -1684,6 +1684,8 @@ static int aac_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) mutex_init(&aac->ioctl_mutex); mutex_init(&aac->scan_mutex); + + INIT_DELAYED_WORK(&aac->safw_rescan_worker, aac_safw_rescan_worker); /* * Map in the registers from the adapter. */ @@ -1873,6 +1875,7 @@ static int aac_suspend(struct pci_dev *pdev, pm_message_t state) struct aac_dev *aac = (struct aac_dev *)shost->hostdata; scsi_block_requests(shost); + aac_cancel_safw_rescan_worker(aac); aac_send_shutdown(aac); aac_release_resources(aac); @@ -1931,6 +1934,7 @@ static void aac_remove_one(struct pci_dev *pdev) struct Scsi_Host *shost = pci_get_drvdata(pdev); struct aac_dev *aac = (struct aac_dev *)shost->hostdata; + aac_cancel_safw_rescan_worker(aac); scsi_remove_host(shost); __aac_shutdown(aac); @@ -1988,6 +1992,7 @@ static pci_ers_result_t aac_pci_error_detected(struct pci_dev *pdev, aac->handle_pci_error = 1; scsi_block_requests(aac->scsi_host_ptr); + aac_cancel_safw_rescan_worker(aac); aac_flush_ios(aac); aac_release_resources(aac);