]> git.karo-electronics.de Git - karo-tx-linux.git/commit
PCI: designware: Require config accesses to be naturally aligned
authorGabriele Paoloni <gabriele.paoloni@huawei.com>
Thu, 8 Oct 2015 19:27:53 +0000 (14:27 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 8 Oct 2015 19:27:53 +0000 (14:27 -0500)
commitb13457298d16e6a74c8cea54a4b226c6d64bfbff
treeb3eed584ffa7dfc38ccb617ef5fc795741630bf1
parent49fb5b49e1ab4c20979ca8f4ab34d09a0e9f7141
PCI: designware: Require config accesses to be naturally aligned

Add sanity checks on "addr" input parameter in dw_pcie_cfg_read() and
dw_pcie_cfg_write().  These checks make sure that accesses are aligned on
their size, e.g., a 4-byte config access is aligned on a 4-byte boundary.

[bhelgaas: changelog, set *val = 0 in failure case]
Signed-off-by: Gabriele Paoloni <gabriele.paoloni@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Pratyush Anand <pratyush.anand@gmail.com>
drivers/pci/host/pcie-designware.c