Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp538082imu; Thu, 20 Dec 2018 00:54:53 -0800 (PST) X-Google-Smtp-Source: AFSGD/VN8GJDAZUD0fcM64pjfiiu8SXDhzLsdXVNu/fs4YFhTqoDF958RZIczJH0+dhcO5cG/+nl X-Received: by 2002:a17:902:b707:: with SMTP id d7mr22145402pls.29.1545296093929; Thu, 20 Dec 2018 00:54:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545296093; cv=none; d=google.com; s=arc-20160816; b=TGSp3JTr20mnMhvXz8bDZwhuVwr45CnHl2a6D+sw7NNlawVWpa2ec+KiKIsJ74gimp YvonzwtEemBI19VCB+V3YxYkj9sdQv0xe4lRhcRtkoifPVXBZ+CjBtx42NlrJUJZ/mZt k/x5Fgjn7+Dc8ljpGe0W88yO1kVUqyUtHYtDdWLh4V6iQjk/oe5dCqzrqhOh88cmKKky jj88/SH0EvpwuC4RobtoAZBZT4BXJBnbwQwUIiaKg+g2UnUX3+EfNJSnFKuIOlglPLhe zQ8kMWt4v8KhpTJ056fPXlJzyZxyWdCB/CdPAFynJwQUuBDR/dX7tIcvzTIUH91HUwGy UX7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=tBjabHRbyh1rAPH4/2GhPG8WecWKx2A1NdsFZwKK9og=; b=Mw5g3VRBZgVlr9IiSM0UgmE1XJE9s1F1ZNaX41WtPStWpeZ4O6t30XrzAr/h3ZYocR vHdxE3sZyG7MZjsKAYSJ4NRTRQlIK6UKxBzGTTY4/KekrdrSJ8phFQcBtOpP04i3mLjI 8vBbzUwGVGSNdiAzuiRxQzAfWAJmp1ehqLlu9QJQc6Yoa9dHNEBXSwmbSw9muhkc1oFc FpXFZpttzVt01Q654T9X36ot++l7hUj6BAPWYfKydPvFNSeOj1fCHDV2yP+iyX37oZ2d Bo6EbJUpUY4TCgznADpbZGIfoniqAl5pdz1CCNaXfbkzRxaOjOu0MJZTKVZNGRIHdXw+ FYrw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i33si17828851pld.329.2018.12.20.00.54.38; Thu, 20 Dec 2018 00:54:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729563AbeLTIwC convert rfc822-to-8bit (ORCPT + 99 others); Thu, 20 Dec 2018 03:52:02 -0500 Received: from [38.106.11.25] ([38.106.11.25]:35020 "EHLO barracuda02.hxt-semitech.com" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725775AbeLTIwB (ORCPT ); Thu, 20 Dec 2018 03:52:01 -0500 X-Greylist: delayed 1155 seconds by postgrey-1.27 at vger.kernel.org; Thu, 20 Dec 2018 03:52:01 EST X-ASG-Debug-ID: 1545294764-107606139f1f270002-xx1T2L Received: from HXTBJIDCEMVIW02.hxtcorp.net (localhost [10.128.0.15]) by barracuda02.hxt-semitech.com with ESMTP id 4kGGne91U2gSPDr4 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NO); Thu, 20 Dec 2018 16:32:44 +0800 (CST) X-Barracuda-Envelope-From: yanjiang.jin@hxt-semitech.com Received: from controller.hxtcorp.net (10.5.21.105) by HXTBJIDCEMVIW02.hxtcorp.net (10.128.0.15) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 20 Dec 2018 16:31:47 +0800 From: Yanjiang Jin To: , , , CC: , , , , Subject: [PATCH] scsi: smartpqi: call pqi_free_interrupts() in pqi_shutdown() Date: Thu, 20 Dec 2018 16:32:35 +0800 X-ASG-Orig-Subj: [PATCH] scsi: smartpqi: call pqi_free_interrupts() in pqi_shutdown() Message-ID: <1545294755-29565-2-git-send-email-yanjiang.jin@hxt-semitech.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1545294755-29565-1-git-send-email-yanjiang.jin@hxt-semitech.com> References: <1545294755-29565-1-git-send-email-yanjiang.jin@hxt-semitech.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.5.21.105] X-ClientProxiedBy: HXTBJIDCEMVIW02.hxtcorp.net (10.128.0.15) To HXTBJIDCEMVIW02.hxtcorp.net (10.128.0.15) Content-Transfer-Encoding: 8BIT X-Barracuda-Connect: localhost[10.128.0.15] X-Barracuda-Start-Time: 1545294764 X-Barracuda-Encrypted: ECDHE-RSA-AES256-SHA384 X-Barracuda-URL: https://192.168.50.102:443/cgi-mod/mark.cgi X-Barracuda-Scan-Msg-Size: 2307 X-Virus-Scanned: by bsmtpd at hxt-semitech.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Bayes: INNOCENT GLOBAL 0.5000 1.0000 0.7500 X-Barracuda-Spam-Score: 0.75 X-Barracuda-Spam-Status: No, SCORE=0.75 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.64134 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We must free all irqs during shutdown, else kexec's 2nd kernel would hang in pqi_wait_for_completion_io() as below: Call trace: pqi_wait_for_completion_io pqi_submit_raid_request_synchronous.constprop.78+0x23c/0x310 [smartpqi] pqi_configure_events+0xec/0x1f8 [smartpqi] pqi_ctrl_init+0x814/0xca0 [smartpqi] pqi_pci_probe+0x400/0x46c [smartpqi] local_pci_probe+0x48/0xb0 pci_device_probe+0x14c/0x1b0 really_probe+0x218/0x3fc driver_probe_device+0x70/0x140 __driver_attach+0x11c/0x134 bus_for_each_dev+0x70/0xc8 driver_attach+0x30/0x38 bus_add_driver+0x1f0/0x294 driver_register+0x74/0x12c __pci_register_driver+0x64/0x70 pqi_init+0xd0/0x10000 [smartpqi] do_one_initcall+0x60/0x1d8 do_init_module+0x64/0x1f8 load_module+0x10ec/0x1350 __se_sys_finit_module+0xd4/0x100 __arm64_sys_finit_module+0x28/0x34 el0_svc_handler+0x104/0x160 el0_svc+0x8/0xc This happens only in the following combinations: 1. smartpqi is built as module, not built-in; 2. We have a disk connected to smartpqi card; 3. Both kexec's 1st and 2nd kernels use this disk as Rootfs' mount point. Signed-off-by: Yanjiang Jin --- drivers/scsi/smartpqi/smartpqi_init.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c index a25a07a..55c1d82 100644 --- a/drivers/scsi/smartpqi/smartpqi_init.c +++ b/drivers/scsi/smartpqi/smartpqi_init.c @@ -6670,6 +6670,7 @@ static void pqi_shutdown(struct pci_dev *pci_dev) * storage. */ rc = pqi_flush_cache(ctrl_info, SHUTDOWN); + pqi_free_interrupts(ctrl_info); pqi_reset(ctrl_info); if (rc == 0) return; -- 1.8.3.1 This email is intended only for the named addressee. It may contain information that is confidential/private, legally privileged, or copyright-protected, and you should handle it accordingly. If you are not the intended recipient, you do not have legal rights to retain, copy, or distribute this email or its contents, and should promptly delete the email and all electronic copies in your system; do not retain copies in any media. If you have received this email in error, please notify the sender promptly. Thank you.