On Wednesday, 3 of December 2008, Rafael J. Wysocki wrote:
Moreover, to check if the problem may be related to the prefetch window,
I added the appended patch on top of -rc7 (instead of the previous debug
patch), which resulted in the following layout in /proc/iomem:
88000000-8dffffff : PCI Bus 0000:03
88000000-8bffffff : PCI CardBus 0000:04
8c000000-8c003fff : 0000:03:0b.1
8c004000-8c004fff : 0000:03:0b.0
8c004000-8c004fff : yenta_socket
8c005000-8c0057ff : 0000:03:0b.1
8c005000-8c0057ff : firewire_ohci
8c005800-8c0058ff : 0000:03:0b.3
8c005800-8c0058ff : mmc0
8c400000-8c7fffff : PCI CardBus 0000:04
and the first hibernation-resume cycle failed.
Thanks,
Rafael
---
drivers/pci/setup-bus.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
Index: linux-2.6/drivers/pci/setup-bus.c
===================================================================
--- linux-2.6.orig/drivers/pci/setup-bus.c
+++ linux-2.6/drivers/pci/setup-bus.c
@@ -353,6 +353,25 @@ static int pbus_size_mem(struct pci_bus
r_size = resource_size(r);
/* For bridges size != alignment */
align = resource_alignment(r);
+ if (r->flags & IORESOURCE_PREFETCH) {
+ resource_size_t expected_align;
+
+ expected_align = (i < PCI_BRIDGE_RESOURCES) ?
+ r_size : r->start;
+ if (align != expected_align) {
+ dev_warn(&dev->dev,
+ "BAR %d [%llx-%llx] "
+ "alignment issue: flags=%lx "
+ "align=%llx (%llx)\n", i,
+ (unsigned long long)r->start,
+ (unsigned long long)r->end,
+ r->flags,
+ (unsigned long long)align,
+ (unsigned long long)expected_align);
+ /* Hacky and wrong, but trying to keep things */
+ align = expected_align;
+ }
+ }
order = __ffs(align) - 20;
if (order > 11) {
dev_warn(&dev->dev, "BAR %d bad alignment %llx: "
--