From IPAv4.5 versions IPA_TOS_EQ is considered as not supported
and it made to 0XFF, instead IPA_IS_PURE_ACK is given support.
So, when validating the bitfield equations of them, passing
eq_bitfield[i] will throw shift overflow warning as it takes 0xFF.
So, added change to ensure there are no overflow warnings.
Change-Id: I84384723433706784a4ef21b88f33b036edb0a5d
Signed-off-by: Jagadeesh Ponduru <quic_jponduru@quicinc.com>
Added some NULL checks to avoid memcpy with zero size,
Updated checks for unsigned integer variables.
Change-Id: Ia426da6b1af04fb5226ba9bbf22f0fce11e4dff0
Signed-off-by: Raghavendar rao l <quic_rlomte@quicinc.com>
Updated change to avoid race condition and NULL pointer access,
In case of SSR and ioctl call while performing QMI transaction.
Change-Id: I09dbf33d76a3a0d9e4917e62aaf1257a1abe2db9
Signed-off-by: Raghavendar rao l <quic_rlomte@quicinc.com>
In SSR scenario if QMI response delayed SSR events getting timeout,
To avoid this issue reduce the QMI timeout value from 60sec to 10sec.
Change-Id: Ib0113a91f9bd60b3ea0e374bf249d4859a22a040
Signed-off-by: Ashok Vuyyuru <quic_avuyyuru@quicinc.com>
Set the ipa3_ctx->logbuf NULL after destroy,or
IPAERR will use the ipa3_ctx->logbuf after free it,
that can make crash
Change-Id: I470c4a043d426d7620c01fadac1f1cd12ad54b08
The pointer should be event ring pointer, not transfer
ring pointer, it has chance to get wrong upper 32 bits
when smmu is disabled.
Signed-off-by: Cheng Zeng <quic_chenzeng@quicinc.com>
In deep sleep suspend/resume scenario destroy the uC interrupts
in suspend and reinitialize the interrupts in resume
Change-Id: Ib3631cef8e1e78651b6b79aef7f3d65dae0411c2
Signed-off-by: Ashok Vuyyuru <quic_avuyyuru@quicinc.com>
In suspend abort scenario before receving suspend callback and resume
it again causing issues. To avoid this scenario only if suspend completed
doing resume operation.
Change-Id: I0cf08b4e9ab4f74c44d4bcb14f9472b8332b5f7b
Update change to disable gsi fifo and gsi test bus
registers as these cannot be accessed through IPA_AP.
Change-Id: Icd7c85101a8997eff08acc98dbc1ead7b6067c81
Signed-off-by: Jagadeesh Ponduru <quic_jponduru@quicinc.com>
During NAT table Initialization parameter pass from HLOS, if max/zero
table entries passed it was leading to out of bound read. Adding checks
to validate the table entries before passing to NAT table parameter.
Signed-off-by: Himansu Nayak <quic_himansu@quicinc.com>
Updated change to perform ipa pre initialization even before
attempting to load the ipa firmware along with pdev node
initialization for non smmu target.
Change-Id: I04421c1f11f0c7b4d7a0f30135741946b157aa2c
Signed-off-by: Raghavendar rao l <quic_rlomte@quicinc.com>
Changes to save the IPA/GSI hardware contents onto ipa_reg_save
structure before to crash from APPS side, This support is
starting from IPA 4.5 version uptill 4.11.
Signed-off-by: Raghavendar rao l <quic_rlomte@quicinc.com>
Change-Id: I1680cf7bfab56d4a4888cf90874b92b999c3c9c9
When SSR in progress not allowing to setup ODL pipe.
Change-Id: Ied44a7bafdf90cff2f3b7619da88fe3c31d18956
Signed-off-by: Ashok Vuyyuru <quic_avuyyuru@quicinc.com>
When order 3 pages are not available, make changes to use
lower order pages to ensure buffers are provided to HW.
Change-Id: I9eea764d678820b0d3f485525310c506ea29c45e
Signed-off-by: Ashok Vuyyuru <quic_avuyyuru@quicinc.com>
When commit header table from memory to HW, adding fix to clean
dma allocation if it fails in multiple mapping attempts and also to
clean the allocated mapping of hdr table after commit to HW.
Change-Id: Icbf1b855e34625ffe8f8356a59cddf85a91b0160
Signed-off-by: Jagadeesh Ponduru <quic_jponduru@quicinc.com>
The DMA address allocated may be in 64-bit address
range if dma mask is set to 64-bit, the MSB register
value is required.
Signed-off-by: Cheng Zeng <quic_chenzeng@quicinc.com>
Remove Initializing rx_pkt link if dma mapping fails.
Change-Id: I49d08555c875fc9039805ef8775be3b676f51d08
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
Updated change to retry attaching smmu nodes if it fails, in a
deffered work queue with 500msec delay.
Change-Id: Ia54d801543224caf81085fedfd16305eca99995e
Signed-off-by: Raghavendar rao l <rlomte@codequrora.org>
Adding changes to support the deep sleep mode on monaco
target.
Change-Id: I50016848fde9533a856203bc2ad89bf851179a7b
Signed-off-by: Ashok Vuyyuru <quic_avuyyuru@quicinc.com>
While resetting the header rules if it find invalid header ID it
will return before freeting proc header table it was leading to use
after free when accessing the header pointer from proc header table.
Adding changes to NULL terminating header pointer in proc header table
after header table deleted from the list.
Change-Id: If270d855d3907e61368336316161a250053e1e62
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
During header deletion, if there is a HPC referencing to a header,
and the header is deleted, the later commit will cause
writing garbage values to the HW during commit.
Change-Id: Ib8bb490e38c57d975c21e5848850cd79263c95fe
Signed-off-by: Jagadeesh Ponduru <jponduru@codeaurora.org>
Currently during nop desc send, we are setting
nop pending flag to false before queing desc,
due to which we are not able to queue nop desc
again if it fails for first time. Now setting
nop pending flag to false only if we successfully
queued nop desc.
Change-Id: Ice0b3726f2ff0e81c0e5b041346e0ba06619ef62
Signed-off-by: Piyush Dhyani <pdhyani@codeaurora.org>
Increased the timeout value of ipa3_uc_send_cmd
from 10 to 20 in ipa3_uc_debug_stats_alloc function.
Change-Id: I5be5839c60b84226872a22e8a05bb712e395e62d
Signed-off-by: Jagadeesh Ponduru <jponduru@codeaurora.org>
For Q6 endpoints add change to not reset the HOLB timer
value to zero instead of default value. Add change to
enable HOLB twice for IPA 4.x targets.
Change-Id: Ic9596e711b037d24ae25835cb6dd193ec040d723
Signed-off-by: Praveen Kurapati <pkurapat@codeaurora.org>
Signed-off-by: Jagadeesh Ponduru <jponduru@codeaurora.org>
Make changes to free up all pending EOB pages when SKB allocation
used to handle EOT is failed as we could end up in a frag
overflow.
Change-Id: I80ae84d00d1bbf2cf89e97261d2fe8c3742eda04
Signed-off-by: Chaitanya Pratapa <cpratapa@codeaurora.org>
Signed-off-by: Jagadeesh Ponduru <jponduru@codeaurora.org>
If smmu is not enabled, smmu context device check
was missing before accessing it which was resulting
in null pointer dereference. Now adding check
before accessing it.
Change-Id: I94393524c79847a165ba605d34906525640b359a
Signed-off-by: Cheng Zeng <chenzeng@codeaurora.org>