mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
drm/amdgpu: Check pcie replays reporting support
Check if pcie replay count reporting is supported before creating sysfs attribute. Signed-off-by: Lijo Lazar <lijo.lazar@amd.com> Acked-by: Mangesh Gadre <Mangesh.Gadre@amd.com> Reviewed-by: Asad Kamal <asad.kamal@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -232,7 +232,7 @@ static int amdgpu_device_attr_sysfs_init(struct amdgpu_device *adev)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
if (!amdgpu_sriov_vf(adev))
|
||||
if (amdgpu_nbio_is_replay_cnt_supported(adev))
|
||||
ret = sysfs_create_file(&adev->dev->kobj,
|
||||
&dev_attr_pcie_replay_count.attr);
|
||||
|
||||
@@ -241,7 +241,7 @@ static int amdgpu_device_attr_sysfs_init(struct amdgpu_device *adev)
|
||||
|
||||
static void amdgpu_device_attr_sysfs_fini(struct amdgpu_device *adev)
|
||||
{
|
||||
if (!amdgpu_sriov_vf(adev))
|
||||
if (amdgpu_nbio_is_replay_cnt_supported(adev))
|
||||
sysfs_remove_file(&adev->dev->kobj,
|
||||
&dev_attr_pcie_replay_count.attr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user