[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

rpms/kernel/FC-4 jwltest-pci-d3hot-d0.patch,1.1.4.1,1.1.4.2



Author: linville

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

Modified Files:
      Tag: private-linville-fc4-jwltest-13-branch
	jwltest-pci-d3hot-d0.patch 
Log Message:


jwltest-pci-d3hot-d0.patch:
 drivers/pci/pci.c       |   52 ++++++++++++++++++++++++++++++++++++++++++++----
 drivers/pci/setup-res.c |    2 -
 include/linux/pci.h     |    2 +
 3 files changed, 51 insertions(+), 5 deletions(-)

Index: jwltest-pci-d3hot-d0.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/Attic/jwltest-pci-d3hot-d0.patch,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -r1.1.4.1 -r1.1.4.2
--- jwltest-pci-d3hot-d0.patch	7 Jul 2005 19:58:41 -0000	1.1.4.1
+++ jwltest-pci-d3hot-d0.patch	7 Jul 2005 20:03:09 -0000	1.1.4.2
@@ -1,5 +1,5 @@
---- linux-2.6.12/include/linux/pci.h.orig	2005-07-06 17:27:24.825467814 -0400
-+++ linux-2.6.12/include/linux/pci.h	2005-07-06 17:29:57.780076672 -0400
+--- linux-2.6.12/include/linux/pci.h.orig	2005-07-07 16:01:11.852353507 -0400
++++ linux-2.6.12/include/linux/pci.h	2005-07-07 16:02:10.176581506 -0400
 @@ -225,6 +225,7 @@
  #define  PCI_PM_CAP_PME_D3cold  0x8000  /* PME# from D3 (cold) */
  #define PCI_PM_CTRL		4	/* PM control and status register */
@@ -8,9 +8,28 @@
  #define  PCI_PM_CTRL_PME_ENABLE	0x0100	/* PME pin enable */
  #define  PCI_PM_CTRL_DATA_SEL_MASK	0x1e00	/* Data select (??) */
  #define  PCI_PM_CTRL_DATA_SCALE_MASK	0x6000	/* Data scale (??) */
---- linux-2.6.12/drivers/pci/pci.c.orig	2005-07-06 17:29:46.503579982 -0400
-+++ linux-2.6.12/drivers/pci/pci.c	2005-07-06 17:29:57.778076939 -0400
-@@ -222,6 +222,59 @@ pci_find_parent_resource(const struct pc
+@@ -812,6 +813,7 @@ int __must_check pci_set_mwi(struct pci_
+ void pci_clear_mwi(struct pci_dev *dev);
+ int __must_check pci_set_dma_mask(struct pci_dev *dev, u64 mask);
+ int __must_check pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask);
++void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno);
+ int pci_assign_resource(struct pci_dev *dev, int i);
+ 
+ /* ROM control related routines */
+--- linux-2.6.12/drivers/pci/setup-res.c.orig	2005-06-17 15:48:29.000000000 -0400
++++ linux-2.6.12/drivers/pci/setup-res.c	2005-07-07 16:01:21.070125186 -0400
+@@ -26,7 +26,7 @@
+ #include "pci.h"
+ 
+ 
+-static void
++void
+ pci_update_resource(struct pci_dev *dev, struct resource *res, int resno)
+ {
+ 	struct pci_bus_region region;
+--- linux-2.6.12/drivers/pci/pci.c.orig	2005-07-07 16:01:11.854353241 -0400
++++ linux-2.6.12/drivers/pci/pci.c	2005-07-07 16:01:21.068125453 -0400
+@@ -222,6 +222,37 @@ pci_find_parent_resource(const struct pc
  }
  
  /**
@@ -40,37 +59,15 @@
 +		return;
 +	}
 +
-+	for (i = 0; i < numres; i ++) {
-+		struct pci_bus_region region;
-+		u32 val;
-+		int reg;
-+
-+		if (!dev->resource[i].flags)
-+			continue;
-+
-+		pcibios_resource_to_bus(dev, &region, &dev->resource[i]);
-+
-+		val = region.start
-+		    | (dev->resource[i].flags & PCI_REGION_FLAG_MASK);
-+
-+		reg = PCI_BASE_ADDRESS_0 + (i * 4);
-+
-+		pci_write_config_dword(dev, reg, val);
-+
-+		if ((val & (PCI_BASE_ADDRESS_SPACE
-+		          | PCI_BASE_ADDRESS_MEM_TYPE_MASK))
-+		 == (PCI_BASE_ADDRESS_SPACE_MEMORY
-+		   | PCI_BASE_ADDRESS_MEM_TYPE_64)) {
-+			pci_write_config_dword(dev, reg + 4, 0);
-+		}
-+	}
++	for (i = 0; i < numres; i ++)
++		pci_update_resource(dev, &dev->resource[i], i);
 +}
 +
 +/**
   * pci_set_power_state - Set the power state of a PCI device
   * @dev: PCI device to be suspended
   * @state: PCI power state (D0, D1, D2, D3hot, D3cold) we're entering
-@@ -239,7 +292,7 @@ pci_find_parent_resource(const struct pc
+@@ -239,7 +270,7 @@ pci_find_parent_resource(const struct pc
  int
  pci_set_power_state(struct pci_dev *dev, pci_power_t state)
  {
@@ -79,7 +76,7 @@
  	u16 pmcsr, pmc;
  
  	/* bound the state we're entering */
-@@ -278,14 +331,17 @@ pci_set_power_state(struct pci_dev *dev,
+@@ -278,14 +309,17 @@ pci_set_power_state(struct pci_dev *dev,
  			return -EIO;
  	}
  
@@ -100,7 +97,7 @@
  		pmcsr &= ~PCI_PM_CTRL_STATE_MASK;
  		pmcsr |= state;
  	}
-@@ -301,6 +357,16 @@ pci_set_power_state(struct pci_dev *dev,
+@@ -301,6 +335,16 @@ pci_set_power_state(struct pci_dev *dev,
  		udelay(200);
  	dev->current_state = state;
  


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]