OSDN Git Service

drm/amdgpu: SRIOV flr_work should use down_write
authorVictor Skvortsov <victor.skvortsov@amd.com>
Mon, 13 Dec 2021 21:38:20 +0000 (21:38 +0000)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 14 Dec 2021 21:09:02 +0000 (16:09 -0500)
commitfa4a427d84f9b797970a3d5139d7645403e4e989
treefda41e1938cfb9893909e316c40f65ab9144e3a9
parentb4acd97bf827122bd333a4d043c275a4eb9db905
drm/amdgpu: SRIOV flr_work should use down_write

Host initiated VF FLR may fail if someone else is
already holding a read_lock. Change from down_write_trylock
to down_write to guarantee the reset goes through.

Signed-off-by: Victor Skvortsov <victor.skvortsov@amd.com>
Reviewed by: Shaoyun.liu <Shaoyun.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c
drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c