powerpc: fix OF pci flags parsing
PATCH 1/1 powerpc: fix OF pci flags parsing
For PCI devices with only io ports, of_bus_pci_get_flags() will fall through and still mark the resource as IORESOURCE_MEM.
Signed-off-by Olof Johansson <[email protected]>
---
This should be fine to hold until 2.6.20, since noone (as far as I know) has hit it in the wild.
arch/powerpc/kernel/prom_parse.c +2 -0
@@ -160,9 +160,11 @@ static unsigned int of_bus_pci_get_flagsswitch ((w >>24 ) &0x03 ) {case 0x01 : flags |=IORESOURCE_IO ; +break ;case 0x02 :/* 32 bits */ case 0x03 :/* 64 bits */ flags |=IORESOURCE_MEM ; +break ; }if (w &0x40000000 ) flags |=IORESOURCE_PREFETCH ;
Quoted 5 lines · Olof Johansson
For PCI devices with only io ports,
of_bus_pci_get_flags()will fall through and still mark the resource asIORESOURCE_MEM.Signed-off-by Olof Johansson <[email protected]>
Oops :-)
Quoted 22 lines
---
This should be fine to hold until 2.6.20, since noone (as far as I know) has hit it in the wild.
arch/powerpc/kernel/prom_parse.c +2
-0@@ -160,9 +160,11 @@ static unsigned int of_bus_pci_get_flagsswitch ((w >>24 ) &0x03 ) {case 0x01 : flags |=IORESOURCE_IO ; +break ;case 0x02 :/* 32 bits */ case 0x03 :/* 64 bits */ flags |=IORESOURCE_MEM ; +break ; }if (w &0x40000000 ) flags |=IORESOURCE_PREFETCH ;