Re: Regression from 2.6.26: Hibernation (possibly suspend) broken on Toshiba R500 (bisected)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Rafael J. Wysocki
Date: Wednesday, December 3, 2008 - 12:52 am

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: "
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Regression from 2.6.26: Hibernation (possibly suspend) ..., Rafael J. Wysocki, (Wed Dec 3, 12:40 am)
Re: Regression from 2.6.26: Hibernation (possibly suspend) ..., Rafael J. Wysocki, (Wed Dec 3, 12:52 am)
MSI changes in .28, Frans Pop, (Fri Dec 5, 1:53 am)
Re: MSI changes in .28, Yinghai Lu, (Fri Dec 5, 2:09 am)
Re: MSI changes in .28, Ingo Molnar, (Fri Dec 5, 5:20 am)
Re: MSI changes in .28, Eric Dumazet, (Fri Dec 5, 6:04 am)
Re: MSI changes in .28, H. Peter Anvin, (Fri Dec 5, 10:49 am)
Re: [PATCH 1/3] PCI: Rework default handling of suspend an ..., Rafael J. Wysocki, (Sat Dec 6, 10:22 am)
Re: [PATCH 2/3] PCI: Suspend and resume PCI Express ports ..., Rafael J. Wysocki, (Sat Dec 6, 10:25 am)
Re: [PATCH 1/3] PCI: Rework default handling of suspend an ..., Rafael J. Wysocki, (Sat Dec 6, 10:43 am)
Re: [PATCH 2/3] PCI: Suspend and resume PCI Express ports ..., Rafael J. Wysocki, (Sat Dec 6, 10:46 am)
Re: [PATCH 2/3] PCI: Suspend and resume PCI Express ports ..., Rafael J. Wysocki, (Sun Dec 7, 5:53 am)
Re: [PATCH 3/3] Sound (HDA Intel): Restore PCI configurati ..., Rafael J. Wysocki, (Thu Dec 11, 1:03 pm)
Re: [PATCH 3/3] Sound (HDA Intel): Restore PCI configurati ..., Rafael J. Wysocki, (Thu Dec 11, 1:38 pm)
Re: Regression from 2.6.26: Hibernation (possibly suspend) ..., Rafael J. Wysocki, (Thu Jan 29, 7:48 am)
Re: Regression from 2.6.26: Hibernation (possibly suspend) ..., Alexey Starikovskiy, (Thu Jan 29, 9:44 am)