LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] Unset msi and msix flags on pci_device_disable
@ 2007-03-21 22:22 Thomas Meyer
  2007-03-22  5:23 ` Eric W. Biederman
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Meyer @ 2007-03-21 22:22 UTC (permalink / raw)
  To: Linux Kernel Mailing List, Eric W. Biederman

The commit f5f2b13129a6541debf8851bae843cbbf48298b7 broke suspend/resume
to disk two or more  times in a row. This patches fixes the problem:

This patch should be included in 2.6.21

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index d3eab05..d7f8f96 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -886,7 +886,9 @@ pci_disable_device(struct pci_dev *dev)
         pci_write_config_word(dev, PCI_COMMAND, pci_command);
     }
     dev->is_busmaster = 0;
-
+    dev->msi_enabled=0;
+    dev->msix_enabled=0;
+   
     pcibios_disable_device(dev);
 }
 



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Unset msi and msix flags on pci_device_disable
  2007-03-21 22:22 [PATCH] Unset msi and msix flags on pci_device_disable Thomas Meyer
@ 2007-03-22  5:23 ` Eric W. Biederman
  0 siblings, 0 replies; 2+ messages in thread
From: Eric W. Biederman @ 2007-03-22  5:23 UTC (permalink / raw)
  To: Thomas Meyer; +Cc: Linux Kernel Mailing List

Thomas Meyer <thomas@m3y3r.de> writes:

> The commit f5f2b13129a6541debf8851bae843cbbf48298b7 broke suspend/resume
> to disk two or more  times in a row. This patches fixes the problem:

Please clue me in, on what the problem is, I see why my patch would
have changed things I don't see how it is breaking things.  Clearing
the device bits has no effect on the hardware and it leaks our
msi handling data structures.

What is the user doing that this code broke?

I will be happy to work through a proper fix but this isn't it.

If this is actually helps something I am tempted to make the
added lines say WARN_ON.....

But I would really like to understand the nature of the problem
so that we can do something to fix it properly.

Eric

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-03-22  5:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-21 22:22 [PATCH] Unset msi and msix flags on pci_device_disable Thomas Meyer
2007-03-22  5:23 ` Eric W. Biederman

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