• Luben Tuikov's avatar
    drm/amdgpu: Fix koops when accessing RAS EEPROM · 1d9d2ca8
    Luben Tuikov authored
    Debugfs RAS EEPROM files are available when
    the ASIC supports RAS, and when the debugfs is
    enabled, an also when "ras_enable" module
    parameter is set to 0. However in this case,
    we get a kernel oops when accessing some of
    the "ras_..." controls in debugfs. The reason
    for this is that struct amdgpu_ras::adev is
    unset. This commit sets it, thus enabling access
    to those facilities. Note that this facilitates
    EEPROM access and not necessarily RAS features or
    functionality.
    
    Cc: Alexander Deucher <Alexander.Deucher@amd.com>
    Cc: John Clements <john.clements@amd.com>
    Cc: Hawking Zhang <Hawking.Zhang@amd.com>
    Signed-off-by: default avatarLuben Tuikov <luben.tuikov@amd.com>
    Acked-by: default avatarAlexander Deucher <Alexander.Deucher@amd.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    1d9d2ca8
amdgpu_ras.c 63.3 KB