Commit Graph

315 Commits

Author SHA1 Message Date
Ashok Vuyyuru
94056932ae msm: ipa3: enable SYSPIPE_ERR_DETECTION bit for deaggr_err
We observe the IPA RX stall due to the DEAGGR_ERR_IRQ
of PACKET_SIZE > FRAME_SIZE on WAN PROD pipe.
In IPA, some of de-aggregation error handling checks
are dependent on the syspipe_err_detection config bit.
Adding IGNORE_MIN_PKT_ERR bit for WAN PROD as well based
on recommendations.

Change-Id: Ie0fe8f52a1e63750e3db7f2b3fcf42790505fa88
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2021-02-23 22:52:27 +05:30
Michael Adisumarta
db9f7f48ee msm: ipa: Add a check to see if mtu is set or SET_MTU IOCTL
Add an check for mtu set before sending an event to IPACM
so MTU will always be nonzero.

Change-Id: Ib8954865ba46743e143d72cf15d8bbce282aa013
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
2021-02-11 14:43:26 -08:00
raghavendar rao l
839d05d11b msm:qmi: Fix race condition
Add changes to fix race condition while sending
modem init QMI sync message.

Change-Id: I2183dd2da40b589ccd628469273b33edc2ea399d
Signed-off-by: Raghavendar rao l <rlomte@codequrora.org>
2021-02-04 21:09:14 +05:30
Ashok Vuyyuru
1719235112 msm: ipa3: Change to avoid the assert channel not allocated scenario
When the modem channel not running if try to flow control the channel
it will return not valid channel. Adding change to avoid the assert
in this error condition.

Change-Id: Ia9c32fbc11814e5fef3b7fbcc165439b5d03b2fa
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2021-02-03 16:12:26 +05:30
qctecmdr
19465a1510 Merge "msm: ipa3: uC stats feature not support for yupik target" 2021-02-01 03:13:11 -08:00
Ashok Vuyyuru
95bcacd2ad msm: ipa3: uC stats feature not support for yupik target
uC stats feature not support for yupik target so disabling
this API calling support.

Change-Id: Iebd074f7cd5d4b57b8db3dc137684dbfc6317e0e
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2021-01-30 10:40:00 +05:30
Ashok Vuyyuru
a1eb2af1f0 msm: ipa3: Adding wdii3 client support for yupik
Adding wdi3 endpoint client support for yupik.

Change-Id: I0f9f98dbf80dfa40c3f9528ec958ba4cf6326633
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2021-01-30 10:32:20 +05:30
qctecmdr
8f5f141b1e Merge "msm: ipa: enable WARN_ON only for debug builds" 2021-01-21 21:13:46 -08:00
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
Chaitanya Pratapa
963742ee27 msm: ipa: enable WARN_ON only for debug builds
Make changes to enable WARN_ON only for debug builds.

Change-Id: I189784e298ce2415f2ae5fd6e3cc2ccb3ec4f307
Signed-off-by: Chaitanya Pratapa <cpratapa@codeaurora.org>
2020-12-23 23:09:32 -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