diff options
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r-- | drivers/pci/probe.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 4842b09b7f3c..4c4aca53ae09 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
@@ -225,12 +225,13 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type, | |||
225 | if (!sz64) | 225 | if (!sz64) |
226 | goto fail; | 226 | goto fail; |
227 | 227 | ||
228 | res->flags |= IORESOURCE_MEM_64; | ||
229 | |||
230 | if ((sizeof(resource_size_t) < 8) && (sz64 > 0x100000000ULL)) { | 228 | if ((sizeof(resource_size_t) < 8) && (sz64 > 0x100000000ULL)) { |
231 | dev_err(&dev->dev, "can't handle 64-bit BAR\n"); | 229 | dev_err(&dev->dev, "can't handle 64-bit BAR\n"); |
232 | goto fail; | 230 | goto fail; |
233 | } else if ((sizeof(resource_size_t) < 8) && l) { | 231 | } |
232 | |||
233 | res->flags |= IORESOURCE_MEM_64; | ||
234 | if ((sizeof(resource_size_t) < 8) && l) { | ||
234 | /* Address above 32-bit boundary; disable the BAR */ | 235 | /* Address above 32-bit boundary; disable the BAR */ |
235 | pci_write_config_dword(dev, pos, 0); | 236 | pci_write_config_dword(dev, pos, 0); |
236 | pci_write_config_dword(dev, pos + 4, 0); | 237 | pci_write_config_dword(dev, pos + 4, 0); |
@@ -239,7 +240,7 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type, | |||
239 | } else { | 240 | } else { |
240 | res->start = l64; | 241 | res->start = l64; |
241 | res->end = l64 + sz64; | 242 | res->end = l64 + sz64; |
242 | dev_printk(KERN_DEBUG, &dev->dev, "reg %x: %pRt\n", | 243 | dev_printk(KERN_DEBUG, &dev->dev, "reg %x: %pR\n", |
243 | pos, res); | 244 | pos, res); |
244 | } | 245 | } |
245 | } else { | 246 | } else { |
@@ -251,7 +252,7 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type, | |||
251 | res->start = l; | 252 | res->start = l; |
252 | res->end = l + sz; | 253 | res->end = l + sz; |
253 | 254 | ||
254 | dev_printk(KERN_DEBUG, &dev->dev, "reg %x: %pRt\n", pos, res); | 255 | dev_printk(KERN_DEBUG, &dev->dev, "reg %x: %pR\n", pos, res); |
255 | } | 256 | } |
256 | 257 | ||
257 | out: | 258 | out: |
@@ -319,7 +320,7 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child) | |||
319 | res->start = base; | 320 | res->start = base; |
320 | if (!res->end) | 321 | if (!res->end) |
321 | res->end = limit + 0xfff; | 322 | res->end = limit + 0xfff; |
322 | dev_printk(KERN_DEBUG, &dev->dev, "bridge window: %pRt\n", res); | 323 | dev_printk(KERN_DEBUG, &dev->dev, " bridge window %pR\n", res); |
323 | } | 324 | } |
324 | 325 | ||
325 | res = child->resource[1]; | 326 | res = child->resource[1]; |
@@ -331,7 +332,7 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child) | |||
331 | res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM; | 332 | res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM; |
332 | res->start = base; | 333 | res->start = base; |
333 | res->end = limit + 0xfffff; | 334 | res->end = limit + 0xfffff; |
334 | dev_printk(KERN_DEBUG, &dev->dev, "bridge window: %pRt\n", res); | 335 | dev_printk(KERN_DEBUG, &dev->dev, " bridge window %pR\n", res); |
335 | } | 336 | } |
336 | 337 | ||
337 | res = child->resource[2]; | 338 | res = child->resource[2]; |
@@ -370,7 +371,7 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child) | |||
370 | res->flags |= IORESOURCE_MEM_64; | 371 | res->flags |= IORESOURCE_MEM_64; |
371 | res->start = base; | 372 | res->start = base; |
372 | res->end = limit + 0xfffff; | 373 | res->end = limit + 0xfffff; |
373 | dev_printk(KERN_DEBUG, &dev->dev, "bridge window: %pRt\n", res); | 374 | dev_printk(KERN_DEBUG, &dev->dev, " bridge window %pR\n", res); |
374 | } | 375 | } |
375 | } | 376 | } |
376 | 377 | ||