Re: SATA resume slowness, e1000 MSI warning

Kok, Auke
2007-03-09T23:06:52Z

Eric W. Biederman wrote:

[CHOP]

> 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.

I'm trying this patch together with the other 2 that you sent out a few days
ago. I'm seeing some minor issues with this and lots of bogus warnings as far as
I can see.

If I suspend/resume and unload e1000, then reinsert e1000.ko, I immediately hit
the WARN_ON at `msi.c:516: WARN_ON(!hlist_empty(&dev->saved_cap_space));`

I'm not sure that's useful debugging information. even though saved state exists
the module has been removed, so you might want to purge the state table when the
driver gets removed?

anyway, back to testing.

Auke

>
> 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;
> }