raspberrypi / linux

Kernel source tree for Raspberry Pi-provided kernel builds. Issues unrelated to the linux kernel should be posted on the community forum at https://forums.raspberrypi.com/
Other
11.2k stars 5.03k forks source link

PCI: brcmstb: Force setting gen #6486

Closed ElDavoo closed 3 days ago

ElDavoo commented 4 days ago

Without this forgotten code block, my NVMe SSD does not get detected on my Pi 5. Please note I don't have other setups / testing equipment.

Closes #6484 .

popcornmix commented 3 days ago

The dev_info(pcie->dev, "Forcing gen %d\n", pcie->gen); should be dropped as the same message is output inside brcm_pcie_set_gen.

@P33M upstream has the call to brcm_pcie_set_gen in brcm_pcie_start_link (which is how we do it on 6.12 kernel). Can you see why the upstream way does not work? Should that call to brcm_pcie_start_link be removed?

P33M commented 3 days ago

In our case we set the link gen in brcm_pcie_setup() prior to releasing fundamental reset; upstream does it after during brcm_pcie_start_link(). Either the core only samples the value in the link control register before linkup and not after, or if the drive is unreliable at gen3 then it's already broken by the time the limit is imposed.

pelwell commented 3 days ago

Running sudo rpi-update pulls/6487 will install a trial build with @P33M's potential fix. Beta software, back up your data, etc.

ElDavoo commented 3 days ago

Superseded by #6487 which fixes it much better

popcornmix commented 3 days ago

Thanks for the detective work of finding out what was going wrong.