[Fwd: Re: [Patch v2] Make PCI extended config space (MMCONFIG) a driver opt-in]

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Greg KH <gregkh@...>, Matthew Wilcox <matthew@...>, Ivan Kokshaysky <ink@...>
Cc: linux-kernel@vger.kernel.org <linux-kernel@...>, linux-pci@atrey.karlin.mff.cuni.cz <linux-pci@...>
Date: Friday, January 11, 2008 - 10:01 pm

Sorry, 

Meant to press reply/all. 

-------- Forwarded Message --------
From: Tony Camuso <tcamuso@redhat.com>
To: Greg KH <greg@kroah.com>
Subject: Re: [Patch v2] Make PCI extended config space (MMCONFIG) a
driver opt-in
Date: Fri, 11 Jan 2008 20:58:52 -0500

Greg KH wrote:

The 5-patch set I submitted is for Northbridges that don't respond to 
MMCONFIG cycles at all. We (RH & HP) were blacklisting boxes in RHEL,
limiting them to legacy PCI, platform-wide. This was bad for systems
that had both PCI legacy and PCI express buses, because it limited 
the functionality of the PCI express buses. 

The problem Matthew described is different, having to do with bus
sizing code causing the large displacement of the graphics chip to
overlap the decode for MMCONFIG space. 

Ivan suggested a fix for this problem that limits offsets below 64 bytes
to lgecacy PCI config access. 

I tried this and it works perfectly!

I submitted an informal patch for folks to try. 

Here it is again.

diff --git a/arch/x86/pci/mmconfig_32.c b/arch/x86/pci/mmconfig_32.c
index 1bf5816..4474979 100644
--- a/arch/x86/pci/mmconfig_32.c
+++ b/arch/x86/pci/mmconfig_32.c
@@ -73,7 +73,7 @@ static int pci_mmcfg_read(unsigned int seg, unsigned int bus,
 	}
 
 	base = get_base_addr(seg, bus, devfn);
-	if (!base)
+	if ((!base) || (reg < 0x40))
 		return pci_conf1_read(seg,bus,devfn,reg,len,value);
 
 	spin_lock_irqsave(&pci_config_lock, flags);
@@ -106,7 +106,7 @@ static int pci_mmcfg_write(unsigned int seg, unsigned int bus,
 		return -EINVAL;
 
 	base = get_base_addr(seg, bus, devfn);
-	if (!base)
+	if ((!base) || (reg < 0x40))
 		return pci_conf1_write(seg,bus,devfn,reg,len,value);
 
 	spin_lock_irqsave(&pci_config_lock, flags);
diff --git a/arch/x86/pci/mmconfig_64.c b/arch/x86/pci/mmconfig_64.c
index 4095e4d..4ad1fcb 100644
--- a/arch/x86/pci/mmconfig_64.c
+++ b/arch/x86/pci/mmconfig_64.c
@@ -61,7 +61,7 @@ static int pci_mmcfg_read(unsigned int seg, unsigned int bus,
 	}
 
 	addr = pci_dev_base(seg, bus, devfn);
-	if (!addr)
+	if ((!addr) || (reg < 0x40))
 		return pci_conf1_read(seg,bus,devfn,reg,len,value);
 
 	switch (len) {
@@ -89,7 +89,7 @@ static int pci_mmcfg_write(unsigned int seg, unsigned int bus,
 		return -EINVAL;
 
 	addr = pci_dev_base(seg, bus, devfn);
-	if (!addr)
+	if ((!addr) || (reg < 0x40))
 		return pci_conf1_write(seg,bus,devfn,reg,len,value);
 
 	switch (len) {


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[Fwd: Re: [Patch v2] Make PCI extended config space (MMCONFI..., Tony Camuso, (Fri Jan 11, 10:01 pm)