diff options
Diffstat (limited to 'drivers/pci/setup-res.c')
-rw-r--r-- | drivers/pci/setup-res.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c index ab78e4bbdd83..cb4ced3560e9 100644 --- a/drivers/pci/setup-res.c +++ b/drivers/pci/setup-res.c | |||
@@ -33,11 +33,22 @@ pci_update_resource(struct pci_dev *dev, struct resource *res, int resno) | |||
33 | u32 new, check, mask; | 33 | u32 new, check, mask; |
34 | int reg; | 34 | int reg; |
35 | 35 | ||
36 | /* Ignore resources for unimplemented BARs and unused resource slots | 36 | /* |
37 | for 64 bit BARs. */ | 37 | * Ignore resources for unimplemented BARs and unused resource slots |
38 | * for 64 bit BARs. | ||
39 | */ | ||
38 | if (!res->flags) | 40 | if (!res->flags) |
39 | return; | 41 | return; |
40 | 42 | ||
43 | /* | ||
44 | * Ignore non-moveable resources. This might be legacy resources for | ||
45 | * which no functional BAR register exists or another important | ||
46 | * system resource we should better not move around in system address | ||
47 | * space. | ||
48 | */ | ||
49 | if (res->flags & IORESOURCE_PCI_FIXED) | ||
50 | return; | ||
51 | |||
41 | pcibios_resource_to_bus(dev, ®ion, res); | 52 | pcibios_resource_to_bus(dev, ®ion, res); |
42 | 53 | ||
43 | pr_debug(" got res [%llx:%llx] bus [%lx:%lx] flags %lx for " | 54 | pr_debug(" got res [%llx:%llx] bus [%lx:%lx] flags %lx for " |
@@ -212,6 +223,10 @@ pdev_sort_resources(struct pci_dev *dev, struct resource_list *head) | |||
212 | resource_size_t r_align; | 223 | resource_size_t r_align; |
213 | 224 | ||
214 | r = &dev->resource[i]; | 225 | r = &dev->resource[i]; |
226 | |||
227 | if (r->flags & IORESOURCE_PCI_FIXED) | ||
228 | continue; | ||
229 | |||
215 | r_align = r->end - r->start; | 230 | r_align = r->end - r->start; |
216 | 231 | ||
217 | if (!(r->flags) || r->parent) | 232 | if (!(r->flags) || r->parent) |