@sinovoip@simon can you confirm this or give mtk (Jianjun Wang) the full shematic?
Can anyone (maybe @RRKh61@f11@doudootiana ) please try to remove the existing msleep(100) above the patch and test if the issue is still fixed? As i do not had the issue i cannot verify itā¦seems to only happen with some special m.2 devices
For the dmesg output attached Iāve taken notes and placed those at the beginning of those files to attempt to make it clear what each dmesg output pertains to. This includes noting if the PCI root is visible in lspci on cold boot as well as the nvme drive, and including the patch used on the kernel that the output was produced from.
No patch
In general, the PCI root doesnāt appear, but sometimes it and the nvme drive will show up on a cold boot, itās exceedingly rare though. bpir3-dmesg-and-notes.txt (27.1 KB)
jianjunās patch, as posted.
This was the same as no-patch. It looks to me that the patch is missing a write to the device registers between /* De-assert reset signals */ and the msleep(90). bpir3-jianjun-patch-dmesg-and-notes.txt (28.0 KB)
jianjunās patch with writel_relaxed(val, pcie->base + PCIE_RST_CTRL_REG); inserted after val &= ~(PCIE_MAC_RSTB | PCIE_PHY_RSTB | PCIE_BRG_RSTB);, patch included in the attached dmesg, which should retain formatting. I cold-booted this one 5 times and each time received the PCI root, but no NVMe device.
bpir3-jianjun-patch-modified-dmesg-and-notes.txt (28.9 KB)