diff --git a/drivers/gpu/nvgpu/common/pmu/fw/fw.c b/drivers/gpu/nvgpu/common/pmu/fw/fw.c index 9bc5cb5d1..ce9682de7 100644 --- a/drivers/gpu/nvgpu/common/pmu/fw/fw.c +++ b/drivers/gpu/nvgpu/common/pmu/fw/fw.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2019, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2017-2020, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -118,6 +118,15 @@ int nvgpu_pmu_wait_fw_ack_status(struct gk20a *g, struct nvgpu_pmu *pmu, nvgpu_rmb(); if (nvgpu_can_busy(g) == 0) { + /* + * Since the system is shutting down so we don't + * wait for the ACK from PMU. + * Set ACK received so that state machine is maintained + * properly and falcon stats are not dumped due to + * PMU command failure + */ + + *(volatile u8 *)var = val; return 0; } @@ -132,6 +141,7 @@ int nvgpu_pmu_wait_fw_ack_status(struct gk20a *g, struct nvgpu_pmu *pmu, if (*(volatile u8 *)var == val) { return 0; } + } while (nvgpu_timeout_expired(&timeout) == 0); return -ETIMEDOUT;