@@ -6201,14 +6201,15 @@ static void amdgpu_device_recovery_put_reset_lock(struct amdgpu_device *adev,
62016201 amdgpu_device_unlock_reset_domain (tmp_adev -> reset_domain );
62026202}
62036203
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 )
62096210{
62106211 struct amdgpu_device * tmp_adev = NULL ;
6211- int i , r = 0 ;
6212+ int i ;
62126213
62136214 /* block all schedulers and reset given job's ring */
62146215 list_for_each_entry (tmp_adev , device_list , reset_list ) {
@@ -6260,8 +6261,6 @@ static int amdgpu_device_halt_activities(
62606261 }
62616262 atomic_inc (& tmp_adev -> gpu_reset_counter );
62626263 }
6263-
6264- return r ;
62656264}
62666265
62676266static int amdgpu_device_asic_reset (struct amdgpu_device * adev ,
@@ -6473,11 +6472,8 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,
64736472 /* We need to lock reset domain only once both for XGMI and single device */
64746473 amdgpu_device_recovery_get_reset_lock (adev , & device_list );
64756474
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 );
64816477 if (need_emergency_restart )
64826478 goto skip_sched_resume ;
64836479 /*
@@ -6889,7 +6885,6 @@ pci_ers_result_t amdgpu_pci_error_detected(struct pci_dev *pdev, pci_channel_sta
68896885 struct amdgpu_hive_info * hive = amdgpu_get_xgmi_hive (adev );
68906886 struct amdgpu_reset_context reset_context ;
68916887 struct list_head device_list ;
6892- int r = 0 ;
68936888
68946889 dev_info (adev -> dev , "PCI error: detected callback!!\n" );
68956890
@@ -6916,14 +6911,12 @@ pci_ers_result_t amdgpu_pci_error_detected(struct pci_dev *pdev, pci_channel_sta
69166911
69176912 amdgpu_device_recovery_prepare (adev , & device_list , hive );
69186913 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);
69216916 if (hive ) {
69226917 mutex_unlock (& hive -> hive_lock );
69236918 amdgpu_put_xgmi_hive (hive );
69246919 }
6925- if (r )
6926- return PCI_ERS_RESULT_DISCONNECT ;
69276920 return PCI_ERS_RESULT_NEED_RESET ;
69286921 case pci_channel_io_perm_failure :
69296922 /* Permanent error, prepare for device removal */
0 commit comments