[patch 5/5] x86: Set PCI config space size to extended for AMD Barcelona

Robert Richter
2007-09-03T08:21:37Z

[-- Attachment #1: fam10h-pci-ext-cfg-dev-fixup.diff --]
[-- Type: text/plain, Size: 1526 bytes --]

This patch sets the config space size for AMD Barcelona PCI devices to
4096.

Signed-off-by: Robert Richter <robert.richter@amd.com>

---
arch/i386/pci/fixup.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)

Index: linux-2.6/arch/i386/pci/fixup.c
===================================================================
--- linux-2.6.orig/arch/i386/pci/fixup.c
+++ linux-2.6/arch/i386/pci/fixup.c
@@ -8,6 +8,7 @@
#include <linux/init.h>
#include "pci.h"

+#define PCI_CFG_SPACE_EXP_SIZE 4096

static void __devinit pci_fixup_i450nx(struct pci_dev *d)
{
@@ -444,3 +445,16 @@ static void __devinit pci_siemens_interr
}
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SIEMENS, 0x0015,
pci_siemens_interrupt_controller);
+
+/*
+ * Extend size of PCI configuration space for AMD CPUs
+ */
+static void __devinit pci_ext_cfg_space_access(struct pci_dev *dev)
+{
+ dev->cfg_size = PCI_CFG_SPACE_EXP_SIZE;
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_FAM10H_HT, pci_ext_cfg_space_access);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_FAM10H_MAP, pci_ext_cfg_space_access);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_FAM10H_DRAM, pci_ext_cfg_space_access);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_FAM10H_MISC, pci_ext_cfg_space_access);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_FAM10H_LINK, pci_ext_cfg_space_access);

--
AMD Saxony, Dresden, Germany
Operating System Research Center
email: robert.richter@amd.com