[patch 2/2] PNP: don't check disabled PCI BARs for conflicts in quirk_system_pci_resources()

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jesse Barnes <jbarnes@...>
Cc: Len Brown <lenb@...>, Linus Torvalds <torvalds@...>, Frans Pop <elendil@...>, Rene Herman <rene.herman@...>, Rafael J. Wysocki <rjw@...>, <linux-kernel@...>, <linux-pci@...>, <linux-acpi@...>, Adam Belay <abelay@...>, Avuton Olrich <avuton@...>, Karl Bellve <karl.bellve@...>, Willem Riede <wriede@...>, Matthew Hall <mhall@...>
Date: Monday, September 29, 2008 - 11:57 am

quirk_system_pci_resources() checks PNP motherboard resource for
conflicts with PCI device BARs.  When doing this, we should ignore
disabled PCI BARs, because they often contain zero and look like
they would conflict with legacy devices at low addresses.
    
This patch addresses this regression from 2.6.26:
    http://bugzilla.kernel.org/show_bug.cgi?id=11550
    
Thanks to Frans Pop for reporting this issue and testing the fixes.
    
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Tested-by: Frans Pop <elendil@planet.nl>

diff --git a/drivers/pnp/quirks.c b/drivers/pnp/quirks.c
index 0bdf9b8..ef5ed99 100644
--- a/drivers/pnp/quirks.c
+++ b/drivers/pnp/quirks.c
@@ -247,6 +247,9 @@ static void quirk_system_pci_resources(struct pnp_dev *dev)
 		for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
 			unsigned int type;
 
+			if (!pci_resource_enabled(pdev, i))
+				continue;
+
 			type = pci_resource_flags(pdev, i) &
 					(IORESOURCE_IO | IORESOURCE_MEM);
 			if (!type || pci_resource_len(pdev, i) == 0)
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 2/2] PNP: don't check disabled PCI BARs for conflicts..., Bjorn Helgaas, (Mon Sep 29, 11:57 am)
[patch 1/2] PCI: add pci_resource_enabled(), Bjorn Helgaas, (Mon Sep 29, 11:56 am)