Skip to content

Commit 11439a6

Browse files
Bjorn Helgaaslenb
authored andcommitted
PNP: don't check for conflicts with bridge windows
With fa35b49, I broke a lot of PNP resource assignment. That commit made PNPACPI include bridge windows as PNP resources, and PNP resource assignment treats any enabled overlapping PNP resources as conflicts. Since PCI host bridge windows typically include most of the I/O port space, this makes PNP port assigments fail. The PCI host bridge driver will eventually use those PNP window resources, so we should make PNP ignore them when checking for conflicts. This fixes https://bugzilla.kernel.org/show_bug.cgi?id=15903 Reported-and-tested-by: Pavel Kysilka <goldenfish@linuxsoft.cz> Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
1 parent 722154e commit 11439a6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/pnp/resource.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,8 @@ int pnp_check_port(struct pnp_dev *dev, struct resource *res)
211211
if (tres->flags & IORESOURCE_IO) {
212212
if (cannot_compare(tres->flags))
213213
continue;
214+
if (tres->flags & IORESOURCE_WINDOW)
215+
continue;
214216
tport = &tres->start;
215217
tend = &tres->end;
216218
if (ranged_conflict(port, end, tport, tend))
@@ -271,6 +273,8 @@ int pnp_check_mem(struct pnp_dev *dev, struct resource *res)
271273
if (tres->flags & IORESOURCE_MEM) {
272274
if (cannot_compare(tres->flags))
273275
continue;
276+
if (tres->flags & IORESOURCE_WINDOW)
277+
continue;
274278
taddr = &tres->start;
275279
tend = &tres->end;
276280
if (ranged_conflict(addr, end, taddr, tend))

0 commit comments

Comments
 (0)