search for: pci_msix_shutdown

Displaying 20 results from an estimated 24 matches for "pci_msix_shutdown".

Did you mean: pci_msi_shutdown
2015 Mar 12
2
[RFC PATCH] PCI: Disable MSI/MSI-X only if device is shutdown
...-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); > + } > > #ifdef CONFIG_KEXEC > /* > The patch may be okay, but I think the bug here is also that virtio-pci is not defining a .shutdown callback. It should define one and call free_irq (for INTX...
2015 Mar 12
2
[RFC PATCH] PCI: Disable MSI/MSI-X only if device is shutdown
...-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); > + } > > #ifdef CONFIG_KEXEC > /* > The patch may be okay, but I think the bug here is also that virtio-pci is not defining a .shutdown callback. It should define one and call free_irq (for INTX...
2015 Sep 06
5
[PATCH v7] pci: quirk to skip msi disable on shutdown
...ver.c b/drivers/pci/pci-driver.c index 3cb2210..59d9e40 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c @@ -450,8 +450,10 @@ 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); + if (!(pci_dev->dev_flags & PCI_DEV_FLAGS_NO_MSI_SHUTDOWN)) { + pci_msi_shutdown(pci_dev); + pci_msix_shutdown(pci_dev); + } #ifdef CONFIG_KEXEC /* diff --git a/drivers/virtio/virtio_pci_common.c b/drivers/virtio/virtio_pci_common.c index 78f804a..26f46c3 100644 --- a/drive...
2015 Sep 06
5
[PATCH v7] pci: quirk to skip msi disable on shutdown
...ver.c b/drivers/pci/pci-driver.c index 3cb2210..59d9e40 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c @@ -450,8 +450,10 @@ 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); + if (!(pci_dev->dev_flags & PCI_DEV_FLAGS_NO_MSI_SHUTDOWN)) { + pci_msi_shutdown(pci_dev); + pci_msix_shutdown(pci_dev); + } #ifdef CONFIG_KEXEC /* diff --git a/drivers/virtio/virtio_pci_common.c b/drivers/virtio/virtio_pci_common.c index 78f804a..26f46c3 100644 --- a/drive...
2015 Sep 17
1
[PATCH v7] pci: quirk to skip msi disable on shutdown
...--- a/drivers/pci/pci-driver.c >> +++ b/drivers/pci/pci-driver.c >> @@ -450,8 +450,10 @@ 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); >> + if (!(pci_dev->dev_flags & PCI_DEV_FLAGS_NO_MSI_SHUTDOWN)) { >> + pci_msi_shutdown(pci_dev); >> + pci_msix_shutdown(pci_dev); >> + } >> >> #ifdef CONFIG_KEXEC >> /* >> diff --git a/drivers/virtio/virtio_pci_common.c b/driv...
2015 Sep 17
1
[PATCH v7] pci: quirk to skip msi disable on shutdown
...--- a/drivers/pci/pci-driver.c >> +++ b/drivers/pci/pci-driver.c >> @@ -450,8 +450,10 @@ 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); >> + if (!(pci_dev->dev_flags & PCI_DEV_FLAGS_NO_MSI_SHUTDOWN)) { >> + pci_msi_shutdown(pci_dev); >> + pci_msix_shutdown(pci_dev); >> + } >> >> #ifdef CONFIG_KEXEC >> /* >> diff --git a/drivers/virtio/virtio_pci_common.c b/driv...
2015 Mar 12
0
[RFC PATCH] PCI: Disable MSI/MSI-X only if device is shutdown
...tic 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); > > + } > > > > #ifdef CONFIG_KEXEC > > /* > > > > The patch may be okay, but I think the bug here is also that virtio-pci > is not defining a .shutdown callback....
2015 Mar 12
0
[RFC PATCH] PCI: Disable MSI/MSI-X only if device is shutdown
...tic 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); > > + } > > > > #ifdef CONFIG_KEXEC > > /* > > > > The patch may be okay, but I think the bug here is also that virtio-pci > is not defining a .shutdown callback....
2015 Sep 17
0
[PATCH v7] pci: quirk to skip msi disable on shutdown
...cb2210..59d9e40 100644 > --- a/drivers/pci/pci-driver.c > +++ b/drivers/pci/pci-driver.c > @@ -450,8 +450,10 @@ 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); > + if (!(pci_dev->dev_flags & PCI_DEV_FLAGS_NO_MSI_SHUTDOWN)) { > + pci_msi_shutdown(pci_dev); > + pci_msix_shutdown(pci_dev); > + } > > #ifdef CONFIG_KEXEC > /* > diff --git a/drivers/virtio/virtio_pci_common.c b/drivers/virtio/virtio_pci_common.c &...
2014 Aug 20
1
[RFC PATCH 03/11] PCI/MSI: Refactor pci_dev_msi_enabled()
...ether driver already requested for MSI irq */ > - if (dev->msi_enabled) { > + if (pci_dev_msi_enabled(dev, MSI_TYPE)) { > dev_info(&dev->dev, "can't enable MSI-X (MSI IRQ already > assigned)\n"); > return -EINVAL; > } > @@ -1001,7 +1003,8 @@ void pci_msix_shutdown(struct pci_dev *dev) > > void pci_disable_msix(struct pci_dev *dev) { > - if (!pci_msi_enable || !dev || !dev->msix_enabled) > + if (!pci_msi_enable || !dev || > + !pci_dev_msi_enabled(dev, MSIX_TYPE)) > return; > > pci_msix_shutdown(dev); > diff --git a/dri...
2014 Aug 20
1
[RFC PATCH 03/11] PCI/MSI: Refactor pci_dev_msi_enabled()
...ether driver already requested for MSI irq */ > - if (dev->msi_enabled) { > + if (pci_dev_msi_enabled(dev, MSI_TYPE)) { > dev_info(&dev->dev, "can't enable MSI-X (MSI IRQ already > assigned)\n"); > return -EINVAL; > } > @@ -1001,7 +1003,8 @@ void pci_msix_shutdown(struct pci_dev *dev) > > void pci_disable_msix(struct pci_dev *dev) { > - if (!pci_msi_enable || !dev || !dev->msix_enabled) > + if (!pci_msi_enable || !dev || > + !pci_dev_msi_enabled(dev, MSIX_TYPE)) > return; > > pci_msix_shutdown(dev); > diff --git a/dri...
2014 Jul 26
0
[RFC PATCH 03/11] PCI/MSI: Refactor pci_dev_msi_enabled()
...->msix_enabled); /* Check whether driver already requested for MSI irq */ - if (dev->msi_enabled) { + if (pci_dev_msi_enabled(dev, MSI_TYPE)) { dev_info(&dev->dev, "can't enable MSI-X (MSI IRQ already assigned)\n"); return -EINVAL; } @@ -1001,7 +1003,8 @@ void pci_msix_shutdown(struct pci_dev *dev) void pci_disable_msix(struct pci_dev *dev) { - if (!pci_msi_enable || !dev || !dev->msix_enabled) + if (!pci_msi_enable || !dev || + !pci_dev_msi_enabled(dev, MSIX_TYPE)) return; pci_msix_shutdown(dev); diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 7...
2014 Jul 26
0
[RFC PATCH 09/11] PCI/MSI: refactor PCI MSI driver
...us) { ret = populate_msi_sysfs(dev); if (ret) { - dev->msix_enabled = 0; - pci_intx_for_msi(dev, 1); - free_msi_irqs(dev); + dev->msi->msix_enabled = 0; + pci_intx_for_msi(dev->msi, 1); + free_msi_irqs(dev->msi); } } return status; @@ -983,18 +1016,18 @@ void pci_msix_shutdown(struct pci_dev *dev) { struct msi_desc *entry; - if (!pci_msi_enable || !dev || !dev->msix_enabled) + if (!pci_msi_enable || !dev || !pci_dev_msi_enabled(dev, MSIX_TYPE)) return; /* Return the device with MSI-X masked as initial states */ - list_for_each_entry(entry, &dev->msi...
2014 Aug 20
1
[RFC PATCH 09/11] PCI/MSI: refactor PCI MSI driver
...) { > - dev->msix_enabled = 0; > - pci_intx_for_msi(dev, 1); > - free_msi_irqs(dev); > + dev->msi->msix_enabled = 0; > + pci_intx_for_msi(dev->msi, 1); > + free_msi_irqs(dev->msi); > } > } > return status; > @@ -983,18 +1016,18 @@ void pci_msix_shutdown(struct pci_dev *dev) > { > struct msi_desc *entry; > > - if (!pci_msi_enable || !dev || !dev->msix_enabled) > + if (!pci_msi_enable || !dev || !pci_dev_msi_enabled(dev, MSIX_TYPE)) > return; > > /* Return the device with MSI-X masked as initial states */ > -...
2014 Aug 20
1
[RFC PATCH 09/11] PCI/MSI: refactor PCI MSI driver
...) { > - dev->msix_enabled = 0; > - pci_intx_for_msi(dev, 1); > - free_msi_irqs(dev); > + dev->msi->msix_enabled = 0; > + pci_intx_for_msi(dev->msi, 1); > + free_msi_irqs(dev->msi); > } > } > return status; > @@ -983,18 +1016,18 @@ void pci_msix_shutdown(struct pci_dev *dev) > { > struct msi_desc *entry; > > - if (!pci_msi_enable || !dev || !dev->msix_enabled) > + if (!pci_msi_enable || !dev || !pci_dev_msi_enabled(dev, MSIX_TYPE)) > return; > > /* Return the device with MSI-X masked as initial states */ > -...
2014 Jul 26
20
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
Hi all, The series is a draft of generic MSI driver that supports PCI and Non-PCI device which have MSI capability. If you're not interested it, sorry for the noise. The series is based on Linux-3.16-rc1. MSI was introduced in PCI Spec 2.2. Currently, kernel MSI driver codes are bonding with PCI device. Because MSI has a lot advantages in design. More and more non-PCI devices want to use
2014 Jul 26
20
[RFC PATCH 00/11] Refactor MSI to support Non-PCI device
Hi all, The series is a draft of generic MSI driver that supports PCI and Non-PCI device which have MSI capability. If you're not interested it, sorry for the noise. The series is based on Linux-3.16-rc1. MSI was introduced in PCI Spec 2.2. Currently, kernel MSI driver codes are bonding with PCI device. Because MSI has a lot advantages in design. More and more non-PCI devices want to use
2014 Aug 20
1
[RFC PATCH 10/11] PCI/MSI: Split the generic MSI code into new file
...); > /* Restore dev->irq to its default pin-assertion irq */ > + desc = list_first_entry(&dev->msi->msi_list, struct msi_desc, list); > dev->irq = desc->msi_attrib.default_irq; > } > > @@ -1014,20 +609,10 @@ EXPORT_SYMBOL(pci_enable_msix); > > void pci_msix_shutdown(struct pci_dev *dev) > { > - struct msi_desc *entry; > - > - if (!pci_msi_enable || !dev || !pci_dev_msi_enabled(dev, MSIX_TYPE)) > + if (!pci_msi_enable || !dev) > return; > > - /* Return the device with MSI-X masked as initial states */ > - list_for_each_entry(entr...
2014 Aug 20
1
[RFC PATCH 10/11] PCI/MSI: Split the generic MSI code into new file
...); > /* Restore dev->irq to its default pin-assertion irq */ > + desc = list_first_entry(&dev->msi->msi_list, struct msi_desc, list); > dev->irq = desc->msi_attrib.default_irq; > } > > @@ -1014,20 +609,10 @@ EXPORT_SYMBOL(pci_enable_msix); > > void pci_msix_shutdown(struct pci_dev *dev) > { > - struct msi_desc *entry; > - > - if (!pci_msi_enable || !dev || !pci_dev_msi_enabled(dev, MSIX_TYPE)) > + if (!pci_msi_enable || !dev) > return; > > - /* Return the device with MSI-X masked as initial states */ > - list_for_each_entry(entr...
2008 Sep 23
9
Xen crash on dom0 shutdown
...pendent upon guest behavior (should close event channel before un-mapping pirq), rather than on internal hypervisor state. In 2.6.18, this likely goes unnoticed because pci_device_shutdown() only calls all the driver shutdown routines. In newer kernels, however, it also calls pci_msi_shutdown() and pci_msix_shutdown(), which remove all pirq mappings. If now (which commonly appears to be the case for storage drivers) an MSI/MSI-X driver has no shutdown handler (or one that doesn''t do much, because on native this is not causing any problems), the assumption in Xen is violated and the hypervisor crashes....