qcacmn: Move delayed-reg-work active_work_cnt decrement

Currently, we decrement active_work_cnt in a while loop in delayed
register worker and later on make a "allow_l1" call to enable L1ss.
The bus suspend routine depends on the value of active_work_cnt to
determine if any register writes are pending. In case there are, bus
suspend is rejected.
As a result its possible that when bus suspend happens, the
delayed worker while processing the last remaining enqueued
write,  makes the active_work_cnt to 0. This will allow the bus suspend
routine to continue to disable the bus, even before the
delayed-reg-worker has called allow_l1 and run to completion. This may
lead to a NOC error while calling "allow_l1" API from
delayed-reg-worker.

Hence, move the decrement of active_work_cnt to the very end in
hal_reg_write_work function.

Change-Id: Iec602f97c953df1c6a018310fd02ab458547ce3a
CRs-fixed: 2813733
This commit is contained in:
Mohit Khanna
2020-11-11 16:45:00 -08:00
committed by snandini
parent 98f8f751dc
commit a939d20dbf
2 changed files with 16 additions and 5 deletions

View File

@@ -11526,8 +11526,6 @@ static QDF_STATUS dp_bus_suspend(struct cdp_soc_t *soc_hdl, uint8_t pdev_id)
dp_service_mon_rings(soc, DP_MON_REAP_BUDGET);
}
hal_flush_reg_write_work(soc->hal_soc);
return QDF_STATUS_SUCCESS;
}