[PATCH 3/3] drm/madgpu: Fix EEPROM Checksum calculation.

Chen, Guchun Guchun.Chen at amd.com
Thu Sep 5 02:56:59 UTC 2019


Reviewed-by: Guchun Chen <guchun.chen at amd.com>


-----Original Message-----
From: Andrey Grodzovsky <andrey.grodzovsky at amd.com> 
Sent: Thursday, September 5, 2019 10:50 AM
To: amd-gfx at lists.freedesktop.org
Cc: alexdeucher at gmail.com; Zhang, Hawking <Hawking.Zhang at amd.com>; Zhou1, Tao <Tao.Zhou1 at amd.com>; Chen, Guchun <Guchun.Chen at amd.com>; Saceleanu, Cristian <Cristian.Saceleanu at amd.com>; Grodzovsky, Andrey <Andrey.Grodzovsky at amd.com>
Subject: [PATCH 3/3] drm/madgpu: Fix EEPROM Checksum calculation.

Fix typo which messed up the calculation.

Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c
index 8a32b5c..43dd4ab 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c
@@ -226,8 +226,8 @@ static void __decode_table_record_from_buff(struct amdgpu_ras_eeprom_control *co
 	record->offset = (le64_to_cpu(tmp) & 0xffffffffffff);
 	i += 6;
 
-	buff[i++] = record->mem_channel;
-	buff[i++] = record->mcumc_id;
+	record->mem_channel = buff[i++];
+	record->mcumc_id = buff[i++];
 
 	memcpy(&tmp, buff + i,  6);
 	record->retired_page = (le64_to_cpu(tmp) & 0xffffffffffff);
-- 
2.7.4



More information about the amd-gfx mailing list