From 59e03ebf4cd5f4b1cbf5f6ff6281d372e519e6a6 Mon Sep 17 00:00:00 2001 From: Tim Crawford Date: Wed, 18 May 2022 16:00:34 -0600 Subject: [PATCH] mb/system76: TGL-U: Disable AER for CPU PCIe RP Disable PCIe Advanced Error Reporting on the CPU root port to prevent some SSDs from timing out on S0ix suspend. AER results in the drive not being able to switch from D3 back to D0. nvme 0000:01:00.0: can't change power state from D3cold to D0 (config space inaccessible) Known to affect at least the following SSD models: - ADATA XPG SX8200 Pro - Samsung 970 EVO Plus (FW version: 2B7QCXE7) Change-Id: I79da6b08ef1949f3bf1c6111aaa7e658bd29c0e2 Signed-off-by: Tim Crawford Reviewed-on: https://review.coreboot.org/c/coreboot/+/64080 Reviewed-by: Lean Sheng Tan Tested-by: build bot (Jenkins) --- src/mainboard/system76/darp7/ramstage.c | 6 ++++++ src/mainboard/system76/galp5/ramstage.c | 6 ++++++ src/mainboard/system76/lemp10/ramstage.c | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/src/mainboard/system76/darp7/ramstage.c b/src/mainboard/system76/darp7/ramstage.c index a3b12bb1f2..dd7e73c595 100644 --- a/src/mainboard/system76/darp7/ramstage.c +++ b/src/mainboard/system76/darp7/ramstage.c @@ -3,6 +3,12 @@ #include #include +void mainboard_silicon_init_params(FSP_S_CONFIG *params) +{ + // Disable AER to fix suspend failing with some SSDs. + params->CpuPcieRpAdvancedErrorReporting[0] = 0; +} + static void mainboard_init(void *chip_info) { mainboard_configure_gpios(); diff --git a/src/mainboard/system76/galp5/ramstage.c b/src/mainboard/system76/galp5/ramstage.c index dec2a89ee4..e2cbba5900 100644 --- a/src/mainboard/system76/galp5/ramstage.c +++ b/src/mainboard/system76/galp5/ramstage.c @@ -3,6 +3,12 @@ #include #include "gpio.h" +void mainboard_silicon_init_params(FSP_S_CONFIG *params) +{ + // Disable AER to fix suspend failing with some SSDs. + params->CpuPcieRpAdvancedErrorReporting[0] = 0; +} + static void mainboard_init(void *chip_info) { gpio_configure_pads(gpio_table, ARRAY_SIZE(gpio_table)); diff --git a/src/mainboard/system76/lemp10/ramstage.c b/src/mainboard/system76/lemp10/ramstage.c index a3b12bb1f2..dd7e73c595 100644 --- a/src/mainboard/system76/lemp10/ramstage.c +++ b/src/mainboard/system76/lemp10/ramstage.c @@ -3,6 +3,12 @@ #include #include +void mainboard_silicon_init_params(FSP_S_CONFIG *params) +{ + // Disable AER to fix suspend failing with some SSDs. + params->CpuPcieRpAdvancedErrorReporting[0] = 0; +} + static void mainboard_init(void *chip_info) { mainboard_configure_gpios();