[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
rpms/kernel/FC-3 jwltest-pci-d3hot-d0.patch,1.1.6.1,1.1.6.2
- From: fedora-cvs-commits redhat com
- To: fedora-cvs-commits redhat com
- Subject: rpms/kernel/FC-3 jwltest-pci-d3hot-d0.patch,1.1.6.1,1.1.6.2
- Date: Wed, 31 Aug 2005 17:09:08 -0400
Author: linville
Update of /cvs/dist/rpms/kernel/FC-3
In directory cvs.devel.redhat.com:/tmp/cvs-serv2726
Modified Files:
Tag: private-linville-fc3-jwltest-22-branch
jwltest-pci-d3hot-d0.patch
Log Message:
jwltest-pci-d3hot-d0.patch:
arch/sparc64/kernel/pci.c | 6 ++++
drivers/pci/pci.c | 59 ++++++++++++++++++++++++++++++++++++++++++----
drivers/pci/setup-res.c | 2 -
include/linux/pci.h | 2 +
4 files changed, 64 insertions(+), 5 deletions(-)
Index: jwltest-pci-d3hot-d0.patch
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-3/Attic/jwltest-pci-d3hot-d0.patch,v
retrieving revision 1.1.6.1
retrieving revision 1.1.6.2
diff -u -r1.1.6.1 -r1.1.6.2
--- jwltest-pci-d3hot-d0.patch 31 Aug 2005 20:40:48 -0000 1.1.6.1
+++ jwltest-pci-d3hot-d0.patch 31 Aug 2005 21:09:05 -0000 1.1.6.2
@@ -1,5 +1,5 @@
---- linux-2.6.11/include/linux/pci.h.orig 2005-07-07 15:59:04.994249756 -0400
-+++ linux-2.6.11/include/linux/pci.h 2005-07-07 15:59:54.192699929 -0400
+--- linux-2.6.12/include/linux/pci.h.orig 2005-08-31 17:03:11.838377068 -0400
++++ linux-2.6.12/include/linux/pci.h 2005-08-31 17:07:07.511997600 -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,18 +8,18 @@
#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 (??) */
-@@ -811,6 +812,7 @@ void pci_clear_mwi(struct pci_dev *dev);
+@@ -813,6 +814,7 @@ void pci_clear_mwi(struct pci_dev *dev);
int __must_check pci_set_dma_mask(struct pci_dev *dev, u64 mask);
- int pci_dac_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);
++void pci_restore_bars(struct pci_dev *dev);
/* ROM control related routines */
---- linux-2.6.11/drivers/pci/setup-res.c.orig 2005-03-02 02:38:25.000000000 -0500
-+++ linux-2.6.11/drivers/pci/setup-res.c 2005-07-07 15:59:13.956056664 -0400
-@@ -33,7 +33,7 @@
- #endif
+ void __iomem __must_check *pci_map_rom(struct pci_dev *pdev, size_t *size);
+--- linux-2.6.12/drivers/pci/setup-res.c.orig 2005-08-31 17:03:11.840376802 -0400
++++ linux-2.6.12/drivers/pci/setup-res.c 2005-08-31 17:06:33.335548175 -0400
+@@ -26,7 +26,7 @@
+ #include "pci.h"
-static void
@@ -27,9 +27,9 @@
pci_update_resource(struct pci_dev *dev, struct resource *res, int resno)
{
struct pci_bus_region region;
---- linux-2.6.11/drivers/pci/pci.c.orig 2005-07-07 15:59:04.996249490 -0400
-+++ linux-2.6.11/drivers/pci/pci.c 2005-07-07 15:59:13.955056797 -0400
-@@ -227,6 +227,37 @@ pci_find_parent_resource(const struct pc
+--- linux-2.6.12/drivers/pci/pci.c.orig 2005-08-31 17:03:11.842376535 -0400
++++ linux-2.6.12/drivers/pci/pci.c 2005-08-31 17:06:33.334548309 -0400
+@@ -222,6 +222,37 @@ pci_find_parent_resource(const struct pc
}
/**
@@ -39,7 +39,7 @@
+ * Restore the BAR values for a given device, so as to make it
+ * accessible by its driver.
+ */
-+static void
++void
+pci_restore_bars(struct pci_dev *dev)
+{
+ int i, numres;
@@ -67,7 +67,7 @@
* 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
-@@ -244,7 +275,7 @@ pci_find_parent_resource(const struct pc
+@@ -239,7 +270,7 @@ int (*platform_pci_set_power_state)(stru
int
pci_set_power_state(struct pci_dev *dev, pci_power_t state)
{
@@ -76,7 +76,7 @@
u16 pmcsr, pmc;
/* bound the state we're entering */
-@@ -283,14 +314,17 @@ pci_set_power_state(struct pci_dev *dev,
+@@ -278,14 +309,17 @@ pci_set_power_state(struct pci_dev *dev,
return -EIO;
}
@@ -97,16 +97,22 @@
pmcsr &= ~PCI_PM_CTRL_STATE_MASK;
pmcsr |= state;
}
-@@ -306,6 +340,16 @@ pci_set_power_state(struct pci_dev *dev,
- udelay(200);
- dev->current_state = state;
+@@ -308,6 +342,22 @@ pci_set_power_state(struct pci_dev *dev,
+ platform_pci_set_power_state(dev, state);
+ dev->current_state = state;
++
+ /* According to section 5.4.1 of the "PCI BUS POWER MANAGEMENT
+ * INTERFACE SPECIFICATION, REV. 1.2", a device transitioning
+ * from D3hot to D0 _may_ perform an internal reset, thereby
+ * going to "D0 Uninitialized" rather than "D0 Initialized".
-+ * In that case, we need to restore at least the BARs so that
-+ * the device will be accessible to its driver.
++ * For example, at least some versions of the 3c905B and the
++ * 3c556B exhibit this behaviour.
++ *
++ * At least some laptop BIOSen (e.g. the Thinkpad T21) leave
++ * devices in a D3hot state at boot. Consequently, we need to
++ * restore at least the BARs so that the device will be
++ * accessible to its driver.
+ */
+ if (need_restore)
+ pci_restore_bars(dev);
@@ -114,3 +120,26 @@
return 0;
}
+@@ -811,6 +861,7 @@ struct pci_dev *isa_bridge;
+ EXPORT_SYMBOL(isa_bridge);
+ #endif
+
++EXPORT_SYMBOL_GPL(pci_restore_bars);
+ EXPORT_SYMBOL(pci_enable_device_bars);
+ EXPORT_SYMBOL(pci_enable_device);
+ EXPORT_SYMBOL(pci_disable_device);
+--- linux-2.6.12/arch/sparc64/kernel/pci.c.orig 2005-06-17 15:48:29.000000000 -0400
++++ linux-2.6.12/arch/sparc64/kernel/pci.c 2005-08-31 17:06:33.332548575 -0400
+@@ -413,6 +413,12 @@ static int pci_assign_bus_resource(const
+ return -EBUSY;
+ }
+
++void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno)
++{
++ /* Not implemented for sparc64... */
++ BUG();
++}
++
+ int pci_assign_resource(struct pci_dev *pdev, int resource)
+ {
+ struct pcidev_cookie *pcp = pdev->sysdata;
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]