From patchwork Tue Apr 14 10:45:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fam Zheng X-Patchwork-Id: 6214901 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BF5869F1C4 for ; Tue, 14 Apr 2015 10:45:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 068152021F for ; Tue, 14 Apr 2015 10:45:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7B0F120212 for ; Tue, 14 Apr 2015 10:45:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755220AbbDNKpU (ORCPT ); Tue, 14 Apr 2015 06:45:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39090 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753495AbbDNKpR (ORCPT ); Tue, 14 Apr 2015 06:45:17 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t3EAj8Vg001162 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 14 Apr 2015 06:45:08 -0400 Received: from localhost (dhcp-14-137.nay.redhat.com [10.66.14.137]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t3EAj6QH005735; Tue, 14 Apr 2015 06:45:07 -0400 Date: Tue, 14 Apr 2015 18:45:05 +0800 From: Fam Zheng To: "Michael S. Tsirkin" Cc: Bjorn Helgaas , "linux-pci@vger.kernel.org" , Rusty Russell , Ulrich Obergfell , Yinghai Lu , "Eric W. Biederman" , Yijing Wang , Yinghai Lu Subject: Re: [PATCH v6 04/10] PCI/MSI: Don't disable MSI/MSI-X at shutdown Message-ID: <20150414104505.GA32015@ad.nay.redhat.com> References: <20150410223533.20848.95316.stgit@bhelgaas-glaptop2.roam.corp.google.com> <20150410225446.20848.51279.stgit@bhelgaas-glaptop2.roam.corp.google.com> <20150413093708.GE17059@ad.nay.redhat.com> <20150414114433-mutt-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20150414114433-mutt-send-email-mst@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Tue, 04/14 11:47, Michael S. Tsirkin wrote: > I have investigated this, and I at this point I think the hang is basically > a non issue. So the commit log should say > > if the driver hasn't registered an interrupt handler for it, the interrupt > is never deasserted and causes spurious interrupts, typically > followed by kernel disabling the irq. Or, how about disabling intx immediately too? > > > > >> [bhelgaas: changelog] > > >> Reported-by: Fam Zheng > > >> Signed-off-by: Michael S. Tsirkin > > >> Signed-off-by: Bjorn Helgaas > > >> CC: Yinghai Lu > > >> CC: Ulrich Obergfell > > >> CC: Rusty Russell > > >> --- > > >> drivers/pci/pci-driver.c | 2 -- > > >> 1 file changed, 2 deletions(-) > > >> > > >> diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c > > >> index 3cb2210de553..38a602cb9fb7 100644 > > >> --- a/drivers/pci/pci-driver.c > > >> +++ b/drivers/pci/pci-driver.c > > >> @@ -450,8 +450,6 @@ static void pci_device_shutdown(struct device *dev) > > >> > > >> if (drv && drv->shutdown) > > >> drv->shutdown(pci_dev); > > >> - pci_msi_shutdown(pci_dev); > > >> - pci_msix_shutdown(pci_dev); > > >> > > >> #ifdef CONFIG_KEXEC > > >> /* > > >> --- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index 3cb2210..dd7dcc1 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c @@ -452,6 +452,7 @@ static void pci_device_shutdown(struct device *dev) drv->shutdown(pci_dev); pci_msi_shutdown(pci_dev); pci_msix_shutdown(pci_dev); + pci_intx(pci_dev, 0); #ifdef CONFIG_KEXEC /*