linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Fam Zheng <famz@redhat.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Ulrich Obergfell <uobergfe@redhat.com>,
	Yinghai Lu <yhlu.kernel.send@gmail.com>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Yijing Wang <wangyijing@huawei.com>,
	Yinghai Lu <yinghai@kernel.org>
Subject: Re: [PATCH v6 04/10] PCI/MSI: Don't disable MSI/MSI-X at shutdown
Date: Tue, 14 Apr 2015 12:49:03 +0200	[thread overview]
Message-ID: <20150414124742-mutt-send-email-mst@redhat.com> (raw)
In-Reply-To: <20150414104505.GA32015@ad.nay.redhat.com>

On Tue, Apr 14, 2015 at 06:45:05PM +0800, Fam Zheng wrote:
> 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?
> 
> 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
>         /*

Needs to happen before msi shutdown then.
There are also drivers which call pci_intx from interrupt
handler, which will conflict.

> > 
> > 
> > > >> [bhelgaas: changelog]
> > > >> Reported-by: Fam Zheng <famz@redhat.com>
> > > >> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > > >> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
> > > >> CC: Yinghai Lu <yhlu.kernel.send@gmail.com>
> > > >> CC: Ulrich Obergfell <uobergfe@redhat.com>
> > > >> CC: Rusty Russell <rusty@rustcorp.com.au>
> > > >> ---
> > > >>  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
> > > >>       /*
> > > >>

  reply	other threads:[~2015-04-14 10:49 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-10 22:54 [PATCH v6 00/10] PCI: Fix unhandled interrupt on shutdown Bjorn Helgaas
2015-04-10 22:54 ` [PATCH v6 01/10] PCI/MSI: Rename msi_set_enable(), msix_clear_and_set_ctrl() Bjorn Helgaas
2015-04-11  7:30   ` Greg KH
2015-04-11 16:01     ` Bjorn Helgaas
2015-04-10 22:54 ` [PATCH v6 02/10] PCI/MSI: Export pci_msi_set_enable(), pci_msix_clear_and_set_ctrl() Bjorn Helgaas
2015-04-10 22:54 ` [PATCH v6 03/10] PCI/MSI: Disable MSI at enumeration even if kernel doesn't support MSI Bjorn Helgaas
2015-04-10 22:54 ` [PATCH v6 04/10] PCI/MSI: Don't disable MSI/MSI-X at shutdown Bjorn Helgaas
2015-04-13  9:37   ` Fam Zheng
2015-04-13 15:41     ` Bjorn Helgaas
2015-04-13 16:45       ` Eric W. Biederman
2015-04-14  9:44         ` Michael S. Tsirkin
2015-04-16 19:42         ` Bjorn Helgaas
2015-04-17  1:05           ` Fam Zheng
2015-04-14  9:47       ` Michael S. Tsirkin
2015-04-14 10:45         ` Fam Zheng
2015-04-14 10:49           ` Michael S. Tsirkin [this message]
2015-04-16  7:30   ` Michael S. Tsirkin
2015-04-10 22:54 ` [PATCH v6 05/10] PCI/MSI: Make pci_msi_shutdown(), pci_msix_shutdown() static Bjorn Helgaas
2015-04-10 22:55 ` [PATCH v6 06/10] virtio_pci: drop pci_msi_off() call during probe Bjorn Helgaas
2015-04-10 22:55 ` [PATCH v6 07/10] ntb: Drop " Bjorn Helgaas
2015-04-10 22:55 ` [PATCH v6 08/10] mic: " Bjorn Helgaas
2015-04-10 22:55 ` [PATCH v6 09/10] PCI/MSI: Drop pci_msi_off() calls from quirks Bjorn Helgaas
2015-04-10 22:55 ` [PATCH v6 10/10] PCI/MSI: Remove unused pci_msi_off() Bjorn Helgaas
2015-04-26  6:50 ` [PATCH v6 00/10] PCI: Fix unhandled interrupt on shutdown Michael S. Tsirkin
2015-05-06 21:03   ` Bjorn Helgaas
2015-05-07  0:53     ` Eric W. Biederman
2015-05-07 15:04       ` Bjorn Helgaas
2015-05-10 11:05         ` Michael S. Tsirkin
2015-05-10 11:09     ` Michael S. Tsirkin
2015-05-10 11:42       ` Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150414124742-mutt-send-email-mst@redhat.com \
    --to=mst@redhat.com \
    --cc=bhelgaas@google.com \
    --cc=ebiederm@xmission.com \
    --cc=famz@redhat.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=uobergfe@redhat.com \
    --cc=wangyijing@huawei.com \
    --cc=yhlu.kernel.send@gmail.com \
    --cc=yinghai@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).