qcacmn: Avoid shadow register access when link is down

When the scheduler thread initiates the WMA_SET_BSSKEY_REQ
we send CMD_UPDATE_RX_REO_QUEUE to REO srng. This is done by
posting a descriptor to the reo command ring and then we
update the HP so that the HW can consume the descriptor.
Avoid accessing HP shadow address when we are in runtime
suspend state. Perform a hif_pm_runtime_get to resume the
link and access the shadow register and once done initiate a
hif_pm_runtime_put to allow device to go into runtime
suspend.

Change-Id: I24c3e046a5769f03a0f1969360cccdbe55b81d45
CRs-Fixed: 2495720
Šī revīzija ir iekļauta:
Venkata Sharath Chandra Manchala
2019-08-01 11:22:04 -07:00
revīziju iesūtīja nshrivas
vecāks 1f79c8fbe0
revīzija 5ee6efde61
3 mainīti faili ar 34 papildinājumiem un 10 dzēšanām

Parādīt failu

@@ -684,6 +684,7 @@ inline int hal_reo_cmd_update_rx_queue(hal_ring_handle_t hal_ring_hdl,
struct hal_soc *hal_soc = (struct hal_soc *)hal_soc_hdl;
uint32_t *reo_desc, val;
struct hal_reo_cmd_update_queue_params *p;
struct hal_srng *srng = (struct hal_srng *)hal_ring_hdl;
p = &cmd->u.upd_queue_params;
@@ -880,7 +881,14 @@ inline int hal_reo_cmd_update_rx_queue(hal_ring_handle_t hal_ring_hdl,
HAL_DESC_SET_FIELD(reo_desc, REO_UPDATE_RX_REO_QUEUE_8,
PN_127_96, p->pn_127_96);
hal_srng_access_end(hal_soc, hal_ring_hdl);
if (hif_pm_runtime_get(hal_soc->hif_handle) == 0) {
hal_srng_access_end(hal_soc_hdl, hal_ring_hdl);
hif_pm_runtime_put(hal_soc->hif_handle);
} else {
hal_srng_access_end_reap(hal_soc_hdl, hal_ring_hdl);
srng->needs_flush++;
}
val = reo_desc[CMD_HEADER_DW_OFFSET];
return HAL_GET_FIELD(UNIFORM_REO_CMD_HEADER_0, REO_CMD_NUMBER,
val);