Răsfoiți Sursa

PNP: don't check for conflicts with bridge windows

With fa35b4926, 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>
Bjorn Helgaas 15 ani în urmă
părinte
comite
11439a6fd9
1 a modificat fișierele cu 4 adăugiri și 0 ștergeri
  1. 4 0
      drivers/pnp/resource.c

+ 4 - 0
drivers/pnp/resource.c

@@ -211,6 +211,8 @@ int pnp_check_port(struct pnp_dev *dev, struct resource *res)
 			if (tres->flags & IORESOURCE_IO) {
 			if (tres->flags & IORESOURCE_IO) {
 				if (cannot_compare(tres->flags))
 				if (cannot_compare(tres->flags))
 					continue;
 					continue;
+				if (tres->flags & IORESOURCE_WINDOW)
+					continue;
 				tport = &tres->start;
 				tport = &tres->start;
 				tend = &tres->end;
 				tend = &tres->end;
 				if (ranged_conflict(port, end, tport, tend))
 				if (ranged_conflict(port, end, tport, tend))
@@ -271,6 +273,8 @@ int pnp_check_mem(struct pnp_dev *dev, struct resource *res)
 			if (tres->flags & IORESOURCE_MEM) {
 			if (tres->flags & IORESOURCE_MEM) {
 				if (cannot_compare(tres->flags))
 				if (cannot_compare(tres->flags))
 					continue;
 					continue;
+				if (tres->flags & IORESOURCE_WINDOW)
+					continue;
 				taddr = &tres->start;
 				taddr = &tres->start;
 				tend = &tres->end;
 				tend = &tres->end;
 				if (ranged_conflict(addr, end, taddr, tend))
 				if (ranged_conflict(addr, end, taddr, tend))