PCI: dwc: Restore MSI Receiver mask during resume
authorJisheng Zhang <jszhang@kernel.org>
Sun, 26 Dec 2021 07:40:19 +0000 (15:40 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 10 Mar 2022 19:52:09 +0000 (13:52 -0600)
commit815953dc2011ad7a34de355dfa703dcef1085219
tree821f03c673d81a761e62082e9aa0c277aa16cc8f
parente783362eb54cd99b2cac8b3a9aeac942e6f6ac07
PCI: dwc: Restore MSI Receiver mask during resume

If a host that uses the IP's integrated MSI Receiver lost power
during suspend, we call dw_pcie_setup_rc() to reinit the RC. But
dw_pcie_setup_rc() always sets pp->irq_mask[ctrl] to ~0, so the mask
register is always set as 0xffffffff incorrectly, thus the MSI can't
work after resume.

Fix this issue by moving pp->irq_mask[ctrl] initialization to
dw_pcie_host_init() so we can correctly set the mask reg during both
boot and resume.

Tested-by: Richard Zhu <hongxing.zhu@nxp.com>
Link: https://lore.kernel.org/r/20211226074019.2556-1-jszhang@kernel.org
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/controller/dwc/pcie-designware-host.c