Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux kernel build failed when CONFIG_PCIEASPM is OFF #16

Open
lihing1994 opened this issue Jul 16, 2024 · 1 comment
Open

Linux kernel build failed when CONFIG_PCIEASPM is OFF #16

lihing1994 opened this issue Jul 16, 2024 · 1 comment

Comments

@lihing1994
Copy link

Hi all,

I recently faced an issue where the NVMe 1.4 SSD is not working properly on the NVIDIA Jetson platform. In the Linux kernel boot log, I get the following error message:

[   46.404328] pcieport 0000:00:00.0: AER: Corrected error received: 0000:00:00.0
[   46.405508] pcieport 0000:00:00.0:   device [10de:1ad0] error status/mask=00000001/0000e000
[  110.499436] pcieport 0000:00:00.0: AER: Corrected error received: 0000:00:00.0
[  110.499735] pcieport 0000:00:00.0:   device [10de:1ad0] error status/mask=00000001/0000e000
[  122.408529] pcieport 0000:00:00.0: AER: Corrected error received: 0000:00:00.0
[  122.408878] pcieport 0000:00:00.0:   device [10de:1ad0] error status/mask=00000001/0000e000
[  139.936480] pcieport 0000:00:00.0: AER: Corrected error received: 0000:00:00.0
[  139.936843] pcieport 0000:00:00.0:   device [10de:1ad0] error status/mask=00000001/0000e000
[  189.417534] pcieport 0000:00:00.0: AER: Corrected error received: 0000:00:00.0
[  189.417871] pcieport 0000:00:00.0:   device [10de:1ad0] error status/mask=00000001/0000e000
[  215.884735] pcieport 0000:00:00.0: AER: Corrected error received: 0000:00:00.0
[  215.885062] pcieport 0000:00:00.0:   device [10de:1ad0] error status/mask=00000001/0000e000
[  225.355828] pcieport 0000:00:00.0: AER: Corrected error received: 0000:00:00.0
[  225.356245] pcieport 0000:00:00.0:   device [10de:1ad0] error status/mask=00000001/0000e000
  • After some research, people suggested turning off CONFIG_PCIEASPM in the Linux kernel configuration.
  • However, after I turned this configuration off, the pcie-tegra194.c file had a compiling error. It appears that the failure is due to the tegra_pcie_prepare_host function in pcie-tegra194.c calling the functions disable_aspm_l0s and disable_aspm_l10. These functions are defined only if CONFIG_PCIEASPM is enabled. (For details, see line #1181 and line #1305 in the same pcie-tegra194.c file.)
  • I added the following two function signatures at line #1305 and the kernel build passed:
static inline void disable_aspm_l0s(struct tegra_pcie_dw *pcie) { return; }
static inline void disable_aspm_l10(struct tegra_pcie_dw *pcie) { return; }
  • I am not 100% sure, but it seems like CONFIG_PCIEASPM does not need to be turned on, and source code in pcie-tegra194.c does use the #if defined to handle the situation when it is off. I think these two function definitions were simply omitted at line #1305.
@madisongh
Copy link
Member

I think you're right. NVIDIA doesn't do much, if any, build testing with kernel configurations they don't use in their BSP, so it was probably just an oversight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants