Commit Graph

306 Commits

Author SHA1 Message Date
qctecmdr
114feaa6a8 Merge "msm: ipa: fix race condition on PM vote on sys pipes" 2021-01-21 18:13:48 -08:00
Bojun Pan
cfad44940c msm: ipa: fix race condition on PM vote on sys pipes
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
2021-01-21 12:58:20 -08:00
qctecmdr
b5ddc2efd0 Merge "msm: ipa3: immediately return after rx_len is cached." 2021-01-19 22:06:45 -08:00
qctecmdr
bbf70405ea Merge "msm: ipa3: Define gsi scratch reg 1 for gsi v1 targets" 2021-01-13 00:04:49 -08:00
qctecmdr
abbf862f97 Merge "msm: gsi: Updated the wait for completion time out" 2021-01-12 22:39:51 -08:00
Michael Adisumarta
56e4ab58b7 msm: ipa3: immediately return after rx_len is cached.
This is to avoid race condition.

Change-Id: I5d86081025508a25f669eca82c8750306e2c6fc3
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
2021-01-12 21:16:10 -08:00
raghavendar rao l
2d91294e6a msm: gsi: Updated the wait for completion time out
Increased the wait for completion timeout period,
while performing channel halt.

Change-Id: I42d56480d815e5ba6deb5c68ec2a9ba43cea39f7
Signed-off-by: raghavedar rao l<rlomte@codeaurora.org>
2021-01-12 09:48:53 +05:30
Akshay Pandit
d6683a28c0 msm: ipa3: Define gsi scratch reg 1 for gsi v1 targets
GSI scratch reg 1 for gsi v1 targets to ensure compilation.

Change-Id: I8f031fdf0a9e6216ea7ef9dcba961bdc7f073aee
Signed-off-by: Akshay Pandit <pandit@codeaurora.org>
2021-01-11 11:38:20 +05:30
Chaitanya Pratapa
a168932c2d msm: ipa: fix to not use stack memory to store descriptors
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>
2021-01-07 13:55:33 -08:00
qctecmdr
9ba94188f5 Merge "msm: ipa4: Enhanced flow control changes" 2020-12-30 08:27:05 -08:00
Ashok Vuyyuru
f20c9b46d4 msm: ipa4: Enhanced flow control changes
Adding changes to support enhanced flow control.

Change-Id: Id656319703a27f5073c6fd129fb4202a37b49aad
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2020-12-30 08:45:23 +05:30
qctecmdr
e71bd07c73 Merge "msm: ipa: Use read memory barrier before reading events" 2020-12-23 23:49:20 -08:00
qctecmdr
14eb5b34ad Merge "msm: ipa3: Send enable force clear only for producer pipe" 2020-12-23 22:24:01 -08:00
Akshay Pandit
758cc8b534 msm: ipa: Use read memory barrier before reading events
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>
2020-12-23 15:40:07 +05:30
qctecmdr
ae51a44fde Merge "msm: ipa3: Add change to increase timeout value" 2020-12-22 16:10:30 -08:00
Ashok Vuyyuru
cea86232b8 msm: ipa3: Send enable force clear only for producer pipe
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>
2020-12-23 00:27:15 +05:30
Praveen Kurapati
db842a7f7d msm: ipa3: Add change to increase timeout value
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>
2020-12-16 12:58:09 +05:30
Bojun Pan
e74eba42df msm: ipa: assert on gsi stop channel failure
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>
2020-12-14 20:23:25 -08:00
qctecmdr
737c914a99 Merge "msm: ipa3: Fix to unlock mutex before return" 2020-12-08 09:44:28 -08:00
qctecmdr
4034f52fad Merge "msm: ipa: add check to see if pm client is not NULL" 2020-12-03 18:02:16 -08:00
Ashok Vuyyuru
d355b6fe56 msm: ipa3: Fix to unlock mutex before return
Adding changes to unlock mutex before return from QMI
send request.

Change-Id: I39c32219db69fbc41b30507759bed16acb976005
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2020-12-03 20:32:25 +05:30
qctecmdr
c19f806104 Merge "msm: ipa3: Fix to remove max poll count in gsi isr handle" 2020-12-02 17:02:42 -08:00
Ashok Vuyyuru
c341ec01cc msm: ipa3: Fix to remove max poll count in gsi isr handle
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>
2020-12-03 01:15:37 +05:30
qctecmdr
f9ecad48ac Merge "msm: ipa: fix stats dump" 2020-12-01 21:32:30 -08:00
qctecmdr
07d9797978 Merge "msm: ipa3: Add check to validate rule_cnt" 2020-11-25 19:01:51 -08:00
Chaitanya Pratapa
cb6aad2d4d msm: ipa: fix stats dump
Make changes to fix the stats collection.

Change-Id: Ib8ea3ca44951186ec472578fd13218bbc8c0120c
Signed-off-by: Chaitanya Pratapa <cpratapa@codeaurora.org>
2020-11-24 12:28:55 -08:00
Akshay Pandit
d71a7a3641 msm: gsi: Define scratch reg for gsi v1 header
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>
2020-11-24 11:07:52 +05:30
Praveen Kurapati
fd57264b26 msm: ipa3: Add check to validate rule_cnt
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>
2020-11-24 10:09:16 +05:30
qctecmdr
3da31ea0a2 Merge "msm: ipa3: Fix to unmap LOW LAT consumer pipe buffers" 2020-11-20 04:33:27 -08:00
qctecmdr
3b007394ea Merge "msm: ipa3: Changes to control the IPA BW vote using debugfs" 2020-11-19 18:40:16 -08:00
qctecmdr
9bf25043ae Merge "Revert "msm: ipa3: Assert the device when IPA FW not loaded"" 2020-11-19 15:54:15 -08:00
Ashok Vuyyuru
0d291ba235 msm: ipa3: Changes to control the IPA BW vote using debugfs
Changes to control the IPA BW vote persistent using debugfs.

Change-Id: Ie1edf294558a61af065f3fddec410808dc1abdd5
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2020-11-20 02:38:42 +05:30
Michael Adisumarta
fb711db3c7 msm: ipa: add check to see if pm client is not NULL
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>
2020-11-19 13:04:19 -08:00
Ashok Vuyyuru
3b10b9d33b msm: ipa3: Fix to unmap LOW LAT consumer pipe buffers
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>
2020-11-20 00:44:26 +05:30
Ashok Vuyyuru
5661882805 Revert "msm: ipa3: Assert the device when IPA FW not loaded"
This reverts commit c3b184eac4.

Change-Id: I0ddaca27bb7c6073026b6c408402903e8141f705
2020-11-18 23:33:24 +05:30
Chaitanya Pratapa
18daf0b0d4 msm: ipa: Fix considering prefetch buf size when mapping
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>
2020-11-17 11:48:41 -08:00
qctecmdr
5b70c8435f Merge "msm: ipa3: Add debug logs to check unregister netdev completion time" 2020-11-17 07:09:11 -08:00
Piyush Dhyani
af06631642 msm: ipa3: Add debug logs to check unregister netdev completion time
Add debug logs to check how long unregister netdev completion taking
time.

Change-Id: I0cd7ec2655d32cfdf9b758f6147628c7fa33f568
Signed-off-by: Piyush Dhyani <pdhyani@codeaurora.org>
2020-11-17 12:11:55 +05:30
Bojun Pan
ab56bd6371 msm: ipa: vote the ipa clock before enable wdi channel
Move the PM activate before enable WDI channel.

Change-Id: I8146305b1548bdcb0d2c3d60d21854b35433fede
2020-11-13 08:55:13 -08:00
qctecmdr
36669cda18 Merge "msm: ipa3: Fix to move the spin lock handle to starting of struct" 2020-11-11 17:09:17 -08:00
Ashok Vuyyuru
261023d207 msm: ipa3: Fix to move the spin lock handle to starting of struct
Observing spin lock handle corruption in kasan testing. To avoid
handle corruption moving the spin lock handle to starting of struct.

Change-Id: Id77dd2deac1af80fde11418e96c56dd86c67599b
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2020-11-11 23:12:46 +05:30
qctecmdr
d51372e924 Merge "msm: ipa3: Fix to use proper clock timer" 2020-11-10 04:20:25 -08:00
qctecmdr
71301ad54e Merge "msm: ipa: Add additional trace points for rx/tx" 2020-11-08 15:48:32 -08:00
qctecmdr
a2be0d847d Merge "msm: ipa3: Support uc header proc ctx for DSCP insertion" 2020-11-07 15:34:40 -08:00
qctecmdr
d5309a03be Merge "msm: ipa: Add new IOCTLs to get and set MTU" 2020-11-05 23:05:51 -08:00
qctecmdr
0d30ec3305 Merge "msm: ipa3: Fix to avoid NULL pointer access" 2020-11-04 10:12:11 -08:00
qctecmdr
82e754aa5b Merge "ipa: Support IPA offload on msmnile_gvmq target" 2020-11-02 12:07:34 -08:00
qctecmdr
094097fc8b Merge "msm: ipa: IPA EMAC offload enhancement for HQX" 2020-11-02 09:15:33 -08:00
Akshay Pandit
12a1d076a2 ipa: Support IPA offload on msmnile_gvmq target
- Enable endpoints for msmnile_gvmq
- Dont bail out of preinit when CONFIG_INTERCONNECT disabled and
icc apis are stubbed out
- wait for 1000 msec while processing ioctl when delayed fw load
enabled
- Cleanup uc load notification handler during wdi disconnect.

Signed-off-by: Akshay Pandit <pandit@codeaurora.org>
2020-11-02 15:24:23 +05:30
Ashok Vuyyuru
f181465e1f msm: ipa3: Fix to avoid NULL pointer access
Adding changes to check ipa_q6_clnt pointer NULL or not
before accessing it.

Change-Id: I255dd021c9534fe6ca4d7b19c3b576a0d3c80c7d
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2020-11-01 22:50:55 +05:30