lkml.org 
[lkml]   [2007]   [May]   [12]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateSat, 12 May 2007 22:12:37 +0200
FromLukas Hejtmanek <>
Subject[PATCH] Workaround for a PCI restoring bug
Hello,

as of 2.6.21-git16, the bugs related to restoring PCI are still present. The
save pci function reads only -1 from the PCI config space and when restoring,
it messes up totaly most PCI devices. The attached patch is workaround only
until proper fix is found and included. Could it be included into the mainline
for now?

-- 
Lukáš Hejtmánek
--- drivers/pci/pci.c.orig	2006-07-15 23:53:08.000000000 +0200
+++ drivers/pci/pci.c	2006-07-21 00:51:07.000000000 +0200
@@ -477,7 +477,7 @@
 	 */
 	for (i = 15; i >= 0; i--) {
 		pci_read_config_dword(dev, i * 4, &val);
-		if (val != dev->saved_config_space[i]) {
+		if (val != dev->saved_config_space[i] && dev->saved_config_space[i] != 0xffffffff) {
 			printk(KERN_DEBUG "PM: Writing back config space on "
 				"device %s at offset %x (was %x, writing %x)\n",
 				pci_name(dev), i,
\
 
 \ /
  Last update: 2007-05-12 20:15    [from the cache]
©2003-2008