rpms/kernel/FC-4 jwltest-pci-enable-d3hot.patch, NONE, 1.1.2.1 kernel-2.6.spec, 1.1385.2.1, 1.1385.2.2

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Mon Jun 27 21:24:26 UTC 2005


Author: linville

Update of /cvs/dist/rpms/kernel/FC-4
In directory cvs.devel.redhat.com:/tmp/cvs-serv2725

Modified Files:
      Tag: private-linville-fc4-jwltest-8-branch
	kernel-2.6.spec 
Added Files:
      Tag: private-linville-fc4-jwltest-8-branch
	jwltest-pci-enable-d3hot.patch 
Log Message:


jwltest-pci-enable-d3hot.patch:
 pci.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletion(-)

--- NEW FILE jwltest-pci-enable-d3hot.patch ---
--- linux-2.6.12/drivers/pci/pci.c.orig	2005-06-27 17:16:18.734066009 -0400
+++ linux-2.6.12/drivers/pci/pci.c	2005-06-27 17:16:44.804591497 -0400
@@ -397,10 +397,21 @@ pci_enable_device_bars(struct pci_dev *d
 int
 pci_enable_device(struct pci_dev *dev)
 {
-	int err;
+	int i, err;
 
 	if ((err = pci_enable_device_bars(dev, (1 << PCI_NUM_RESOURCES) - 1)))
 		return err;
+
+	/* Some devices loose PCI config header data during D3hot->D0
+	   transition.	Since some firmware leaves devices in D3hot
+	   state at boot, this information needs to be restored.  We
+	   could force drivers to do this, but better to leave them
+	   ignorant of PCI PM trivia...
+	*/
+	for (i = 0; i < 6; i ++)
+		pci_write_config_dword(dev, PCI_BASE_ADDRESS_0 + (i * 4),
+		                       dev->resource[i].start);
+
 	pci_fixup_device(pci_fixup_enable, dev);
 	dev->is_enabled = 1;
 	return 0;


Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/kernel-2.6.spec,v
retrieving revision 1.1385.2.1
retrieving revision 1.1385.2.2
diff -u -r1.1385.2.1 -r1.1385.2.2
--- kernel-2.6.spec	27 Jun 2005 21:11:51 -0000	1.1385.2.1
+++ kernel-2.6.spec	27 Jun 2005 21:24:24 -0000	1.1385.2.2
@@ -348,6 +348,7 @@
 Patch1910: linux-2.6.12-ns558-nodev-rmmod.patch
 Patch1920: jwltest-tpm-fixes.patch
 Patch1930: jwltest-acpi-dsdt-initrd.patch
+Patch1940: jwltest-pci-enable-d3hot.patch
 
 Patch2000: linux-2.6.11-vm-taint.patch
 Patch2001: linux-2.6.9-vm-oomkiller-debugging.patch
@@ -805,6 +806,8 @@
 %patch1920 -p1
 # Add DSDT override from initrd
 %patch1930 -p1
+# avoid PCI config loss during enable from D3hot
+%patch1940 -p1
 
 #
 # VM related fixes.
@@ -832,7 +835,7 @@
 %patch3020 -p1
 %patch3021 -p1
 %patch3022 -p1
-%patch3023 -p1 -E
+#%patch3023 -p1 -E
 
 #
 # Patches 5000 to 6000 are reserved for new drivers that are about to




More information about the fedora-cvs-commits mailing list