diff options
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r-- | drivers/pci/probe.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index f1ae2475ffff..b962326e3d95 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
@@ -193,7 +193,7 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type, | |||
193 | res->flags |= pci_calc_resource_flags(l) | IORESOURCE_SIZEALIGN; | 193 | res->flags |= pci_calc_resource_flags(l) | IORESOURCE_SIZEALIGN; |
194 | if (type == pci_bar_io) { | 194 | if (type == pci_bar_io) { |
195 | l &= PCI_BASE_ADDRESS_IO_MASK; | 195 | l &= PCI_BASE_ADDRESS_IO_MASK; |
196 | mask = PCI_BASE_ADDRESS_IO_MASK & 0xffff; | 196 | mask = PCI_BASE_ADDRESS_IO_MASK & IO_SPACE_LIMIT; |
197 | } else { | 197 | } else { |
198 | l &= PCI_BASE_ADDRESS_MEM_MASK; | 198 | l &= PCI_BASE_ADDRESS_MEM_MASK; |
199 | mask = (u32)PCI_BASE_ADDRESS_MEM_MASK; | 199 | mask = (u32)PCI_BASE_ADDRESS_MEM_MASK; |
@@ -237,6 +237,8 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type, | |||
237 | dev_printk(KERN_DEBUG, &dev->dev, | 237 | dev_printk(KERN_DEBUG, &dev->dev, |
238 | "reg %x 64bit mmio: %pR\n", pos, res); | 238 | "reg %x 64bit mmio: %pR\n", pos, res); |
239 | } | 239 | } |
240 | |||
241 | res->flags |= IORESOURCE_MEM_64; | ||
240 | } else { | 242 | } else { |
241 | sz = pci_size(l, sz, mask); | 243 | sz = pci_size(l, sz, mask); |
242 | 244 | ||
@@ -362,7 +364,10 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child) | |||
362 | } | 364 | } |
363 | } | 365 | } |
364 | if (base <= limit) { | 366 | if (base <= limit) { |
365 | res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM | IORESOURCE_PREFETCH; | 367 | res->flags = (mem_base_lo & PCI_PREF_RANGE_TYPE_MASK) | |
368 | IORESOURCE_MEM | IORESOURCE_PREFETCH; | ||
369 | if (res->flags & PCI_PREF_RANGE_TYPE_64) | ||
370 | res->flags |= IORESOURCE_MEM_64; | ||
366 | res->start = base; | 371 | res->start = base; |
367 | res->end = limit + 0xfffff; | 372 | res->end = limit + 0xfffff; |
368 | dev_printk(KERN_DEBUG, &dev->dev, "bridge %sbit mmio pref: %pR\n", | 373 | dev_printk(KERN_DEBUG, &dev->dev, "bridge %sbit mmio pref: %pR\n", |