[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <jpgk2ylzs62.fsf@redhat.com>
Date: Thu, 12 Mar 2015 19:56:21 -0400
From: Bandan Das <bsd@...hat.com>
To: Fam Zheng <famz@...hat.com>
Cc: linux-kernel@...r.kernel.org, Bjorn Helgaas <bhelgaas@...gle.com>,
linux-pci@...r.kernel.org
Subject: Re: [RFC PATCH] PCI: Disable MSI/MSI-X only if device is shutdown
Hi Fam,
Fam Zheng <famz@...hat.com> writes:
> If the device doesn't support shutdown, disabling interrupts may cause
> trouble. For example, virtio-scsi-pci doesn't implement shutdown, and
> after we disable MSI-X, futher notifications from device will be
> delivered to IRQ, which is unexpected. This IRQ will not be cleared, and
> may prevent us from making progress, by keep triggering interrupts.
>
> Signed-off-by: Fam Zheng <famz@...hat.com>
> ---
> drivers/pci/pci-driver.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
> index 3cb2210..fb29c96 100644
> --- a/drivers/pci/pci-driver.c
> +++ b/drivers/pci/pci-driver.c
> @@ -448,10 +448,11 @@ static void pci_device_shutdown(struct device *dev)
>
> pm_runtime_resume(dev);
>
> - if (drv && drv->shutdown)
> + if (drv && drv->shutdown) {
> drv->shutdown(pci_dev);
> - pci_msi_shutdown(pci_dev);
> - pci_msix_shutdown(pci_dev);
> + pci_msi_shutdown(pci_dev);
> + pci_msix_shutdown(pci_dev);
> + }
If the driver doesn't provide a shutdown method and doesn't itself
disable MSI/MSI-X, then pci_msi(x)_shutdown won't be called anymore,
no ?
This is probably ok (but unclean) for a system shutdown, but could
cause problems for something like kexec ?
Bandan
> #ifdef CONFIG_KEXEC
> /*
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists