Skip to contentSkip to conversation

drm/amdgpu: return when ras table checksum is error

PATCH In review Gangliang Xie 3 participants 3 messages Feb 9 – Feb 10

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: return when ras table checksum is error

end the function flow when ras table checksum is error

---
 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
index 2c5d7f87e593..6fba9d5b29ea 100644
@@ -1701,10 +1701,12 @@ int amdgpu_ras_eeprom_check(struct amdgpu_ras_eeprom_control *control)
 		}
 
 		res = __verify_ras_table_checksum(control);
-		if (res)
+		if (res) {
 			dev_err(adev->dev,
 				"RAS table incorrect checksum or error:%d\n",
 				res);
+			return -EINVAL;
+		}
 
 		/* Warn if we are at 90% of the threshold or above
 		 */
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only - AMD Internal Distribution Only]

Quoted 37 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Gangliang Xie
Sent: Monday, February 9, 2026 4:36 AM
To: [email protected]
Cc: Zhou1, Tao <[email protected]>; Xie, Patrick <[email protected]>
Subject: [PATCH] drm/amdgpu: return when ras table checksum is error

end the function flow when ras table checksum is error

---
 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
index 2c5d7f87e593..6fba9d5b29ea 100644
@@ -1701,10 +1701,12 @@ int amdgpu_ras_eeprom_check(struct
 amdgpu_ras_eeprom_control *control)
              }
 
              res = __verify_ras_table_checksum(control);
-             if (res)
+             if (res) {
                      dev_err(adev->dev,
                              "RAS table incorrect checksum or error:%d\n",
                              res);
+                     return -EINVAL;
+             }
 
              /* Warn if we are at 90% of the threshold or above
               */

--
2.34.1

Reviewed-by on v1 1/1
#2 lore raw
In reply to Gangliang Xie

[AMD Official Use Only - AMD Internal Distribution Only]

Quoted 36 lines

-----Original Message-----
From: Xie, Patrick <[email protected]>
Sent: Monday, February 9, 2026 5:36 PM
To: [email protected]
Cc: Zhou1, Tao <[email protected]>; Xie, Patrick <[email protected]>
Subject: [PATCH] drm/amdgpu: return when ras table checksum is error

end the function flow when ras table checksum is error

---
 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
index 2c5d7f87e593..6fba9d5b29ea 100644
@@ -1701,10 +1701,12 @@ int amdgpu_ras_eeprom_check(struct
 amdgpu_ras_eeprom_control *control)
              }
 
              res = __verify_ras_table_checksum(control);
-             if (res)
+             if (res) {
                      dev_err(adev->dev,
                              "RAS table incorrect checksum or error:%d\n",
                              res);
+                     return -EINVAL;
+             }
 
              /* Warn if we are at 90% of the threshold or above
               */

--
2.34.1