"Kok, Auke" <auke-jan.h.kok@intel.com> writes:I just want to understand why we have issues and to see if how we have organized the suspend/resume path for dealing with msi irqs makes sense. That is I haven't looked much at the suspend/resume path so I don't know it well and I am afraid that your problem might be a symptom of a deeper problem. Currently the irq code supports operation without the free_irq/request_irq. Since the numbers given are pure linux abstractions things should it is really a matter of just saving/restoring the appropriate state. Yep. Below is an additional set of warnings that should help debug this. The old code just got lucky that it triggered a warning when this happens. diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index 01869b1..5113913 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -613,6 +613,7 @@ int pci_enable_msi(struct pci_dev* dev) return -EINVAL; WARN_ON(!!dev->msi_enabled); + WARN_ON(!hlist_empty(&dev->saved_cap_space)); /* Check whether driver already requested for MSI-X irqs */ if (dev->msix_enabled) { @@ -638,6 +639,8 @@ void pci_disable_msi(struct pci_dev* dev) if (!dev->msi_enabled) return; + WARN_ON(!hlist_empty(&dev->saved_cap_space)); + msi_set_enable(dev, 0); pci_intx(dev, 1); /* enable intx */ dev->msi_enabled = 0; @@ -739,6 +742,7 @@ int pci_enable_msix(struct pci_dev* dev, struct msix_entry *entries, int nvec) } } WARN_ON(!!dev->msix_enabled); + WARN_ON(!hlist_empty(&dev->saved_cap_space)); /* Check whether driver already requested for MSI irq */ if (dev->msi_enabled) { @@ -763,6 +767,8 @@ void pci_disable_msix(struct pci_dev* dev) if (!dev->msix_enabled) return; + WARN_ON(!hlist_empty(&dev->saved_cap_space)); + msix_set_enable(dev, 0); pci_intx(dev, 1); /* enable intx */ dev->msix_enabled = 0; diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index bd44a48..4418839 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -677,6 +677,7 @@ pci_restore_state(struct pci_dev *dev) } pci_restore_pcix_state(dev); pci_restore_msi_state(dev); + WARN_ON(!hlist_empty(&dev->saved_cap_space)); return 0; } -
| Bruce Leonard | [PATCH 2/2][MTD] Add support for > 2GiB MTD devices |
| Benjamin Herrenschmidt | Re: [PATCH 0 of 4] Generic AIO by scheduling stacks |
| Rafael J. Wysocki | [Bug #11264] Invalid op opcode in kernel/workqueue |
| Vladislav Bolkhovitin | Re: Integration of SCST in the mainstream Linux kernel |
git: | |
| Elijah Newren | Trying to use git-filter-branch to compress history by removing large, obsolete bi... |
| David Woodhouse | Re: [kernel.org users] [RFD] On deprecating "git-foo" for builtins |
| Florian Weimer | Re: comparing file contents in is_exact_match? |
| sean | Adding color to git diff output. |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| David Newman | setting dscp or tos bits |
| Richard Stallman | Real men don't attack straw men |
| alemao | Azalia - Realtek/0x0885 - plays, but no sound |
| Jim Winstead Jr. | Re: Root Disk/Book Disk Compatibility |
| Doug Evans | Re: Stabilizing Linux |
| Stephen Tweedie | Re: No utmp entry. You must exec "login" from lowest level "sh" |
| Maurizio Codogno | SLS 0.99.2 mount problems |
