@@ -6201,14 +6201,15 @@ static void amdgpu_device_recovery_put_reset_lock(struct amdgpu_device *adev,
6201
6201
amdgpu_device_unlock_reset_domain (tmp_adev -> reset_domain );
6202
6202
}
6203
6203
6204
- static int amdgpu_device_halt_activities (
6205
- struct amdgpu_device * adev , struct amdgpu_job * job ,
6206
- struct amdgpu_reset_context * reset_context ,
6207
- struct list_head * device_list , struct amdgpu_hive_info * hive ,
6208
- bool need_emergency_restart )
6204
+ static void amdgpu_device_halt_activities (struct amdgpu_device * adev ,
6205
+ struct amdgpu_job * job ,
6206
+ struct amdgpu_reset_context * reset_context ,
6207
+ struct list_head * device_list ,
6208
+ struct amdgpu_hive_info * hive ,
6209
+ bool need_emergency_restart )
6209
6210
{
6210
6211
struct amdgpu_device * tmp_adev = NULL ;
6211
- int i , r = 0 ;
6212
+ int i ;
6212
6213
6213
6214
/* block all schedulers and reset given job's ring */
6214
6215
list_for_each_entry (tmp_adev , device_list , reset_list ) {
@@ -6260,8 +6261,6 @@ static int amdgpu_device_halt_activities(
6260
6261
}
6261
6262
atomic_inc (& tmp_adev -> gpu_reset_counter );
6262
6263
}
6263
-
6264
- return r ;
6265
6264
}
6266
6265
6267
6266
static int amdgpu_device_asic_reset (struct amdgpu_device * adev ,
@@ -6473,11 +6472,8 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,
6473
6472
/* We need to lock reset domain only once both for XGMI and single device */
6474
6473
amdgpu_device_recovery_get_reset_lock (adev , & device_list );
6475
6474
6476
- r = amdgpu_device_halt_activities (adev , job , reset_context , & device_list ,
6477
- hive , need_emergency_restart );
6478
- if (r )
6479
- goto reset_unlock ;
6480
-
6475
+ amdgpu_device_halt_activities (adev , job , reset_context , & device_list ,
6476
+ hive , need_emergency_restart );
6481
6477
if (need_emergency_restart )
6482
6478
goto skip_sched_resume ;
6483
6479
/*
@@ -6889,7 +6885,6 @@ pci_ers_result_t amdgpu_pci_error_detected(struct pci_dev *pdev, pci_channel_sta
6889
6885
struct amdgpu_hive_info * hive = amdgpu_get_xgmi_hive (adev );
6890
6886
struct amdgpu_reset_context reset_context ;
6891
6887
struct list_head device_list ;
6892
- int r = 0 ;
6893
6888
6894
6889
dev_info (adev -> dev , "PCI error: detected callback!!\n" );
6895
6890
@@ -6916,14 +6911,12 @@ pci_ers_result_t amdgpu_pci_error_detected(struct pci_dev *pdev, pci_channel_sta
6916
6911
6917
6912
amdgpu_device_recovery_prepare (adev , & device_list , hive );
6918
6913
amdgpu_device_recovery_get_reset_lock (adev , & device_list );
6919
- r = amdgpu_device_halt_activities (adev , NULL , & reset_context , & device_list ,
6920
- hive , false);
6914
+ amdgpu_device_halt_activities (adev , NULL , & reset_context , & device_list ,
6915
+ hive , false);
6921
6916
if (hive ) {
6922
6917
mutex_unlock (& hive -> hive_lock );
6923
6918
amdgpu_put_xgmi_hive (hive );
6924
6919
}
6925
- if (r )
6926
- return PCI_ERS_RESULT_DISCONNECT ;
6927
6920
return PCI_ERS_RESULT_NEED_RESET ;
6928
6921
case pci_channel_io_perm_failure :
6929
6922
/* Permanent error, prepare for device removal */
0 commit comments