The EEPROM table is tagged as over threshold while the new bad page records are written out, so the table status queried while the records are only queued still reports the table as writable. The device is therefore never flagged as having reached the threshold and neither the in-band CPER record nor the out-of-band RMA reason is emitted.
Re-evaluate the table status once the records have been appended, so the report is driven by the state that was just persisted. Signed-off-by: Xiang Liu <[email protected]> --- drivers/gpu/drm/amd/ras/core/ras_umc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/amd/ras/core/ras_umc.c b/drivers/gpu/drm/amd/ras/core/ras_umc.c index b3f30da19a78..c2663f84a883 100644 --- a/drivers/gpu/drm/amd/ras/core/ras_umc.c +++ b/drivers/gpu/drm/amd/ras/core/ras_umc.c @@ -848,6 +848,13 @@ static int ras_umc_save_bad_pages(struct ras_core_context *ras_core) RAS_DEV_INFO(ras_core->dev, "Saved %d pages to EEPROM table.\n", ras_umc_count_valid_pages(ras_core, &data->bps[eeprom_record_num], save_count)); + + /* The table is only tagged as over threshold while the new + * records are written out, so the status has to be + * re-evaluated here. + */ + ras_eeprom_mgr_check_and_report_status(ras_core, true); + ras_umc_report_badpage_info(ras_core); } exit: -- 2.34.1
