qcacmn: Fix race condition during IPA map/unmap handling
While Rx buffers are getting umapped from net rx context if IPA pipes are enabled at same time from MC thread context this is leading to race condition and IPA map/unmap is going out of sync. To fix this introducing IPA mapping lock and IPA mapping need to be handled with lock held. Change-Id: I9fa71bdb6d4e4aa93fc795cc5dd472a181325991 CRs-Fixed: 2945063
This commit is contained in:

committed by
Madan Koyyalamudi

parent
7d79770907
commit
cfbfcf3b21
@@ -1440,6 +1440,32 @@ void *hal_srng_dst_get_next_cached(void *hal_soc,
|
||||
return (void *)desc;
|
||||
}
|
||||
|
||||
static inline int hal_srng_lock(hal_ring_handle_t hal_ring_hdl)
|
||||
{
|
||||
struct hal_srng *srng = (struct hal_srng *)hal_ring_hdl;
|
||||
|
||||
if (qdf_unlikely(!hal_ring_hdl)) {
|
||||
qdf_print("error: invalid hal_ring\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
SRNG_LOCK(&(srng->lock));
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int hal_srng_unlock(hal_ring_handle_t hal_ring_hdl)
|
||||
{
|
||||
struct hal_srng *srng = (struct hal_srng *)hal_ring_hdl;
|
||||
|
||||
if (qdf_unlikely(!hal_ring_hdl)) {
|
||||
qdf_print("error: invalid hal_ring\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
SRNG_UNLOCK(&(srng->lock));
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* hal_srng_dst_get_next_hp - Get next entry from a destination ring and move
|
||||
* cached head pointer
|
||||
|
Reference in New Issue
Block a user