[linux-yocto] [PATCH 12/15] drivers/pci: Fix Error in Axxia PCIe Code
Daniel Dragomir
daniel.dragomir at windriver.com
Fri Jan 8 07:51:43 PST 2016
From: John Jacques <john.jacques at intel.com>
In some cases, an uninitialized value was being written.
Signed-off-by: John Jacques <john.jacques at intel.com>
---
drivers/pci/host/axxia_pci.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/pci/host/axxia_pci.c b/drivers/pci/host/axxia_pci.c
index 8e4eb3f..da0ae66 100644
--- a/drivers/pci/host/axxia_pci.c
+++ b/drivers/pci/host/axxia_pci.c
@@ -341,14 +341,17 @@ axxia_pciex_write_config(struct pci_bus *bus, unsigned int devfn,
addr = addr + (offset & 0xfffffffc);
val32 = readl(addr);
+
if (len == 2)
val32 = (val32 & ~(0xffff << bs))
| ((val & 0xffff) << bs);
else
val32 = (val32 & ~(0xff << bs))
| ((val & 0xff) << bs);
+
+ val = val32;
}
- val = val32;
+
len = 4;
} else {
addr = addr + (offset << 2) + (offset & 0x3);
--
1.9.1
More information about the linux-yocto
mailing list