Skip to content

Commit 9c982e8

Browse files
committed
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
2 parents 7c672dd + 1dbe162 commit 9c982e8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/pci/host/pcie-hisi.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ static int hisi_pcie_cfg_read(struct pcie_port *pp, int where, int size,
6161
*val = *(u8 __force *) walker;
6262
else if (size == 2)
6363
*val = *(u16 __force *) walker;
64-
else if (size != 4)
64+
else if (size == 4)
65+
*val = reg_val;
66+
else
6567
return PCIBIOS_BAD_REGISTER_NUMBER;
6668

6769
return PCIBIOS_SUCCESSFUL;

0 commit comments

Comments
 (0)