diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-12-31 14:59:21 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-12-31 14:59:21 -0800 |
commit | 9c982e86dbdbaa3fb248dfc776dddda32cbc8927 (patch) | |
tree | 00ff2f241f02586c089a95067821cbf5c67ced99 /drivers/pci | |
parent | 7c672dd6016afdfca5ab87b1a32729c73236a3cd (diff) | |
parent | 1dbe162d53e11665b48a1c122899ffc2c068bef4 (diff) | |
download | op-kernel-dev-9c982e86dbdbaa3fb248dfc776dddda32cbc8927.zip op-kernel-dev-9c982e86dbdbaa3fb248dfc776dddda32cbc8927.tar.gz |
Merge tag 'pci-v4.4-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
Pull PCI bugfix from Bjorn Helgaas:
"Here's another fix for v4.4.
This fixes 32-bit config reads for the HiSilicon driver. Obviously
the driver is completely broken without this fix (apparently it
actually was tested internally, but got broken somehow in the process
of upstreaming it).
Summary:
HiSilicon host bridge driver
Fix 32-bit config reads (Dongdong Liu)"
* tag 'pci-v4.4-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
PCI: hisi: Fix hisi_pcie_cfg_read() 32-bit reads
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/host/pcie-hisi.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pci/host/pcie-hisi.c b/drivers/pci/host/pcie-hisi.c index 163671a..77f7c66 100644 --- a/drivers/pci/host/pcie-hisi.c +++ b/drivers/pci/host/pcie-hisi.c @@ -61,7 +61,9 @@ static int hisi_pcie_cfg_read(struct pcie_port *pp, int where, int size, *val = *(u8 __force *) walker; else if (size == 2) *val = *(u16 __force *) walker; - else if (size != 4) + else if (size == 4) + *val = reg_val; + else return PCIBIOS_BAD_REGISTER_NUMBER; return PCIBIOS_SUCCESSFUL; |