Skip to contentSkip to conversation

PCI: rockchip: Fix order of rockchip_pci_core_rsts

PATCH Applied Jensen Huang 5 participants 6 messages Mar 28, 2025 – Apr 22, 2025

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

PATCH 1/1 PCI: rockchip: Fix order of rockchip_pci_core_rsts

The order of rockchip_pci_core_rsts follows the previous comments suggesting to avoid reordering. However, reset_control_bulk_deassert() applies resets in reverse, which may lead to the link downgrading to 2.5 GT/s.

This patch restores the deassert order and comments for core_rsts, introduced in commit 58c6990c5ee7 ("PCI: rockchip: Improve the deassert sequence of four reset pins").

Tested on NanoPC-T4 with Samsung 970 Pro.

Fixes 18715931a5c0 ("PCI: rockchip: Simplify reset control handling by using reset_control_bulk*() function")
---
 drivers/pci/controller/pcie-rockchip.h | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
drivers/pci/controller/pcie-rockchip.h +7 -3
index 11def598534b..4f63a03d535c 100644
@@ -320,11 +320,15 @@ static const char * const rockchip_pci_pm_rsts[] = {
 	"aclk",
 };
 
+/*
+ * Please don't reorder the deassert sequence of the following
+ * four reset pins.
+ */
 static const char * const rockchip_pci_core_rsts[] = {
-	"mgmt-sticky",
-	"core",
-	"mgmt",
 	"pipe",
+	"mgmt",
+	"core",
+	"mgmt-sticky",
 };
 
 struct rockchip_pcie {
Signature · 1 line
2.49.0-1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Jensen Huang

The order of rockchip_pci_core_rsts follows the previous comments suggesting to avoid reordering. However, reset_control_bulk_deassert() applies resets in reverse, which may lead to the link downgrading to 2.5 GT/s.

Oops! I failed to spot it...

Quoted 5 lines

This patch restores the deassert order and comments for core_rsts, introduced in commit 58c6990c5ee7 ("PCI: rockchip: Improve the deassert sequence of four reset pins").

Tested on NanoPC-T4 with Samsung 970 Pro.

Thanks for the fix.

Quoted 2 lines
Fixes 18715931a5c0 ("PCI: rockchip: Simplify reset control handling by using reset_control_bulk*() function")

- Mani

Signature · 1 line
மணிவண்ணன் சதாசிவம்
maintainer Acked-by on v1 1/1
#2 lore raw
In reply to Jensen Huang
Quoted 8 lines · Jensen Huang

The order of rockchip_pci_core_rsts follows the previous comments suggesting to avoid reordering. However, reset_control_bulk_deassert() applies resets in reverse, which may lead to the link downgrading to 2.5 GT/s.

This patch restores the deassert order and comments for core_rsts, introduced in commit 58c6990c5ee7 ("PCI: rockchip: Improve the deassert sequence of four reset pins").

Tested on NanoPC-T4 with Samsung 970 Pro.

Quoted 20 lines
Fixes 18715931a5c0 ("PCI: rockchip: Simplify reset control handling by using reset_control_bulk*() function")
---
  drivers/pci/controller/pcie-rockchip.h | 10 +++++++---
  1 file changed, 7 insertions(+), 3 deletions(-)
drivers/pci/controller/pcie-rockchip.h +4 -0
index 11def598534b..4f63a03d535c 100644
@@ -320,11 +320,15 @@ static const char * const rockchip_pci_pm_rsts[] = {
  	"aclk",
  };
 
+/*
+ * Please don't reorder the deassert sequence of the following
+ * four reset pins.
+ */
  static const char * const rockchip_pci_core_rsts[] = {

drivers/pci/controller/pcie-rockchip.h static const char * const rockchip_pci_pm_rsts[] = { · line 334

Quoted 10 lines
drivers/pci/controller/pcie-rockchip.h +3 -3
-	"mgmt-sticky",
-	"core",
-	"mgmt",
  	"pipe",
+	"mgmt",
+	"core",
+	"mgmt-sticky",
  };
 
  struct rockchip_pcie {

_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip

#3 lore raw
In reply to Jensen Huang
Quoted 8 lines · Jensen Huang

The order of rockchip_pci_core_rsts follows the previous comments suggesting to avoid reordering. However, reset_control_bulk_deassert() applies resets in reverse, which may lead to the link downgrading to 2.5 GT/s.

This patch restores the deassert order and comments for core_rsts, introduced in commit 58c6990c5ee7 ("PCI: rockchip: Improve the deassert sequence of four reset pins").

[...]

Applied, thanks!

[1/1] PCI: rockchip: Fix order of rockchip_pci_core_rsts

      commit: 84d79f3304645d6e87b936d2bf8b8310798efec2

Best regards,

Signature · 1 line
Manivannan Sadhasivam <[email protected]>
Reviewed-by on v1 1/1
#4 lore raw
In reply to Jensen Huang

Hi Jensen,

Quoted 27 lines · Jensen Huang

The order of rockchip_pci_core_rsts follows the previous comments suggesting to avoid reordering. However, reset_control_bulk_deassert() applies resets in reverse, which may lead to the link downgrading to 2.5 GT/s.

This patch restores the deassert order and comments for core_rsts, introduced in commit 58c6990c5ee7 ("PCI: rockchip: Improve the deassert sequence of four reset pins").

Tested on NanoPC-T4 with Samsung 970 Pro.

Fixes 18715931a5c0 ("PCI: rockchip: Simplify reset control handling by using reset_control_bulk*() function")
---
 drivers/pci/controller/pcie-rockchip.h | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
drivers/pci/controller/pcie-rockchip.h +3 -0
index 11def598534b..4f63a03d535c 100644
@@ -320,11 +320,15 @@ static const char * const rockchip_pci_pm_rsts[] = {
        "aclk",
 };
 
+/*
+ * Please don't reorder the deassert sequence of the following
+ * four reset pins.

drivers/pci/controller/pcie-rockchip.h static const char * const rockchip_pci_pm_rsts[] = { · line 332

Quoted 10 lines
drivers/pci/controller/pcie-rockchip.h +4 -3
+ */
 static const char * const rockchip_pci_core_rsts[] = {
-       "mgmt-sticky",
-       "core",
-       "mgmt",
        "pipe",
+       "mgmt",
+       "core",
+       "mgmt-sticky",
 };

Thanks for this Fix. Could you add my if you can?

Thanks
-Anand

#5 lore raw
In reply to Jensen Huang
Quoted 11 lines · Jensen Huang

The order of rockchip_pci_core_rsts follows the previous comments suggesting to avoid reordering. However, reset_control_bulk_deassert() applies resets in reverse, which may lead to the link downgrading to 2.5 GT/s.

This patch restores the deassert order and comments for core_rsts, introduced in commit 58c6990c5ee7 ("PCI: rockchip: Improve the deassert sequence of four reset pins").

Tested on NanoPC-T4 with Samsung 970 Pro.

Fixes 18715931a5c0 ("PCI: rockchip: Simplify reset control handling by using reset_control_bulk*() function")

Thanks for the fix! It looks like 18715931a5c0 appeared in v6.14, so we should probably add a stable tag so it gets backported there?

Quoted 30 lines
---
 drivers/pci/controller/pcie-rockchip.h | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
drivers/pci/controller/pcie-rockchip.h +7 -3
index 11def598534b..4f63a03d535c 100644
@@ -320,11 +320,15 @@ static const char * const rockchip_pci_pm_rsts[] = {
 	"aclk",
 };
 
+/*
+ * Please don't reorder the deassert sequence of the following
+ * four reset pins.
+ */
 static const char * const rockchip_pci_core_rsts[] = {
-	"mgmt-sticky",
-	"core",
-	"mgmt",
 	"pipe",
+	"mgmt",
+	"core",
+	"mgmt-sticky",
 };
 
 struct rockchip_pcie {
Signature · 1 line
2.49.0-1