mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
drm/amd/ras: add error handling for seqno operations
Add error handling for seqno operations. Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Tao Zhou <tao.zhou1@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
d334319060
commit
d35e1086b0
|
|
@ -498,8 +498,10 @@ uint64_t amdgpu_ras_mgr_gen_ras_event_seqno(struct amdgpu_device *adev,
|
|||
if ((seqno_type == RAS_SEQNO_TYPE_DE) ||
|
||||
(seqno_type == RAS_SEQNO_TYPE_POISON_CONSUMPTION)) {
|
||||
ret = ras_core_put_seqno(ras_mgr->ras_core, seqno_type, seq_no);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
RAS_DEV_WARN(adev, "There are too many ras interrupts!");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return seq_no;
|
||||
|
|
|
|||
|
|
@ -196,9 +196,9 @@ uint64_t ras_core_gen_seqno(struct ras_core_context *ras_core,
|
|||
{
|
||||
uint64_t seqno = 0;
|
||||
|
||||
if (ras_core->sys_fn &&
|
||||
ras_core->sys_fn->gen_seqno)
|
||||
ras_core->sys_fn->gen_seqno(ras_core, type, &seqno);
|
||||
if (ras_core->sys_fn && ras_core->sys_fn->gen_seqno &&
|
||||
ras_core->sys_fn->gen_seqno(ras_core, type, &seqno))
|
||||
return 0;
|
||||
|
||||
return seqno;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user