drm/amdgpu: Fix wrap-around bugs in RAS
authorLuben Tuikov <luben.tuikov@amd.com>
Tue, 2 Feb 2021 23:36:25 +0000 (18:36 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 1 Jul 2021 04:24:40 +0000 (00:24 -0400)
commitedb63a53081d37679c5145a8125f5df105bc131e
treef8fbada54889dd259a88effe8a443a959e15910b
parentccdfbfec9e1ca0c920e7c7ffeb874eb17d6b880c
drm/amdgpu: Fix wrap-around bugs in RAS

Fix the size of the EEPROM from 256000 bytes
to 262144 bytes (256 KiB).

Fix a couple or wrap around bugs. If a valid
value/address is 0 <= addr < size, the inverse of
this inequality (barring negative values which
make no sense here) is addr >= size. Fix this in
the RAS code.

Cc: Jean Delvare <jdelvare@suse.de>
Cc: Alexander Deucher <Alexander.Deucher@amd.com>
Cc: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Cc: Lijo Lazar <Lijo.Lazar@amd.com>
Cc: Stanley Yang <Stanley.Yang@amd.com>
Cc: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
Acked-by: Alexander Deucher <Alexander.Deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c