mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: skip nvlink shutdown on invalid gpu state
A dGPU can disappear from PCI bus for various reasons. This is detected while accessing GPU registers and system is rebooted. If dGPU has disappeared from the system, driver shutdown cannot access dGPU registers. Skip any such de-initialization (nvlink) done during shutdown. Bug 200505461 Change-Id: Ief2e84212421093e57e63ff5958b209bd6857db9 Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2093302 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
66cb9495a5
commit
6789a862e6
@@ -747,8 +747,11 @@ void nvgpu_pci_shutdown(struct pci_dev *pdev)
|
||||
if (gk20a_gpu_is_virtual(dev))
|
||||
return;
|
||||
|
||||
err = nvgpu_nvlink_deinit(g);
|
||||
WARN(err, "gpu failed to remove nvlink");
|
||||
if (is_nvgpu_gpu_state_valid(g)) {
|
||||
err = nvgpu_nvlink_deinit(g);
|
||||
WARN(err, "gpu failed to remove nvlink");
|
||||
} else
|
||||
nvgpu_err(g, "skipped nvlink deinit");
|
||||
|
||||
nvgpu_info(g, "shut down complete");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user