From patchwork Wed Dec 27 04:34:46 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: 10133421 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 3F36D6037D for ; Wed, 27 Dec 2017 04:35:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 27DE32C646 for ; Wed, 27 Dec 2017 04:35:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1C0F82C61C; Wed, 27 Dec 2017 04:35:41 +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 823212C1F7 for ; Wed, 27 Dec 2017 04:35:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751875AbdL0Efj (ORCPT ); Tue, 26 Dec 2017 23:35:39 -0500 Received: from mail-sn1nam02on0068.outbound.protection.outlook.com ([104.47.36.68]:54432 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751857AbdL0EfZ (ORCPT ); Tue, 26 Dec 2017 23:35:25 -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=GJBsi2a8q/l0zVta8kCEiOmGNqbf2mnF/uvQGMuDB8o=; b=FkdnvS46m49e8gj9qdA5QDHe91mU46gxUvwCz0db2TlBEmI7EwTDva54vjE77JNh4FmascrFPbdzG1CjJTR/S+N1wprCE/d/2oqdFYTXkU8xOw+GZiEaYAH3YUTdR0H2/nZLnvvHddpGu2+1a25XkwfXUe7rbQXNUT2c4tQqHgk= Received: from MWHPR0201CA0047.namprd02.prod.outlook.com (2603:10b6:301:73::24) by CO1PR02MB143.namprd02.prod.outlook.com (2a01:111:e400:101e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.366.8; Wed, 27 Dec 2017 04:35:20 +0000 Received: from BL2FFO11FD050.protection.gbl (2a01:111:f400:7c09::115) by MWHPR0201CA0047.outlook.office365.com (2603:10b6:301:73::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.366.8 via Frontend Transport; Wed, 27 Dec 2017 04:35:19 +0000 Authentication-Results: spf=pass (sender IP is 208.19.100.21) smtp.mailfrom=microsemi.com; wdc.com; dkim=none (message not signed) header.d=none;wdc.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 BL2FFO11FD050.mail.protection.outlook.com (10.173.161.212) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.345.12 via Frontend Transport; Wed, 27 Dec 2017 04:35:00 +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; Tue, 26 Dec 2017 20:35:01 -0800 From: Raghava Aditya Renukunta To: , , CC: , , , "Guilherme G . Piccoli" , Bart Van Assche Subject: [PATCH v2 25/30] scsi: aacraid: Reschedule host scan in case of failure Date: Tue, 26 Dec 2017 20:34:46 -0800 Message-ID: <20171227043451.27813-26-RaghavaAditya.Renukunta@microsemi.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20171227043451.27813-1-RaghavaAditya.Renukunta@microsemi.com> References: <20171227043451.27813-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)(39380400002)(396003)(346002)(39860400002)(2980300002)(438002)(199004)(189003)(81156014)(50466002)(57986006)(2906002)(16586007)(86362001)(1076002)(305945005)(478600001)(69596002)(77096006)(316002)(72206003)(51416003)(76176011)(110136005)(106002)(76506005)(59450400001)(54906003)(8676002)(104016004)(47776003)(106466001)(4326008)(53936002)(356003)(68736007)(5660300001)(50226002)(81166006)(8936002)(2950100002)(6666003)(2201001)(97736004)(48376002)(36756003); DIR:OUT; SFP:1101; SCL:1; SRVR:CO1PR02MB143; H:avsrvexchhts1.microsemi.net; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD050; 1:RAM9RHCN3L1CCapLvuUknZnVbhy/tnKi+9u6qPdNYVoTPuTHrcNVTy0TG4qv3RwyLeuUZMyhi9RF10m810kcuV5KIzT0XIg4NNSmvydd/R622yyT8EpGL2ln0vhX3vZZ X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 38766091-995e-46db-a3c0-08d54ce330e7 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(4608076)(2017052603307)(7153060); SRVR:CO1PR02MB143; X-Microsoft-Exchange-Diagnostics: 1; CO1PR02MB143; 3:NzNEQxwQpRZ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RZ1QfCqJKGkJvuVvucCzc0YR87eBGRfKyyV5FOA3i8EnPVP3JKO5cOu7NBfwUmdQE8q5XvWjSaGQAyiUbqUqBxwmLGTyKUx1KpE+aygYsxFv9o+mq2yXbzyQZbiFfH3QmVOh3EVyTV7is45/2owFiWk3H36GZouvqNzQvk8CYdjkb8Ese2Z51++ExmUjFmnket9DP1EoiezF3cBNouJzF9qehFWoSCPiJTef++VC1wD/qnU7UTfz+B0d4RzZxk0kfigVhMpC9zwf60BJuyS8x3Vp3V86PetdEVnQVVxHN3SUhCf96nH5f435rtalKH31IknQ3fS1OM9xT2WrC1wSd5p09EMhu+Ck1dgZkfTLF1yJBHmgqPBQNuwMrJRYwmVxN5ktULTeb0GbOEHd6YxCMmXcx0lMASQwkNOihi6ZWhSC2BshA40ManTNVW4UTy3QzWR6AvFflEPulv0ne2g5zkYJQ7vfL8jrDs4xHNYsouZk89REK3nRBpC91aXBu5k/n0yOvsNvjtn5w6JjHwnZEgE0asrdrEqkZiiV7+EFX09UhBLZGAEIv5rtA= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(72170198267865); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(5005006)(8121501046)(10201501046)(3002001)(3231023)(944501075)(93006095)(93004095)(6055026)(6041268)(20161123562045)(20161123558120)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:CO1PR02MB143; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:CO1PR02MB143; X-Microsoft-Exchange-Diagnostics: 1; CO1PR02MB143; 4:7Lp5MOmW6loZN9ao6nis7GZqIZLxt/gZ+mWQ81DLWUNi4QfeGJUxRVjKSnlCrarMhlcAp+PzpMJcVf5JF7rG6dzpLfeHvVGQE0r3KZDn2pu2+FghfY3rmg7L0WiVIIzP0warkyV0Q7hfldivi3cRm2t4pH/l8Q6ocHF1e55Fp5m2/Y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zO8f/FvATBtsCIVG/hwWKK9jO8lWpPk=; 24:wQ7DAJJu5ghPHTbGiwwP/scciZDc24BvQ/+JJU3MIgyoqgqzqQBYkg4Z0CJ1SrGdPF/TC6S6lhcZh9SAFxXi7cPo0mF3UcunhciI0H5PfMU=; 7:MtUHCnVk0jkiaiLwn9pJATdaltcIj6HsBXnXn8PLcBpwLTmomICY/YMCRWU6yShei2n8FWBUO7RwBKfAwIefH+JlwX5w+CAVlBb5HvQ64xjmvnNLvSwGJ0DCfY5OubNIePzYmOfmbBSJ3vmNgrj4o3AFrh/zVN4aKyz4qjOvPy3w89IrHiL9DntDrX4ZxVJYBjByL5puQvSqbk/g48DdFoKJKSfONv8Jifdq8sr7FoV5OTLs2xPFtiprH4wa+YLG SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: microsemi.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Dec 2017 04:35:00.1291 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 38766091-995e-46db-a3c0-08d54ce330e7 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: CO1PR02MB143 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 --- Changes in V2: Rename rescan worker to match kernel coding conventions 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..54078bf 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_work; 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_work, 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_work); + + 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_work); +} + /* 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 4e2687c..d562053 100644 --- a/drivers/scsi/aacraid/commsup.c +++ b/drivers/scsi/aacraid/commsup.c @@ -1964,16 +1964,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..bf9d2b7 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_work, 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);