OpenCloudOS-Kernel/drivers/pci/controller/dwc
Jisheng Zhang 9024143e70 PCI: dwc: Fix scheduling while atomic issues
When programming the inbound/outbound ATUs, we call usleep_range() after
each checking PCIE_ATU_ENABLE bit. Unfortunately, the ATU programming
can be executed in atomic context:

inbound ATU programming could be called through
pci_epc_write_header()
  =>dw_pcie_ep_write_header()
    =>dw_pcie_prog_inbound_atu()

outbound ATU programming could be called through
pci_bus_read_config_dword()
  =>dw_pcie_rd_conf()
    =>dw_pcie_prog_outbound_atu()

Fix this issue by calling mdelay() instead.

Fixes: f8aed6ec62 ("PCI: dwc: designware: Add EP mode support")
Fixes: d8bbeb39fb ("PCI: designware: Wait for iATU enable")
Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
[lorenzo.pieralisi@arm.com: commit log update]
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
2018-09-20 16:36:20 -05:00
..
Kconfig
Makefile
pci-dra7xx.c PCI: Update xxx_pcie_ep_raise_irq() and pci_epc_raise_irq() signatures 2018-07-19 11:34:42 +01:00
pci-exynos.c PCI: exynos: Drop unnecessary root_bus_nr setting 2018-07-13 14:07:47 +01:00
pci-imx6.c PCI: imx6: Drop unnecessary root_bus_nr setting 2018-07-13 14:08:03 +01:00
pci-keystone-dw.c
pci-keystone.c PCI: keystone: Drop unnecessary root_bus_nr setting 2018-07-13 14:08:18 +01:00
pci-keystone.h
pci-layerscape.c
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: Add legacy interrupt callback handler 2018-07-19 11:38:38 +01:00
pcie-designware-host.c PCI: designware: Fix I/O space page leak 2018-07-18 17:00:29 -05: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: Fix scheduling while atomic issues 2018-09-20 16:36:20 -05:00
pcie-hisi.c
pcie-histb.c PCI: histb: Drop unnecessary root_bus_nr setting 2018-07-13 14:09:47 +01:00
pcie-kirin.c PCI: kirin: Add MSI support 2018-07-11 12:20:41 +01:00
pcie-qcom.c PCI: qcom: Drop unnecessary root_bus_nr setting 2018-07-13 14:10:38 +01:00
pcie-spear13xx.c PCI: spear13xx: Drop unnecessary root_bus_nr setting 2018-07-13 14:10:55 +01:00