linux-uconsole/drivers/pci/controller/dwc
Kishon Vijay Abraham I 1159872c91 PCI: dwc: Fix dw_pcie_ep_find_capability() to return correct capability offset
[ Upstream commit 421db1ab28 ]

commit beb4641a78 ("PCI: dwc: Add MSI-X callbacks handler") while
adding MSI-X callback handler, introduced dw_pcie_ep_find_capability()
and __dw_pcie_ep_find_next_cap() for finding the MSI and MSIX capability.

However if MSI or MSIX capability is the last capability (i.e there are
no additional items in the capabilities list and the Next Capability
Pointer is set to '0'), __dw_pcie_ep_find_next_cap will return '0'
even though MSI or MSIX capability may be present because of
incorrect ordering of the "next_cap_ptr" check. Fix it.

Fixes: beb4641a78 ("PCI: dwc: Add MSI-X callbacks handler")
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-01-27 14:50:39 +01:00
..
Kconfig
Makefile
pci-dra7xx.c PCI: dwc: pci-dra7xx: Fix compilation when !CONFIG_GPIOLIB 2019-07-31 07:27:07 +02:00
pci-exynos.c PCI: exynos: Propagate errors for optional PHYs 2019-10-07 18:57:13 +02:00
pci-imx6.c PCI: imx6: Propagate errors for optional regulators 2019-10-07 18:57:13 +02:00
pci-keystone-dw.c
pci-keystone.c PCI: keystone: Use quirk to limit MRRS for K2G 2019-12-01 09:17:33 +01:00
pci-keystone.h
pci-layerscape.c PCI: layerscape: Fix wrong invocation of outbound window disable accessor 2018-12-05 19:32:07 +01:00
pcie-armada8k.c PCI: armada8k: Drop unnecessary root_bus_nr setting 2018-07-13 14:08:28 +01:00
pcie-artpec6.c PCI: Update xxx_pcie_ep_raise_irq() and pci_epc_raise_irq() signatures 2018-07-19 11:34:42 +01:00
pcie-designware-ep.c PCI: dwc: Fix dw_pcie_ep_find_capability() to return correct capability offset 2020-01-27 14:50:39 +01:00
pcie-designware-host.c PCI: dwc: Fix find_next_bit() usage 2020-01-17 19:47:08 +01:00
pcie-designware-plat.c pci-epf-test/pci_endpoint_test: Add MSI-X support 2018-07-19 11:46:45 +01:00
pcie-designware.c PCI: dwc: Fix scheduling while atomic issues 2018-09-20 16:36:20 -05:00
pcie-designware.h PCI: dwc: Free MSI IRQ page in dw_pcie_free_msi() 2019-06-15 11:54:05 +02:00
pcie-hisi.c
pcie-histb.c PCI: histb: Propagate errors for optional regulators 2019-10-07 18:57:13 +02:00
pcie-kirin.c PCI: kirin: Fix section mismatch warning 2019-09-21 07:17:14 +02:00
pcie-qcom.c PCI: qcom: Don't deassert reset GPIO during probe 2019-09-16 08:22:08 +02:00
pcie-spear13xx.c PCI: spear13xx: Drop unnecessary root_bus_nr setting 2018-07-13 14:10:55 +01:00