There is race condition on PM defer deactive and PM active where
the PM active triggered by new NAPI scheduling would be accidently
unvoted by PM defer deactive after last NAPI completion. This
is causing the NoC error on packet handling due to no clock.
The fix here is to using ACTIVE_CLIENT_NO_BLOCK for clock voting
and still use PM handle for BW voting so that we would have
reference count to make sure this unexpected devote not happens.
Change-Id: If1ece48dc16256dae9a810b3efa6eb4f533f06a8
Make changes to not to use stack memory to store the content
from descriptors in case of COAL/Defaul pipe.
Change-Id: Icfdad59022a5cad27ec95a0bf9c80e96a2a93da9
Signed-off-by: Chaitanya Pratapa <cpratapa@codeaurora.org>
Currently during RMNET_IOCTL_GET_MTU and RMNET_IOCTL_SET_MTU ioctls
we can recieve not null terminated string for if_name which was
resulting in string out of bound error while accessing the if_name.
Now adding null character at the end of string to prevent access
beyond its size.
Change-Id: I4d82a4b491f04a85d6ab4f0211671520156f7c61
Signed-off-by: Piyush Dhyani <pdhyani@codeaurora.org>
Make changes to enable WARN_ON only for debug builds.
Change-Id: I189784e298ce2415f2ae5fd6e3cc2ccb3ec4f307
Signed-off-by: Chaitanya Pratapa <cpratapa@codeaurora.org>
Use read memory barrier before reading event from event ring.
Since ring is shared resource between IPA h/w and IPA driver
dma_rmb is used to ensure memory write is complete before
reading from driver.
Change-Id: I295a701b16362f26d47d4efe5a54364a7ee4d5a6
Signed-off-by: Akshay Pandit <pandit@codeaurora.org>
Enable forceclear only supported for producer pipe so
avoid sending the force clear command to consumer pipes.
Change-Id: I6c63abe68e737463b0a189bf85a92c79648ea767
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
Add change to increase the stop channel retry timeout value
to avoid race condition cause by AP retrying to stop channel
and GSI trying to send stop channel command.
Change-Id: I405f923d9bc87f7b8612ded9137d7b8d23eb37e8
Signed-off-by: Praveen Kurapati <pkurapat@codeaurora.org>
Add assert on all gsi stop channel cases to capture the issue
ahead of time.
Change-Id: I044f192c63a724e00a9559bcb44260f0763ff824
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
In SSR scenario possiable to receive the contineous interrupt
when IPA HW recovered from temporary stall. Add changes to
remove the max poll count in gsi isr handle function.
Change-Id: Idaf1d9a070426188f3614ebf85010d0107d79dfb
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
Make changes to fix the stats collection.
Change-Id: Ib8ea3ca44951186ec472578fd13218bbc8c0120c
Signed-off-by: Chaitanya Pratapa <cpratapa@codeaurora.org>
Define scratch register 6 & 7 for gsi v1 targets to avoid
compilation failure.
Derive the hw_type index after platform type and auto/mhi configs
are already stored in ipa3_ctx.
Signed-off-by: Akshay Pandit <pandit@codeaurora.org>
Add proper check to validate table rule count
which may lead to overflow error.
Change-Id: I9bdcafcaae4e4cff1b901929c8dc6ae804f85642
Signed-off-by: Praveen Kurapati <pkurapat@codeaurora.org>
Changes to control the IPA BW vote persistent using debugfs.
Change-Id: Ie1edf294558a61af065f3fddec410808dc1abdd5
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
Add check to see if it is freed in pm deregister context
and trying to read again after free.
Change-Id: I764f012d0c7cd53f126aee221f7c1d6a914b7390
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
Currently LOW LAT consumer pipe replnish skb not unmapped
properly. Due to this running into out of memory issue.
Adding changes to unmap LOW LAT consumer replnish buffers
using correct method.
Change-Id: I253519f7c2f5eba11d32074c7b1879feed1f413c
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
IPA HW tries to prefetch 128 Bytes of additional memory when
dealing with filter/routing tables. This can result in overflowing
of memory if we map only the required size. Make changes to
consider prefetch memory when allocating routing/filter tables.
Change-Id: Id72e4df285a4683dddebb18d98bb9c4dd9667eeb
Signed-off-by: Chaitanya Pratapa <cpratapa@codeaurora.org>