mirror of
https://github.com/torvalds/linux.git
synced 2024-12-26 21:02:19 +00:00
habanalabs: check schedule_hard_reset correctly
schedule_hard_reset can be true only if we didn't do hard-reset. Therefore, no point of checking it in case hard_reset is true. Signed-off-by: Oded Gabbay <ogabbay@kernel.org> Reviewed-by: Tomer Tayar <ttayar@habana.ai>
This commit is contained in:
parent
bc8e4bae70
commit
f69c3e460a
@ -1737,18 +1737,19 @@ kill_processes:
|
||||
* the device will be operational although it shouldn't be
|
||||
*/
|
||||
hdev->asic_funcs->enable_events_from_fw(hdev);
|
||||
} else if (!reset_upon_device_release) {
|
||||
hdev->reset_info.compute_reset_cnt++;
|
||||
}
|
||||
} else {
|
||||
if (!reset_upon_device_release)
|
||||
hdev->reset_info.compute_reset_cnt++;
|
||||
|
||||
if (schedule_hard_reset) {
|
||||
dev_info(hdev->dev, "Performing hard reset scheduled during compute reset\n");
|
||||
flags = hdev->reset_info.hard_reset_schedule_flags;
|
||||
hdev->reset_info.hard_reset_schedule_flags = 0;
|
||||
hdev->disabled = true;
|
||||
hard_reset = true;
|
||||
handle_reset_trigger(hdev, flags);
|
||||
goto again;
|
||||
if (schedule_hard_reset) {
|
||||
dev_info(hdev->dev, "Performing hard reset scheduled during compute reset\n");
|
||||
flags = hdev->reset_info.hard_reset_schedule_flags;
|
||||
hdev->reset_info.hard_reset_schedule_flags = 0;
|
||||
hdev->disabled = true;
|
||||
hard_reset = true;
|
||||
handle_reset_trigger(hdev, flags);
|
||||
goto again;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user