Skip to contentSkip to conversation

PCI: imx6: Keep Root Port MSI capability also for i.MX6Q

PATCH In review Soeren Moch 4 participants 6 messages Jul 16 – Jul 17 1 message not in the archive

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

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.

Fixes f5cd8a929c825 ("PCI: dwc: Remove MSI/MSIX capability for Root Port if iMSI-RX is used as MSI controller")
Cc <[email protected]> # 7.0+

---
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.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
index 98e1db751132..8130cf93c2bb 100644
@@ -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
#1 lore raw
Thank 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
index 98e1db751132a..8130cf93c2bb4 100644

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

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

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 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
index 98e1db751132a..8130cf93c2bb4 100644

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,
                 ...
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 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?

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

#4 lore raw
In reply to Soeren Moch
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+

---
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.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
index 98e1db751132..8130cf93c2bb 100644
@@ -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
maintainer
#5 lore raw
Quoted 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.MX6Q

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.

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 Root

Port if iMSI-RX is used as MSI controller")

---
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.dts

Quoted 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
index 98e1db751132..8130cf93c2bb 100644
@@ -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

#6 lore raw
In reply to Bjorn Helgaas
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 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):

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+

---
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.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
index 98e1db751132..8130cf93c2bb 100644
@@ -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