drm/amdgpu: return error when eeprom checksum failed
Subsystems (2)
PATCH 1/1 drm/amdgpu: return error when eeprom checksum failed
Return eeprom table checksum error result, otherwise it might be overwritten by next call.
Signed-off-by Jinzhou Su <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c +3 -1
@@ -1412,9 +1412,11 @@ int amdgpu_ras_eeprom_init(struct amdgpu_ras_eeprom_control *control) } res =__verify_ras_table_checksum (control); -if (res) +if (res) {DRM_ERROR ("RAS Table incorrect checksum or error:%d\n" , res); +return -EINVAL ; + }if (ras->bad_page_cnt_threshold > control->ras_num_recs) {/* This means that, the threshold was increased since * the last time the system was booted, and now,
Signature · 1 line
2.43.0
[AMD Official Use Only - AMD Internal Distribution Only]
Please replace DRM_ERROR with dev_err. Other than that, the patch looks good to me.
Regards,
Hawking
-----Original Message-----
From: Su, Joe <[email protected]>
Sent: Monday, December 2, 2024 11:30 AM
To: [email protected]
Cc: Zhang, Hawking <[email protected]>; Yang, Stanley <[email protected]>; Su, Joe <[email protected]>
Subject: [PATCH] drm/amdgpu: return error when eeprom checksum failed
Return eeprom table checksum error result, otherwise it might be overwritten by next call.
Signed-off-by Jinzhou Su <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c +3 -1
@@ -1412,9 +1412,11 @@ int amdgpu_ras_eeprom_init(struct amdgpu_ras_eeprom_control *control) } res =__verify_ras_table_checksum (control); -if (res) +if (res) {DRM_ERROR ("RAS Table incorrect checksum or error:%d\n" , res); +return -EINVAL ; + }if (ras->bad_page_cnt_threshold > control->ras_num_recs) {/* This means that, the threshold was increased since * the last time the system was booted, and now,
--
2.43.0