View | Details | Raw Unified | Return to bug 9905 | Differences between
and this patch

Collapse All | Expand All

(-)a/drivers/pnp/quirks.c (-15 / +7 lines)
Lines 270-300 static void quirk_system_pci_resources(struct pnp_dev *dev) Link Here
270
					continue;
270
					continue;
271
271
272
				/*
272
				/*
273
				 * If the PNP region completely encloses (or is
273
				 * If the resources overlap, make sure the PCI
274
				 * at least as large as) the PCI region, that's
274
				 * core assigns a new range for the conflicting
275
				 * also OK.  For example, this happens when the
275
				 * BARs.
276
				 * PNP device describes a bridge with PCI
277
				 * behind it.
278
				 */
276
				 */
279
				if (pnp_start <= pci_start &&
277
				pdev->resource[i].end =
280
				    pnp_end >= pci_end)
278
					pci_resource_len(pdev, i) - 1;
281
					continue;
279
				pdev->resource[i].start = 0;
282
280
283
				/*
284
				 * Otherwise, the PNP region overlaps *part* of
285
				 * the PCI region, and that might prevent a PCI
286
				 * driver from requesting its resources.
287
				 */
288
				dev_warn(&dev->dev, "%s resource "
281
				dev_warn(&dev->dev, "%s resource "
289
					"(0x%llx-0x%llx) overlaps %s BAR %d "
282
					"(0x%llx-0x%llx) overlaps %s BAR %d "
290
					"(0x%llx-0x%llx), disabling\n",
283
					"(0x%llx-0x%llx), reassigning BAR\n",
291
					pnp_resource_type_name(res),
284
					pnp_resource_type_name(res),
292
					(unsigned long long) pnp_start,
285
					(unsigned long long) pnp_start,
293
					(unsigned long long) pnp_end,
286
					(unsigned long long) pnp_end,
294
					pci_name(pdev), i,
287
					pci_name(pdev), i,
295
					(unsigned long long) pci_start,
288
					(unsigned long long) pci_start,
296
					(unsigned long long) pci_end);
289
					(unsigned long long) pci_end);
297
				res->flags |= IORESOURCE_DISABLED;
298
			}
290
			}
299
		}
291
		}
300
	}
292
	}

Return to bug 9905