PNP: mark resources that conflict with PCI devices "disabled"
authorBjorn Helgaas <bjorn.helgaas@hp.com>
Mon, 2 Jun 2008 22:42:49 +0000 (16:42 -0600)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 2 Jun 2008 22:59:06 +0000 (15:59 -0700)
Both the PNP/PCI conflict detection quirk and the PNP system
driver must use the same mechanism to mark resources as disabled.

I think it's best to keep the resource and to keep the type bit
(IORESOURCE_MEM, etc), so that we match the list from firmware
as closely as possible.

Fixes this regression from 2.6.25: http://lkml.org/lkml/2008/6/1/82

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Tested-by: Avuton Olrich <avuton@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/pnp/quirks.c
drivers/pnp/system.c

index e2b7de4cb05e46849f60ce4326b289bfe2092e62..1ff3bb585ab2b0b5f0bb88f8477fe334c26c726a 100644 (file)
@@ -286,7 +286,7 @@ static void quirk_system_pci_resources(struct pnp_dev *dev)
                                        pci_name(pdev), i,
                                        (unsigned long long) pci_start,
                                        (unsigned long long) pci_end);
-                               res->flags = 0;
+                               res->flags |= IORESOURCE_DISABLED;
                        }
                }
        }
index 9c2496dbeee45d0042ff3d814402a212b5f22d9b..8f0a570509c58dee29de82f9d36b02ad291057db 100644 (file)
@@ -81,7 +81,7 @@ static void reserve_resources_of_dev(struct pnp_dev *dev)
        }
 
        for (i = 0; (res = pnp_get_resource(dev, IORESOURCE_MEM, i)); i++) {
-               if (res->flags & IORESOURCE_UNSET)
+               if (res->flags & IORESOURCE_DISABLED)
                        continue;
 
                reserve_range(dev, res->start, res->end, 0);