rpms/kernel/FC-4 jwltest-pci-d3hot-d0.patch, 1.1.10.1, 1.1.10.2 kernel-2.6.spec, 1.1449.2.2, 1.1449.2.3
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Thu Sep 1 19:12:35 UTC 2005
Author: linville
Update of /cvs/dist/rpms/kernel/FC-4
In directory cvs.devel.redhat.com:/tmp/cvs-serv30931
Modified Files:
Tag: private-linville-fc4-jwltest-16-branch
jwltest-pci-d3hot-d0.patch kernel-2.6.spec
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-4/Attic/jwltest-pci-d3hot-d0.patch,v
retrieving revision 1.1.10.1
retrieving revision 1.1.10.2
diff -u -r1.1.10.1 -r1.1.10.2
--- jwltest-pci-d3hot-d0.patch 1 Sep 2005 18:32:01 -0000 1.1.10.1
+++ jwltest-pci-d3hot-d0.patch 1 Sep 2005 19:12:31 -0000 1.1.10.2
@@ -1,5 +1,5 @@
---- 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
+--- 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,16 +8,16 @@
#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 (??) */
-@@ -812,6 +813,7 @@ int __must_check pci_set_mwi(struct pci_
- 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 __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.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
+ 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"
@@ -27,8 +27,8 @@
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
+--- 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
-@@ -239,7 +270,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)
{
@@ -97,16 +97,22 @@
pmcsr &= ~PCI_PM_CTRL_STATE_MASK;
pmcsr |= state;
}
-@@ -301,6 +335,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;
Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/kernel-2.6.spec,v
retrieving revision 1.1449.2.2
retrieving revision 1.1449.2.3
diff -u -r1.1449.2.2 -r1.1449.2.3
--- kernel-2.6.spec 1 Sep 2005 18:54:15 -0000 1.1449.2.2
+++ kernel-2.6.spec 1 Sep 2005 19:12:31 -0000 1.1449.2.3
@@ -834,7 +834,7 @@
# Fix addrlen checks in selinux_socket_connect
%patch1950 -p1
# ALPS typo fix.
-%patch1960 -p1
+#%patch1960 -p1
# Add DSDT override from initrd
%patch1970 -p1
# Enable libata ATAPI support
@@ -860,7 +860,7 @@
# Blacklist another 'No C2/C3 states' Thinkpad R40e BIOS.
%patch2110 -p1
# avoid PCI config loss during enable from D3hot
-#%patch2120 -p1
+%patch2120 -p1
# Fix 'semaphore is not ready' error in snd-intel8x0m
%patch2200 -p1
More information about the fedora-cvs-commits
mailing list