qcacmn: Fix different lock being released than taken
1. Fix a case in dp where lock is taken on tso segment but released on tso desc. 2. Increment dma alloc size if allocation is successful Change-Id: I73d54026a1c268597105096925d138008c2d8c1e CRs-Fixed: 2131278
This commit is contained in:

committed by
snandini

parent
9d30d63775
commit
fcb34c7f2c
@@ -461,7 +461,7 @@ void dp_tx_tso_num_seg_pool_free(struct dp_soc *soc, uint8_t pool_id)
|
|||||||
c_element = soc->tx_tso_num_seg[pool_id].freelist;
|
c_element = soc->tx_tso_num_seg[pool_id].freelist;
|
||||||
|
|
||||||
if (!c_element) {
|
if (!c_element) {
|
||||||
TX_DESC_LOCK_UNLOCK(&soc->tx_tso_desc[pool_id].lock);
|
TX_DESC_LOCK_UNLOCK(&soc->tx_tso_num_seg[pool_id].lock);
|
||||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_ERROR,
|
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_ERROR,
|
||||||
FL("Desc Pool Corrupt %d"), pool_id);
|
FL("Desc Pool Corrupt %d"), pool_id);
|
||||||
return;
|
return;
|
||||||
|
@@ -1616,7 +1616,9 @@ void *qdf_mem_alloc_consistent(qdf_device_t osdev, void *dev, qdf_size_t size,
|
|||||||
if (alloc_mem == NULL)
|
if (alloc_mem == NULL)
|
||||||
qdf_print("%s Warning: unable to alloc consistent memory of size %zu!\n",
|
qdf_print("%s Warning: unable to alloc consistent memory of size %zu!\n",
|
||||||
__func__, size);
|
__func__, size);
|
||||||
|
else
|
||||||
qdf_mem_dma_inc(size);
|
qdf_mem_dma_inc(size);
|
||||||
|
|
||||||
return alloc_mem;
|
return alloc_mem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user