PCI: imx6: Save and restore root port MSI control in suspend and resume
authorRichard Zhu <hongxing.zhu@nxp.com>
Thu, 8 Dec 2022 06:05:34 +0000 (14:05 +0800)
committerLorenzo Pieralisi <lpieralisi@kernel.org>
Mon, 19 Jun 2023 09:16:54 +0000 (11:16 +0200)
commit3bbc3c72c4b8982ecb719df6685dc7067def0904
treeeddc0a2ca4713568681c5122a54f51297f4ff418
parentda56a1bfbab55189595e588f1d984bdfb5cf5924
PCI: imx6: Save and restore root port MSI control in suspend and resume

The imx6 PCI host controller suffers from a HW integration bug whereby
the MSI enable bit in the root port MSI capability enables/disables MSIs
interrupts for all downstream components in the PCI tree.

This requires, as implemented in

75cb8d20c112 ("PCI: imx: Enable MSI from downstream components")

that the root port MSI enable bit should be set in order for downstream
PCI devices MSIs to function.

The MSI enable bit programming might be lost during the suspend and
should be re-stored during resume.

Save the MSI control during suspend and restore it in resume.

Link: https://lore.kernel.org/r/1670479534-22154-1-git-send-email-hongxing.zhu@nxp.com
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
[lpieralisi@kernel.org: commit log]
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
drivers/pci/controller/dwc/pci-imx6.c