diff --git a/drivers/pnp/quirks.c b/drivers/pnp/quirks.c index 0bdf9b8..3e96f45 100644 --- a/drivers/pnp/quirks.c +++ b/drivers/pnp/quirks.c @@ -270,31 +270,23 @@ static void quirk_system_pci_resources(struct pnp_dev *dev) continue; /* - * If the PNP region completely encloses (or is - * at least as large as) the PCI region, that's - * also OK. For example, this happens when the - * PNP device describes a bridge with PCI - * behind it. + * If the resources overlap, make sure the PCI + * core assigns a new range for the conflicting + * BARs. */ - if (pnp_start <= pci_start && - pnp_end >= pci_end) - continue; + pdev->resource[i].end = + pci_resource_len(pdev, i) - 1; + pdev->resource[i].start = 0; - /* - * Otherwise, the PNP region overlaps *part* of - * the PCI region, and that might prevent a PCI - * driver from requesting its resources. - */ dev_warn(&dev->dev, "%s resource " "(0x%llx-0x%llx) overlaps %s BAR %d " - "(0x%llx-0x%llx), disabling\n", + "(0x%llx-0x%llx), reassigning BAR\n", pnp_resource_type_name(res), (unsigned long long) pnp_start, (unsigned long long) pnp_end, pci_name(pdev), i, (unsigned long long) pci_start, (unsigned long long) pci_end); - res->flags |= IORESOURCE_DISABLED; } } }