PCI: imx6: Keep Root Port MSI capability also for i.MX6Q
Subsystems (5)
PATCH v2 1/1 PCI: imx6: Keep Root Port MSI capability also for i.MX6Q
On the NXP i.MX6Q chipset MSIs from the endpoints won't be received by the iMSI-RX MSI controller if the Root Port MSI capability is disabled.
Even though the Root Port MSIs won't be received by the iMSI-RX controller due to design, this chipset has some weird hardware bug that prevents the endpoint MSIs from reaching when the Root Port MSI capability is disabled.
Hence, always keep the Root Port MSI capability for this chipset.
Note that by keeping Root Port MSI capability, Root Port MSIs such as AER, PME and others won't be received by default. So users need to use workarounds such as passing 'pcie_pme=nomsi' cmdline param.
---
Cc: Manivannan Sadhasivam <[email protected]>
Cc: Richard Zhu <[email protected]>
Cc: Lucas Stach <[email protected]>
Cc: Bjorn Helgaas <[email protected]>
Cc: Frank Li <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
This patch is similar to3a4e8302e72f ("PCI: imx6: Keep Root Port MSI capability with iMSI-RX to work around hardware bug")
Tested on a tbs2910 board [1]
[1] arch/arm/boot/dts/nxp/imx/imx6q-tbs2910.dts
changes in v2:
- collect a-b and r-b tags
- use correct fixes tag (Manivannan)
(reference commit that introduced the bug, not the incomplete fix)
Since this is a fix for a regression in linux-7.0+, can this still be merged for 7.2-rcS ?
--- drivers/pci/controller/dwc/pci-imx6.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/pci/controller/dwc/pci-imx6.c +2 -1
@@ -1995,7 +1995,8 @@ static const struct imx_pcie_drvdata drvdata[] = { .flags = IMX_PCIE_FLAG_IMX_PHY |IMX_PCIE_FLAG_SPEED_CHANGE_WORKAROUND |IMX_PCIE_FLAG_BROKEN_SUSPEND | - IMX_PCIE_FLAG_SUPPORTS_SUSPEND, +IMX_PCIE_FLAG_SUPPORTS_SUSPEND | + IMX_PCIE_FLAG_KEEP_MSI_CAP, .dbi_length = 0x200, .gpr = "fsl,imx6q-iomuxc-gpr", .ltssm_off = IOMUXC_GPR12,
Signature · 1 line
2.43.0
[email protected]
AI reviewThank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] The patch applies the IMX_PCIE_FLAG_KEEP_MSI_CAP workaround to IMX6Q but fails to apply it to IMX6QP and IMX6SX, leaving endpoint MSIs broken on those platforms. --
--- Patch [1]: [PATCH v2] PCI: imx6: Keep Root Port MSI capability also for i.MX6Q --- commit c39e7347457d41f45ace38b5f670a9cded21c82b
Author: Soeren Moch <[email protected]>
PCI: imx6: Keep Root Port MSI capability also for i.MX6Q
This commit works around a hardware bug on the NXP i.MX6Q chipset where endpoint MSIs are dropped if the Root Port MSI capability is disabled. It achieves this by unconditionally applying the IMX_PCIE_FLAG_KEEP_MSI_CAP flag to keep the Root Port MSI capability active.
Quoted 5 lines
drivers/pci/controller/dwc/pci-imx6.c +0
-0
drivers/pci/controller/dwc/pci-imx6.c static const struct imx_pcie_drvdata drvdata[] = { · line 2002
Quoted 9 lines
drivers/pci/controller/dwc/pci-imx6.c +2
-1@@ -1995,7 +1995,8 @@ static const struct imx_pcie_drvdata drvdata[] = { .flags = IMX_PCIE_FLAG_IMX_PHY |IMX_PCIE_FLAG_SPEED_CHANGE_WORKAROUND |IMX_PCIE_FLAG_BROKEN_SUSPEND | - IMX_PCIE_FLAG_SUPPORTS_SUSPEND, +IMX_PCIE_FLAG_SUPPORTS_SUSPEND | + IMX_PCIE_FLAG_KEEP_MSI_CAP, .dbi_length = 0x200, .gpr = "fsl,imx6q-iomuxc-gpr", .ltssm_off = IOMUXC_GPR12,
[Severity: High]
This is a pre-existing issue, but should the IMX6QP and IMX6SX variants also receive the IMX_PCIE_FLAG_KEEP_MSI_CAP workaround?
Looking at the drvdata definitions in this same file, the IMX6QP and IMX6SX variants lack the IMX_PCIE_FLAG_KEEP_MSI_CAP flag:
[IMX6SX] = {
.variant = IMX6SX,
.flags = IMX_PCIE_FLAG_IMX_PHY |
IMX_PCIE_FLAG_SPEED_CHANGE_WORKAROUND |
IMX_PCIE_FLAG_SKIP_L23_READY |
IMX_PCIE_FLAG_SUPPORTS_SUSPEND,
...
[IMX6QP] = {
.variant = IMX6QP,
.flags = IMX_PCIE_FLAG_IMX_PHY |
IMX_PCIE_FLAG_SPEED_CHANGE_WORKAROUND |
IMX_PCIE_FLAG_SKIP_L23_READY |
IMX_PCIE_FLAG_SUPPORTS_SUSPEND,
...Since they use the iMSI-RX controller and share the same DesignWare PCIe integration as IMX6Q, dw_pcie_setup_rc() strips their Root Port MSI capability unless the keep_rp_msi_en flag is set.
Does leaving this flag off cause IRQ timeouts and complete functional failure of MSI-reliant PCIe devices on IMX6QP and IMX6SX platforms due to the same hardware bug?
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Resend as plain text.
On 17.07.26 00:01, Soeren Moch wrote:
Quoted 53 lines · On 16.07.26 23:51, [email protected] wrote:
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] The patch applies theIMX_PCIE_FLAG_KEEP_MSI_CAPworkaround to IMX6Q but fails to apply it to IMX6QP and IMX6SX, leaving endpoint MSIs broken on those platforms. ----- Patch [1]: [PATCH v2] PCI: imx6: Keep Root Port MSI capability also for i.MX6Q --- commit
c39e7347457d41f45ace38b5f670a9cded21c82b
Author: Soeren Moch<[email protected]>
PCI: imx6: Keep Root Port MSI capability also for i.MX6QThis commit works around a hardware bug on the NXP i.MX6Q chipset where endpoint MSIs are dropped if the Root Port MSI capability is disabled. It achieves this by unconditionally applying the
IMX_PCIE_FLAG_KEEP_MSI_CAPflag to keep the Root Port MSI capability active.Quoted 5 lines
drivers/pci/controller/dwc/pci-imx6.c +0
-0drivers/pci/controller/dwc/pci-imx6.c static const struct imx_pcie_drvdata drvdata[] = { · line 2002
Quoted 9 lines
drivers/pci/controller/dwc/pci-imx6.c +2
-1@@ -1995,7 +1995,8 @@ static const struct imx_pcie_drvdata drvdata[] = { .flags = IMX_PCIE_FLAG_IMX_PHY |IMX_PCIE_FLAG_SPEED_CHANGE_WORKAROUND |IMX_PCIE_FLAG_BROKEN_SUSPEND | - IMX_PCIE_FLAG_SUPPORTS_SUSPEND, +IMX_PCIE_FLAG_SUPPORTS_SUSPEND | + IMX_PCIE_FLAG_KEEP_MSI_CAP, .dbi_length = 0x200, .gpr = "fsl,imx6q-iomuxc-gpr", .ltssm_off = IOMUXC_GPR12,[Severity: High]
This is a pre-existing issue, but should the IMX6QP and IMX6SX variants also receive theIMX_PCIE_FLAG_KEEP_MSI_CAPworkaround?Looking at the drvdata definitions in this same file, the IMX6QP and IMX6SX variants lack the
IMX_PCIE_FLAG_KEEP_MSI_CAPflag:[IMX6SX] = { .variant = IMX6SX, .flags = IMX_PCIE_FLAG_IMX_PHY | IMX_PCIE_FLAG_SPEED_CHANGE_WORKAROUND | IMX_PCIE_FLAG_SKIP_L23_READY | IMX_PCIE_FLAG_SUPPORTS_SUSPEND, ... [IMX6QP] = { .variant = IMX6QP, .flags = IMX_PCIE_FLAG_IMX_PHY | IMX_PCIE_FLAG_SPEED_CHANGE_WORKAROUND | IMX_PCIE_FLAG_SKIP_L23_READY | IMX_PCIE_FLAG_SUPPORTS_SUSPEND, ...
Quoted 8 lines
Since they use the iMSI-RX controller and share the same DesignWare PCIe integration as IMX6Q,
dw_pcie_setup_rc()strips their Root Port MSI capability unless thekeep_rp_msi_enflag is set.Does leaving this flag off cause IRQ timeouts and complete functional failure of MSI-reliant PCIe devices on IMX6QP and IMX6SX platforms due to the same hardware bug?
Unfortunately I have no access to IMX6QP and IMX6SX platforms. So I cannot judge if the same fix should be used for these platforms as well. If this fix is required for all platforms that are supported in this driver, why is this added as a special quirk? -- Soeren
Quoted 8 lines · Soeren Moch
On the NXP i.MX6Q chipset MSIs from the endpoints won't be received by the iMSI-RX MSI controller if the Root Port MSI capability is disabled.
Even though the Root Port MSIs won't be received by the iMSI-RX controller due to design, this chipset has some weird hardware bug that prevents the endpoint MSIs from reaching when the Root Port MSI capability is disabled.
Quoted 5 lines
Hence, always keep the Root Port MSI capability for this chipset.
Note that by keeping Root Port MSI capability, Root Port MSIs such as AER, PME and others won't be received by default. So users need to use workarounds such as passing 'pcie_pme=nomsi' cmdline param.
I'd like to align the subject a little more with 3a4e8302e72f and avoid repeating the ".. from reaching when the Root Port MSI ..." part of the commit log, which seems to be missing a word. So I propose the following (if you think it's accurate):
PCI: imx6: Keep i.MX6Q Root Port MSI capability with iMSI-RX to work around hardware bug
On some NXP chipsets, disabling Root Port MSI/MSI-X Capabilities blocks MSIs originating from Endpoints from reaching the iMSI-RX controller.
To address this hardware bug, 3a4e8302e72f ("PCI: imx6: Keep Root Port MSI capability with iMSI-RX to work around hardware bug") preserves Root Port MSI and MSI-X Capabilities on i.MX7D, i.MX8MM, and i.MX8MQ when iMSI-RX is in use.
The same applies to i.MX6Q, so preserve Root Port MSI/MSI-X Capabilities there as well.
Note that preserving these Capabilities means Root Port-originated MSIs such as AER and PME won't be received due to separate hardware limitations. Users may need to use workarounds such as passing the 'pcie_pme=nomsi' command-line parameter.
Also, we need to resolve the Sashiko question about whether IMX6QP and IMX6SX also need this. NXP folks, can you verify?
Quoted 51 lines
Fixes f5cd8a929c825 ("PCI: dwc: Remove MSI/MSIX capability for Root Port if iMSI-RX is used as MSI controller")Cc <[email protected]> # 7.0+Signed-off-by Soeren Moch <[email protected]>Acked-by Richard Zhu <[email protected]>Reviewed-by Frank Li <[email protected]>Reviewed-by Manivannan Sadhasivam <[email protected]>---
Cc: Manivannan Sadhasivam <[email protected]>
Cc: Richard Zhu <[email protected]>
Cc: Lucas Stach <[email protected]>
Cc: Bjorn Helgaas <[email protected]>
Cc: Frank Li <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]This patch is similar to
3a4e8302e72f("PCI: imx6: Keep Root Port MSI capability with iMSI-RX to work around hardware bug")Tested on a tbs2910 board [1]
[1]arch/arm/boot/dts/nxp/imx/imx6q-tbs2910.dtschanges in v2:
- collect a-b and r-b tags
- use correct fixes tag (Manivannan)
(reference commit that introduced the bug, not the incomplete fix)Since this is a fix for a regression in linux-7.0+, can this still be merged for 7.2-rcS ?
--- drivers/pci/controller/dwc/pci-imx6.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/pci/controller/dwc/pci-imx6.c +2
-1@@ -1995,7 +1995,8 @@ static const struct imx_pcie_drvdata drvdata[] = { .flags = IMX_PCIE_FLAG_IMX_PHY |IMX_PCIE_FLAG_SPEED_CHANGE_WORKAROUND |IMX_PCIE_FLAG_BROKEN_SUSPEND | - IMX_PCIE_FLAG_SUPPORTS_SUSPEND, +IMX_PCIE_FLAG_SUPPORTS_SUSPEND | + IMX_PCIE_FLAG_KEEP_MSI_CAP, .dbi_length = 0x200, .gpr = "fsl,imx6q-iomuxc-gpr", .ltssm_off = IOMUXC_GPR12,Signature · 1 line
2.43.0
Hongxing Zhu
maintainerQuoted 45 lines
-----Original Message-----
From: Bjorn Helgaas <[email protected]>
Sent: Friday, July 17, 2026 6:27 AM
To: Soeren Moch <[email protected]>
Cc: Bjorn Helgaas <[email protected]>; [email protected]; Hongxing Zhu <[email protected]>; Frank Li <[email protected]>; Manivannan Sadhasivam <[email protected]>; Lucas Stach <[email protected]>; Fabio Estevam <[email protected]>; [email protected]; linux-arm- [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH v2] PCI: imx6: Keep Root Port MSI capability also for i.MX6QQuoted 8 lines · Soeren Moch
On the NXP i.MX6Q chipset MSIs from the endpoints won't be received by the iMSI-RX MSI controller if the Root Port MSI capability is disabled.
Even though the Root Port MSIs won't be received by the iMSI-RX controller due to design, this chipset has some weird hardware bug that prevents the endpoint MSIs from reaching when the Root Port MSI capability is disabled.
Quoted 5 lines
Hence, always keep the Root Port MSI capability for this chipset.
Note that by keeping Root Port MSI capability, Root Port MSIs such as AER, PME and others won't be received by default. So users need to use workarounds such as passing 'pcie_pme=nomsi' cmdline param.
I'd like to align the subject a little more with
3a4e8302e72fand avoid repeating the ".. from reaching when the Root Port MSI ..." part of the commit log, which seems to be missing a word. So I propose the following (if you think it's accurate):PCI: imx6: Keep i.MX6Q Root Port MSI capability with iMSI-RX to work around
hardware bugOn some NXP chipsets, disabling Root Port MSI/MSI-X Capabilities blocks MSIs originating from Endpoints from reaching the iMSI-RX controller.
To address this hardware bug,
3a4e8302e72f("PCI: imx6: Keep Root Port MSI capability with iMSI-RX to work around hardware bug") preserves Root Port MSI and MSI-X Capabilities on i.MX7D, i.MX8MM, and i.MX8MQ when iMSI-RX
is
in use.The same applies to i.MX6Q, so preserve Root Port MSI/MSI-X Capabilities there as well.
Quoted 7 lines
Note that preserving these Capabilities means Root Port-originated MSIs such as AER and PME won't be received due to separate hardware limitations. Users may need to use workarounds such as passing the 'pcie_pme=nomsi' command-line parameter.
Also, we need to resolve the Sashiko question about whether IMX6QP and IMX6SX also need this. NXP folks, can you verify?
Hi Bjorn:
Thank you for the reminder.
You are correct. I apologize for not covering these legacy platforms initially. I have now verified that i.MX6QP and i.MX6SX PCIe controllers have the same issue, so the fix should be applied to these platforms as well.
Should I send a separate patch for i.MX6QP and i.MX6SX, or would you prefer that I extend this commit to cover all three variants in v3?
Best Regards
Richard Zhu
Quoted 56 lines
Quoted 27 lines
Fixes f5cd8a929c825 ("PCI: dwc: Remove MSI/MSIX capability for RootPort if iMSI-RX is used as MSI controller")
Cc <[email protected]> # 7.0+Signed-off-by Soeren Moch <[email protected]>Acked-by Richard Zhu <[email protected]>Reviewed-by Frank Li <[email protected]>Reviewed-by Manivannan Sadhasivam <[email protected]>---
Cc: Manivannan Sadhasivam <[email protected]>
Cc: Richard Zhu <[email protected]>
Cc: Lucas Stach <[email protected]>
Cc: Bjorn Helgaas <[email protected]>
Cc: Frank Li <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]This patch is similar to
3a4e8302e72f("PCI: imx6: Keep Root Port MSI capability with iMSI-RX to work around hardware bug")Tested on a tbs2910 board [1]
[1]arch/arm/boot/dts/nxp/imx/imx6q-tbs2910.dtsQuoted 6 lines
changes in v2:
- collect a-b and r-b tags
- use correct fixes tag (Manivannan)
(reference commit that introduced the bug, not the incomplete fix)Since this is a fix for a regression in linux-7.0+, can this still be merged for 7.2-
rcS ?
Quoted 22 lines
--- drivers/pci/controller/dwc/pci-imx6.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/pci/controller/dwc/pci-imx6.c +2
-2@@ -1995,7 +1995,8 @@ static const struct imx_pcie_drvdata drvdata[] = { .flags = IMX_PCIE_FLAG_IMX_PHY |IMX_PCIE_FLAG_SPEED_CHANGE_WORKAROUND |IMX_PCIE_FLAG_BROKEN_SUSPEND | - IMX_PCIE_FLAG_SUPPORTS_SUSPEND, +IMX_PCIE_FLAG_SUPPORTS_SUSPEND | + IMX_PCIE_FLAG_KEEP_MSI_CAP, .dbi_length = 0x200, .gpr = "fsl,imx6q-iomuxc-gpr", .ltssm_off = IOMUXC_GPR12, --2.43.0
Quoted 11 lines · Bjorn Helgaas
Quoted 10 lines · Soeren Moch
On the NXP i.MX6Q chipset MSIs from the endpoints won't be received by the iMSI-RX MSI controller if the Root Port MSI capability is disabled.
Even though the Root Port MSIs won't be received by the iMSI-RX controller due to design, this chipset has some weird hardware bug that prevents the endpoint MSIs from reaching when the Root Port MSI capability is disabled.
Hence, always keep the Root Port MSI capability for this chipset.
Quoted 7 lines
Quoted 3 lines
Note that by keeping Root Port MSI capability, Root Port MSIs such as AER, PME and others won't be received by default. So users need to use workarounds such as passing 'pcie_pme=nomsi' cmdline param.
I'd like to align the subject a little more with
3a4e8302e72fand avoid repeating the ".. from reaching when the Root Port MSI ..." part of the commit log, which seems to be missing a word. So I propose the following (if you think it's accurate):
Your proposed new patch subject and commit message is totally fine for me.
Thanks,
Soeren
Quoted 73 lines
PCI: imx6: Keep i.MX6Q Root Port MSI capability with iMSI-RX to work around hardware bug
On some NXP chipsets, disabling Root Port MSI/MSI-X Capabilities blocks MSIs originating from Endpoints from reaching the iMSI-RX controller.
To address this hardware bug,
3a4e8302e72f("PCI: imx6: Keep Root Port MSI capability with iMSI-RX to work around hardware bug") preserves Root Port MSI and MSI-X Capabilities on i.MX7D, i.MX8MM, and i.MX8MQ when iMSI-RX is in use.The same applies to i.MX6Q, so preserve Root Port MSI/MSI-X Capabilities there as well.
Note that preserving these Capabilities means Root Port-originated MSIs such as AER and PME won't be received due to separate hardware limitations. Users may need to use workarounds such as passing the 'pcie_pme=nomsi' command-line parameter.
Also, we need to resolve the Sashiko question about whether IMX6QP and IMX6SX also need this. NXP folks, can you verify?
Quoted 51 lines
Fixes f5cd8a929c825 ("PCI: dwc: Remove MSI/MSIX capability for Root Port if iMSI-RX is used as MSI controller")Cc <[email protected]> # 7.0+Signed-off-by Soeren Moch <[email protected]>Acked-by Richard Zhu <[email protected]>Reviewed-by Frank Li <[email protected]>Reviewed-by Manivannan Sadhasivam <[email protected]>---
Cc: Manivannan Sadhasivam <[email protected]>
Cc: Richard Zhu <[email protected]>
Cc: Lucas Stach <[email protected]>
Cc: Bjorn Helgaas <[email protected]>
Cc: Frank Li <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]This patch is similar to
3a4e8302e72f("PCI: imx6: Keep Root Port MSI capability with iMSI-RX to work around hardware bug")Tested on a tbs2910 board [1]
[1]arch/arm/boot/dts/nxp/imx/imx6q-tbs2910.dtschanges in v2:
- collect a-b and r-b tags
- use correct fixes tag (Manivannan)
(reference commit that introduced the bug, not the incomplete fix)Since this is a fix for a regression in linux-7.0+, can this still be merged for 7.2-rcS ?
--- drivers/pci/controller/dwc/pci-imx6.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/pci/controller/dwc/pci-imx6.c +2
-1@@ -1995,7 +1995,8 @@ static const struct imx_pcie_drvdata drvdata[] = { .flags = IMX_PCIE_FLAG_IMX_PHY |IMX_PCIE_FLAG_SPEED_CHANGE_WORKAROUND |IMX_PCIE_FLAG_BROKEN_SUSPEND | - IMX_PCIE_FLAG_SUPPORTS_SUSPEND, +IMX_PCIE_FLAG_SUPPORTS_SUSPEND | + IMX_PCIE_FLAG_KEEP_MSI_CAP, .dbi_length = 0x200, .gpr = "fsl,imx6q-iomuxc-gpr", .ltssm_off = IOMUXC_GPR12,Signature · 1 line
2.43.0