Linux-Rockchip Archive on lore.kernel.org
 help / color / mirror / Atom feed
* PCI: dw-rockchip: Unable to boot Quartz64 Model B from NVMe since reset changes
@ 2026-11-18 16:03 James Le Cuirot
  2026-11-18 16:46 ` Niklas Cassel
  2026-11-19 10:55 ` Niklas Cassel
  0 siblings, 2 replies; 5+ messages in thread
From: James Le Cuirot @ 2026-11-18 16:03 UTC (permalink / raw)
  To: Wilfred Mallawa
  Cc: Niklas Cassel, Manivannan Sadhasivam, Bjorn Helgaas, linux-pci,
	linux-rockchip, Shawn Lin

Hello Wilfred,

Unfortunately, since your commit "PCI: dw-rockchip: Implement
.reset_root_port() and use for link down" (b376b3ff9cb0527), I have been
basically unable to boot my Quartz64 Model B from NVMe. Sometimes if I wait
long enough, it will eventually work, albeit very slowly. If I revert this
(and 4e9f69d08253) against 7.3.5, then it boots normally. Here is the relevant
output.

rockchip-dw-pcie 3c0000000.pcie: host bridge /pcie@fe260000 ranges:
rockchip-dw-pcie 3c0000000.pcie:       IO 0x00f4100000..0x00f41fffff -> 0x00f4100000
rockchip-dw-pcie 3c0000000.pcie:      MEM 0x00f4200000..0x00f5ffffff -> 0x00f4200000
rockchip-dw-pcie 3c0000000.pcie:      MEM 0x0300000000..0x033fffffff -> 0x0300000000
rockchip-dw-pcie 3c0000000.pcie: iATU: unroll T, 8 ob, 8 ib, align 64K, limit 8G
rockchip-dw-pcie 3c0000000.pcie: PCIe Gen.2 x1 link up
rockchip-dw-pcie 3c0000000.pcie: PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [bus 00-0f]
pci_bus 0000:00: root bus resource [io  0x0000-0xfffff] (bus address [0xf4100000-0xf41fffff])
pci_bus 0000:00: root bus resource [mem 0xf4200000-0xf5ffffff]
pci_bus 0000:00: root bus resource [mem 0x300000000-0x33fffffff]
pci 0000:00:00.0: [1d87:3566] type 01 class 0x060400 PCIe Root Port
pci 0000:00:00.0: ROM [mem 0x00000000-0x0000ffff pref]
pci 0000:00:00.0: PCI bridge to [bus 01-ff]
pci 0000:00:00.0:   bridge window [io  0x0000-0x0fff]
pci 0000:00:00.0:   bridge window [mem 0x00000000-0x000fffff]
pci 0000:00:00.0:   bridge window [mem 0x00000000-0x000fffff 64bit pref]
pci 0000:00:00.0: supports D1 D2
pci 0000:00:00.0: PME# supported from D0 D1 D3hot
pci_bus 0000:01: busn_res: can not insert [bus 01-ff] under [bus 00-0f] (conflicts with (null) [bus 00-0f])
pci 0000:01:00.0: [1e0f:0009] type 00 class 0x010802 PCIe Endpoint
pci 0000:01:00.0: BAR 0 [mem 0x00000000-0x00003fff 64bit]
pci 0000:01:00.0: 4.000 Gb/s available PCIe bandwidth, limited by 5.0 GT/s PCIe x1 link at 0000:00:00.0 (capable of 31.504 Gb/s with 8.0 GT/s PCIe x4 link)
pci 0000:01:00.0: ASPM: default states L1
pci 0000:00:00.0: bridge window [mem 0xf4200000-0xf42fffff]: assigned
pci 0000:00:00.0: ROM [mem 0xf4300000-0xf430ffff pref]: assigned
pci 0000:01:00.0: BAR 0 [mem 0xf4200000-0xf4203fff 64bit]: assigned
pci 0000:00:00.0: PCI bridge to [bus 01-ff]
pci 0000:00:00.0:   bridge window [mem 0xf4200000-0xf42fffff]
pci_bus 0000:00: resource 4 [io  0x0000-0xfffff]
pci_bus 0000:00: resource 5 [mem 0xf4200000-0xf5ffffff]
pci_bus 0000:00: resource 6 [mem 0x300000000-0x33fffffff]
pci_bus 0000:01: resource 1 [mem 0xf4200000-0xf42fffff]
pcieport 0000:00:00.0: PME: Signaling with IRQ 86
pcieport 0000:00:00.0: AER: enabled with IRQ 95
pcieport 0000:00:00.0: Recovering Root Port due to Link Down
nvme nvme0: pci function 0000:01:00.0
nvme 0000:01:00.0: enabling device (0000 -> 0002)
rockchip-pm-domain fdd90000.power-management:power-controller: sync_state() pending due to fdeb0000.rga
nvme nvme0: D3 entry latency set to 10 seconds
hwmon hwmon2: temp1_input not attached to any thermal zone
nvme nvme0: passthrough uses implicit buffer lengths
nvme nvme0: 4/0/0 default/read/poll queues
 nvme0n1: p1 p2 p3 p4 p5
nvme nvme0: frozen state error detected, reset controller
rk_gmac-dwmac fe010000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
rk_gmac-dwmac fe010000.ethernet eth0: PHY [stmmac-0:01] driver [RTL8211F-VD Gigabit Ethernet] (irq=POLL)
dwmac4: Master AXI performs any burst length
rk_gmac-dwmac fe010000.ethernet eth0: No Safety Features support found
rk_gmac-dwmac fe010000.ethernet eth0: IEEE 1588-2008 Advanced Timestamp supported
rk_gmac-dwmac fe010000.ethernet eth0: registered PTP clock
rk_gmac-dwmac fe010000.ethernet eth0: configuring for phy/rgmii link mode
rockchip-dw-pcie 3c0000000.pcie: PCIe Gen.2 x1 link up
pcieport 0000:00:00.0: Root Port has been reset
nvme nvme0: restart after slot reset
nvme nvme0: D3 entry latency set to 10 seconds
nvme nvme0: 4/0/0 default/read/poll queues
pcieport 0000:00:00.0: AER: device recovery successful
pcieport 0000:00:00.0: Recovering Root Port due to Link Down
nvme nvme0: frozen state error detected, reset controller
rockchip-dw-pcie 3c0000000.pcie: PCIe Gen.2 x1 link up
pcieport 0000:00:00.0: Root Port has been reset
nvme nvme0: restart after slot reset
nvme nvme0: D3 entry latency set to 10 seconds
nvme nvme0: 4/0/0 default/read/poll queues
pcieport 0000:00:00.0: AER: device recovery successful
pcieport 0000:00:00.0: Recovering Root Port due to Link Down
nvme nvme0: frozen state error detected, reset controller
rockchip-dw-pcie 3c0000000.pcie: PCIe Gen.2 x1 link up
pcieport 0000:00:00.0: Root Port has been reset
nvme nvme0: restart after slot reset
nvme nvme0: D3 entry latency set to 10 seconds
nvme nvme0: 4/0/0 default/read/poll queues
pcieport 0000:00:00.0: AER: device recovery successful
pcieport 0000:00:00.0: Recovering Root Port due to Link Down
nvme nvme0: frozen state error detected, reset controller
rockchip-dw-pcie 3c0000000.pcie: PCIe Gen.2 x1 link up
pcieport 0000:00:00.0: Root Port has been reset
nvme nvme0: restart after slot reset
nvme nvme0: D3 entry latency set to 10 seconds
nvme nvme0: 4/0/0 default/read/poll queues
pcieport 0000:00:00.0: AER: device recovery successful
pcieport 0000:00:00.0: Recovering Root Port due to Link Down
nvme nvme0: frozen state error detected, reset controller
rockchip-dw-pcie 3c0000000.pcie: PCIe Gen.2 x1 link up
pcieport 0000:00:00.0: Root Port has been reset
nvme nvme0: restart after slot reset
nvme nvme0: D3 entry latency set to 10 seconds
nvme nvme0: 4/0/0 default/read/poll queues
pcieport 0000:00:00.0: AER: device recovery successful
pcieport 0000:00:00.0: Recovering Root Port due to Link Down
nvme nvme0: frozen state error detected, reset controller
rockchip-dw-pcie 3c0000000.pcie: PCIe Gen.2 x1 link up
pcieport 0000:00:00.0: Root Port has been reset
nvme nvme0: restart after slot reset
nvme nvme0: D3 entry latency set to 10 seconds
nvme nvme0: 4/0/0 default/read/poll queues
pcieport 0000:00:00.0: AER: device recovery successful
pcieport 0000:00:00.0: Recovering Root Port due to Link Down
nvme nvme0: frozen state error detected, reset controller
rockchip-dw-pcie 3c0000000.pcie: PCIe Gen.2 x1 link up
pcieport 0000:00:00.0: Root Port has been reset
nvme nvme0: restart after slot reset
nvme nvme0: D3 entry latency set to 10 seconds
nvme nvme0: 4/0/0 default/read/poll queues
pcieport 0000:00:00.0: AER: device recovery successful
pcieport 0000:00:00.0: Recovering Root Port due to Link Down
nvme nvme0: frozen state error detected, reset controller
nvme nvme0: D3 entry latency set to 10 seconds
nvme nvme0: 4/0/0 default/read/poll queues
pcieport 0000:00:00.0: Root Port has been reset
(and so on...)

Regards,
Chewi

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PCI: dw-rockchip: Unable to boot Quartz64 Model B from NVMe since reset changes
  2026-11-18 16:03 PCI: dw-rockchip: Unable to boot Quartz64 Model B from NVMe since reset changes James Le Cuirot
@ 2026-11-18 16:46 ` Niklas Cassel
  2026-11-18 22:30   ` James Le Cuirot
  2026-11-19 10:55 ` Niklas Cassel
  1 sibling, 1 reply; 5+ messages in thread
From: Niklas Cassel @ 2026-11-18 16:46 UTC (permalink / raw)
  To: James Le Cuirot
  Cc: Wilfred Mallawa, Manivannan Sadhasivam, Bjorn Helgaas, linux-pci,
	linux-rockchip, Shawn Lin

Hello James,

On Wed, Nov 18, 2026 at 04:03:11PM +0000, James Le Cuirot wrote:
> Hello Wilfred,
> 
> Unfortunately, since your commit "PCI: dw-rockchip: Implement
> .reset_root_port() and use for link down" (b376b3ff9cb0527), I have been
> basically unable to boot my Quartz64 Model B from NVMe. Sometimes if I wait
> long enough, it will eventually work, albeit very slowly. If I revert this
> (and 4e9f69d08253) against 7.3.5, then it boots normally. Here is the relevant
> output.

There are some dwc-rockchip fixes queued on the following branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git/log/?h=controller/dwc-rockchip

It would be interesting to see if using this branch makes a differnce.


Kind regards,
Niklas

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PCI: dw-rockchip: Unable to boot Quartz64 Model B from NVMe since reset changes
  2026-11-18 16:46 ` Niklas Cassel
@ 2026-11-18 22:30   ` James Le Cuirot
  2026-11-18 22:47     ` Wilfred Mallawa
  0 siblings, 1 reply; 5+ messages in thread
From: James Le Cuirot @ 2026-11-18 22:30 UTC (permalink / raw)
  To: Niklas Cassel
  Cc: Wilfred Mallawa, Manivannan Sadhasivam, Bjorn Helgaas, linux-pci,
	linux-rockchip, Shawn Lin


[-- Attachment #1.1: Type: text/plain, Size: 968 bytes --]

On Wed, 2026-11-18 at 17:46 +0100, Niklas Cassel wrote:
> Hello James,
> 
> On Wed, Nov 18, 2026 at 04:03:11PM +0000, James Le Cuirot wrote:
> > Hello Wilfred,
> > 
> > Unfortunately, since your commit "PCI: dw-rockchip: Implement
> > .reset_root_port() and use for link down" (b376b3ff9cb0527), I have been
> > basically unable to boot my Quartz64 Model B from NVMe. Sometimes if I wait
> > long enough, it will eventually work, albeit very slowly. If I revert this
> > (and 4e9f69d08253) against 7.3.5, then it boots normally. Here is the relevant
> > output.
> 
> There are some dwc-rockchip fixes queued on the following branch:
> https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git/log/?h=controller/dwc-rockchip
> 
> It would be interesting to see if using this branch makes a differnce.
> 
> 
> Kind regards,
> Niklas

Thanks for the suggestion. I rebased these against 7.3.5 (with 85203c831a8),
but sadly it made no difference.

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 423 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PCI: dw-rockchip: Unable to boot Quartz64 Model B from NVMe since reset changes
  2026-11-18 22:30   ` James Le Cuirot
@ 2026-11-18 22:47     ` Wilfred Mallawa
  0 siblings, 0 replies; 5+ messages in thread
From: Wilfred Mallawa @ 2026-11-18 22:47 UTC (permalink / raw)
  To: chewi@gentoo.org, cassel@kernel.org
  Cc: linux-pci@vger.kernel.org, manivannan.sadhasivam@oss.qualcomm.com,
	bhelgaas@google.com, shawn.lin@rock-chips.com,
	linux-rockchip@lists.infradead.org

On Wed, 2026-11-18 at 22:30 +0000, James Le Cuirot wrote:
> On Wed, 2026-11-18 at 17:46 +0100, Niklas Cassel wrote:
> > Hello James,
> > 
> > On Wed, Nov 18, 2026 at 04:03:11PM +0000, James Le Cuirot wrote:
> > > Hello Wilfred,
> > > 
> > > Unfortunately, since your commit "PCI: dw-rockchip: Implement
> > > .reset_root_port() and use for link down" (b376b3ff9cb0527), I
> > > have been
> > > basically unable to boot my Quartz64 Model B from NVMe. Sometimes
> > > if I wait
> > > long enough, it will eventually work, albeit very slowly. If I
> > > revert this
> > > (and 4e9f69d08253) against 7.3.5, then it boots normally. Here is
> > > the relevant
> > > output.
> > 
> > There are some dwc-rockchip fixes queued on the following branch:
> > https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git/log/?h=controller/dwc-rockchip
> > 
> > It would be interesting to see if using this branch makes a
> > differnce.
> > 
> > 
> > Kind regards,
> > Niklas
> 
> Thanks for the suggestion. I rebased these against 7.3.5 (with
> 85203c831a8),
> but sadly it made no difference.


Hey James,

This is odd! looks like we are in a AER loop, which is initially
triggered by a link down/reset.

Have you tried booting with pcie_aspm=off? Any luck? Otherwise, maybe
we aren't handling the interrupts aptly...

Wilfred
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PCI: dw-rockchip: Unable to boot Quartz64 Model B from NVMe since reset changes
  2026-11-18 16:03 PCI: dw-rockchip: Unable to boot Quartz64 Model B from NVMe since reset changes James Le Cuirot
  2026-11-18 16:46 ` Niklas Cassel
@ 2026-11-19 10:55 ` Niklas Cassel
  1 sibling, 0 replies; 5+ messages in thread
From: Niklas Cassel @ 2026-11-19 10:55 UTC (permalink / raw)
  To: James Le Cuirot
  Cc: Wilfred Mallawa, Manivannan Sadhasivam, Bjorn Helgaas, linux-pci,
	linux-rockchip, Shawn Lin

On Wed, Nov 18, 2026 at 04:03:11PM +0000, James Le Cuirot wrote:
> Hello Wilfred,
> 
> Unfortunately, since your commit "PCI: dw-rockchip: Implement
> .reset_root_port() and use for link down" (b376b3ff9cb0527), I have been
> basically unable to boot my Quartz64 Model B from NVMe. Sometimes if I wait
> long enough, it will eventually work, albeit very slowly. If I revert this
> (and 4e9f69d08253) against 7.3.5, then it boots normally. Here is the relevant
> output.
> 
> rockchip-dw-pcie 3c0000000.pcie: host bridge /pcie@fe260000 ranges:
> rockchip-dw-pcie 3c0000000.pcie:       IO 0x00f4100000..0x00f41fffff -> 0x00f4100000
> rockchip-dw-pcie 3c0000000.pcie:      MEM 0x00f4200000..0x00f5ffffff -> 0x00f4200000
> rockchip-dw-pcie 3c0000000.pcie:      MEM 0x0300000000..0x033fffffff -> 0x0300000000
> rockchip-dw-pcie 3c0000000.pcie: iATU: unroll T, 8 ob, 8 ib, align 64K, limit 8G
> rockchip-dw-pcie 3c0000000.pcie: PCIe Gen.2 x1 link up

Here the link is reported as being up, at Gen2 speed.


> rockchip-dw-pcie 3c0000000.pcie: PCI host bridge to bus 0000:00
> pci_bus 0000:00: root bus resource [bus 00-0f]
> pci_bus 0000:00: root bus resource [io  0x0000-0xfffff] (bus address [0xf4100000-0xf41fffff])
> pci_bus 0000:00: root bus resource [mem 0xf4200000-0xf5ffffff]
> pci_bus 0000:00: root bus resource [mem 0x300000000-0x33fffffff]
> pci 0000:00:00.0: [1d87:3566] type 01 class 0x060400 PCIe Root Port
> pci 0000:00:00.0: ROM [mem 0x00000000-0x0000ffff pref]
> pci 0000:00:00.0: PCI bridge to [bus 01-ff]
> pci 0000:00:00.0:   bridge window [io  0x0000-0x0fff]
> pci 0000:00:00.0:   bridge window [mem 0x00000000-0x000fffff]
> pci 0000:00:00.0:   bridge window [mem 0x00000000-0x000fffff 64bit pref]
> pci 0000:00:00.0: supports D1 D2
> pci 0000:00:00.0: PME# supported from D0 D1 D3hot
> pci_bus 0000:01: busn_res: can not insert [bus 01-ff] under [bus 00-0f] (conflicts with (null) [bus 00-0f])
> pci 0000:01:00.0: [1e0f:0009] type 00 class 0x010802 PCIe Endpoint
> pci 0000:01:00.0: BAR 0 [mem 0x00000000-0x00003fff 64bit]
> pci 0000:01:00.0: 4.000 Gb/s available PCIe bandwidth, limited by 5.0 GT/s PCIe x1 link at 0000:00:00.0 (capable of 31.504 Gb/s with 8.0 GT/s PCIe x4 link)
> pci 0000:01:00.0: ASPM: default states L1
> pci 0000:00:00.0: bridge window [mem 0xf4200000-0xf42fffff]: assigned
> pci 0000:00:00.0: ROM [mem 0xf4300000-0xf430ffff pref]: assigned
> pci 0000:01:00.0: BAR 0 [mem 0xf4200000-0xf4203fff 64bit]: assigned
> pci 0000:00:00.0: PCI bridge to [bus 01-ff]
> pci 0000:00:00.0:   bridge window [mem 0xf4200000-0xf42fffff]
> pci_bus 0000:00: resource 4 [io  0x0000-0xfffff]
> pci_bus 0000:00: resource 5 [mem 0xf4200000-0xf5ffffff]
> pci_bus 0000:00: resource 6 [mem 0x300000000-0x33fffffff]
> pci_bus 0000:01: resource 1 [mem 0xf4200000-0xf42fffff]
> pcieport 0000:00:00.0: PME: Signaling with IRQ 86
> pcieport 0000:00:00.0: AER: enabled with IRQ 95
> pcieport 0000:00:00.0: Recovering Root Port due to Link Down

Here you get a link down IRQ.

Why is the link going down?

You seem to have already trained in Gen2, and your board seems to only
support Gen2 (so even if it was related to speed change - normally a
speed should not trigger a link down - a speed change does not seem to
happen here).


Perhaps you can enable CONFIG_PCIE_DW_DEBUGFS and then look at
/sys/kernel/debug/dwc_pcie_<dev>/
to try to see if that gives any more information about why the link goes down.

Like Wilfred said, you could also try to disable ASPM.

Also make sure that your device is attached to the slot properly (and
hopefully you are not using any extender cables or similar).


I guess we could also try to clear the interrupt just before unmasking it,
to see if this is a spurious interrupt, something like:

--- a/drivers/pci/controller/dwc/pcie-dw-rockchip.c
+++ b/drivers/pci/controller/dwc/pcie-dw-rockchip.c
@@ -692,7 +692,7 @@ static int rockchip_pcie_configure_rc(struct platform_device *pdev,
        struct device *dev = &pdev->dev;
        struct dw_pcie_rp *pp;
        int irq, ret;
-       u32 val;
+       u32 reg, val;

        if (!IS_ENABLED(CONFIG_PCIE_ROCKCHIP_DW_HOST))
                return -ENODEV;
@@ -739,6 +739,9 @@ static int rockchip_pcie_configure_rc(struct platform_device *pdev,
                return ret;
        }

+       reg = rockchip_pcie_readl_apb(rockchip, PCIE_CLIENT_INTR_STATUS_MISC);
+       rockchip_pcie_writel_apb(rockchip, reg, PCIE_CLIENT_INTR_STATUS_MISC);
+
        /* unmask hot reset/link-down reset */
        val = FIELD_PREP_WM16(PCIE_LINK_REQ_RST_NOT_INT, 0);
        rockchip_pcie_writel_apb(rockchip, val, PCIE_CLIENT_INTR_MASK_MISC);



Kind regards,
Niklas

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-11-19 10:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-18 16:03 PCI: dw-rockchip: Unable to boot Quartz64 Model B from NVMe since reset changes James Le Cuirot
2026-11-18 16:46 ` Niklas Cassel
2026-11-18 22:30   ` James Le Cuirot
2026-11-18 22:47     ` Wilfred Mallawa
2026-11-19 10:55 ` Niklas Cassel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox