[PATCH] fix memory scribble in arch/i386/pci/fixup.c

The GET_INDEX() macro should use just the low three bits of the devfn,
otherwise we have a memory scribble in pcie_rootport_aspm_quirk that
overwrites ptype_all

Fix it to be more careful about its arguments while at it.

Acked by Dely Sy <dely.l.sy@intel.com>

Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Christoph Lameter and committed by
Linus Torvalds
ff0d2f90 8c41a5f5

+1 -1
+1 -1
arch/i386/pci/fixup.c
··· 253 #define MAX_PCIEROOT 6 254 static int quirk_aspm_offset[MAX_PCIEROOT << 3]; 255 256 - #define GET_INDEX(a, b) (((a - PCI_DEVICE_ID_INTEL_MCH_PA) << 3) + b) 257 258 static int quirk_pcie_aspm_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *value) 259 {
··· 253 #define MAX_PCIEROOT 6 254 static int quirk_aspm_offset[MAX_PCIEROOT << 3]; 255 256 + #define GET_INDEX(a, b) ((((a) - PCI_DEVICE_ID_INTEL_MCH_PA) << 3) + ((b) & 7)) 257 258 static int quirk_pcie_aspm_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *value) 259 {