G5 pci probing regression

Paul Mackerras paulus at samba.org
Tue Sep 20 10:23:45 EST 2005


OK, this (untested) patch should fix things.  I wasn't setting PCI
flags in the resources, only the IORESOURCE_* flags.  Please try this
and let me know how it goes (without your other 1-line hack, of
course).

Thanks,
Paul.

diff -urN linux-2.6/arch/ppc64/kernel/pci.c hch/arch/ppc64/kernel/pci.c
--- linux-2.6/arch/ppc64/kernel/pci.c	2005-09-13 07:43:47.000000000 +1000
+++ hch/arch/ppc64/kernel/pci.c	2005-09-20 10:20:54.000000000 +1000
@@ -246,11 +246,14 @@
 	unsigned int flags = 0;
 
 	if (addr0 & 0x02000000) {
-		flags |= IORESOURCE_MEM;
+		flags = IORESOURCE_MEM | PCI_BASE_ADDRESS_SPACE_MEMORY;
+		flags |= (addr0 >> 22) & PCI_BASE_ADDRESS_MEM_TYPE_64;
+		flags |= (addr0 >> 28) & PCI_BASE_ADDRESS_MEM_TYPE_1M;
 		if (addr0 & 0x40000000)
-			flags |= IORESOURCE_PREFETCH;
+			flags |= IORESOURCE_PREFETCH
+				 | PCI_BASE_ADDRESS_MEM_PREFETCH;
 	} else if (addr0 & 0x01000000)
-		flags |= IORESOURCE_IO;
+		flags = IORESOURCE_IO | PCI_BASE_ADDRESS_SPACE_IO;
 	return flags;
 }
 



More information about the Linuxppc64-dev mailing list