aboutsummaryrefslogtreecommitdiff
path: root/drivers/pci/controller/dwc/pci-layerscape.c
diff options
context:
space:
mode:
authorJavier Martinez Canillas <[email protected]>2021-06-08 10:04:09 +0200
committerBjorn Helgaas <[email protected]>2021-07-01 08:46:52 -0500
commit3cf5f7ab230e2b886e493c7a8449ed50e29d2b98 (patch)
treefd7376c87dc9fe7b0913db91fa750f52d5a2338e /drivers/pci/controller/dwc/pci-layerscape.c
parent6efb943b8616ec53a5e444193dccf1af9ad627b5 (diff)
PCI: rockchip: Register IRQ handlers after device and data are ready
An IRQ handler may be called at any time after it is registered, so anything it relies on must be ready before registration. rockchip_pcie_subsys_irq_handler() and rockchip_pcie_client_irq_handler() read registers in the PCIe controller, but we registered them before turning on clocks to the controller. If either is called before the clocks are turned on, the register reads fail and the machine hangs. Similarly, rockchip_pcie_legacy_int_handler() uses rockchip->irq_domain, but we installed it before initializing irq_domain. Register IRQ handlers after their data structures are initialized and clocks are enabled. Found by enabling CONFIG_DEBUG_SHIRQ, which calls the IRQ handler when it is being unregistered. An error during the probe path might cause this unregistration and IRQ handler execution before the device or data structure init has finished. [bhelgaas: commit log] Link: https://lore.kernel.org/r/[email protected] Reported-by: Peter Robinson <[email protected]> Tested-by: Peter Robinson <[email protected]> Signed-off-by: Javier Martinez Canillas <[email protected]> Signed-off-by: Lorenzo Pieralisi <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Acked-by: Shawn Lin <[email protected]>
Diffstat (limited to 'drivers/pci/controller/dwc/pci-layerscape.c')
0 files changed, 0 insertions, 0 deletions