Commit graph

417 commits

Author SHA1 Message Date
Piyush Dhyani
53b139775c msm: ipa3: Queue nop desc again if it fails.
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>
2021-10-08 02:33:07 -07:00
qctecmdr
282b45f3c2 Merge "msm: ipa3: increasing the uC interrupt timeout value" 2021-10-07 09:24:55 -07:00
qctecmdr
a2f7bb1dbd Merge "msm: ipa3: Add retry attempts for subsystem loading" 2021-10-07 03:40:05 -07:00
Jagadeesh Ponduru
2b90d4b534 msm: ipa3: increasing the uC interrupt timeout value
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>
2021-10-07 11:05:59 +05:30
qctecmdr
8e10232fe5 Merge "msm: ipa3: Add wait queue for the adpl" 2021-10-06 06:46:22 -07:00
qctecmdr
1e296239a8 Merge "msm: ipa3: Configure HOLB for WLAN2 consumer pipe" 2021-10-06 05:11:09 -07:00
Ashok Vuyyuru
a1ff843b17 msm: ipa3: Add wait queue for the adpl
add changes to wait queue for the adpl.

Change-Id: I5330cbf7fe1439e04c011c143bdd68657469c36e
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2021-10-06 11:25:13 +05:30
qctecmdr
7db2d04afd Merge "msm: ipa: Fix to free up all pending EOB pages" 2021-09-29 10:51:08 -07:00
Raghavendar rao l
e0f12e040a msm: ipa3: Add retry attempts for subsystem loading
Whenever subsystem loading fails to load ipa firmware, updated
change to load untill it succeeds.

Change-Id: I8b600e8e03030dfbd2e255a4a2148bef942dfe11
Signed-off-by: Raghavendar rao l <rlomte@codequrora.org>
2021-09-29 17:51:58 +05:30
qctecmdr
08b7be4f68 Merge "msm: ipa3: Fix null pointer dereference error" 2021-09-27 02:06:44 -07:00
Chaitanya Pratapa
27b85ef356 msm: ipa: Fix to free up all pending EOB pages
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>
2021-09-24 19:15:15 +05:30
Cheng Zeng
9e52c6925f msm: ipa3: Fix null pointer dereference error
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>
2021-09-17 12:55:07 +08:00
Praveen Kurapati
bcd36e8871 msm: ipa3: Reduced excessive logs from ipa
Due to excessive logs from ipa it blocks other tasks execution.
Ratelimit added inorder to reduce the logs.

Change-Id: I00ae9b1e62dd14d82e22d3c788b68d0474a8de87
Signed-off-by: Praveen Kurapati <pkurapat@codeaurora.org>
2021-09-10 08:07:22 -07:00
Jagadeesh Ponduru
9cd88fea7f msm: ipa3: Configure HOLB for WLAN2 consumer pipe
To avoid temporary stall on WLAN client enabling the HOLB on
WLAN2 consumer pipe.

Change-Id: I3920205f7f62dbdd240da162fab4158ab8e070b4
Signed-off-by: Jagadeeesh Ponduru <jponduru@codeaurora.org>
2021-09-07 11:21:05 +05:30
Ilia Lin
ccad254cc1 ipa: Null persistent pointers after free
Assign NULL to pointers that may be used later
after calling kfree on them.

Change-Id: I3298eb484c92ee2373f0bc41aae8ae45fb373cf0
Signed-off-by: Ilia Lin <ilialin@codeaurora.org>
2021-08-26 11:14:33 +03:00
qctecmdr
86100918ae Merge "msm: ipa3: Change spin lock in release_gsi_channel" 2021-08-17 16:19:48 -07:00
Sivakanth Vaka
c0b30d82be msm: ipa3: Change spin lock in release_gsi_channel
Changed the spin_lock in ipa3_release_gsi_channel
to spin_lock_irqsave to avoid getting interrupted
while stop channel is command is executed.

Signed-off-by: Sivakanth Vaka <svaka@codeaurora.org>
2021-08-17 21:10:15 +05:30
Jagadeesh Ponduru
194b0bdb4d msm: ipa3: code changes to fix kernel panic error
This Issue is seen by Enabling CONFIG_DEBUG_ATOMIC_SLEEP=y and boot the 
device.To avoid going into kernel panic state,changed the function
calls order of spin_lock() and idr_preload() after calling 
kmem_cache_zalloc().Originally, these two functions were called 
before calling kmem_cache_zalloc().

Change-Id: I2738548abd4148828e7d9436415c5c4d769680b9
Signed-off-by: Jagadeesh Ponduru <jponduru@codeaurora.org>
2021-08-16 16:32:06 +05:30
Goutam Bose
56b50e9752 Revert "ipa: Fix to match correct values after..."
This reverts commit bdbc1bf0a9.
2021-08-05 19:32:42 +05:30
qctecmdr
2b6bed5efc Merge "msm: ipa3: ODL endpoint configuration for monaco" 2021-08-04 07:13:48 -07:00
Armaan Siddiqui
bdbc1bf0a9 ipa: Fix to match correct values after copying
Changes done to copy num of rules from user space to
kernel side as earlier only payload was being copied.

Change-Id: I14e15fe0c6746226cc44d224d33c00e809cd69ca
Signed-off-by: Armaan Siddiqui <asiddiqu@codeaurora.org>
2021-08-04 10:37:41 +05:30
qctecmdr
68ed62f34f Merge "msm: ipa: fix potential race condition ioctls" 2021-08-03 17:15:28 -07:00
qctecmdr
209711a4fc Merge "msm: ipa3: Changes to remove the CNTXT_SCRATCH_1 config" 2021-08-03 15:49:38 -07:00
Ashok Vuyyuru
5ed13cc181 msm: ipa3: ODL endpoint configuration for monaco
ODL endpoint configuration for monaco target.

Change-Id: Ic842430d38287d02d44e15a4ee371bad912494c5
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2021-08-04 01:24:39 +05:30
Armaan Siddiqui
2cdeb1993e msm: ipa: fix potential race condition ioctls
There are potential race condition ioctls in
the IPA driver when it copies the actual
arguments from the user-space memory to the
IPA-driver. The fix is to add check on the
2nd copy to make sure the same payload size
is copied to the pre-allocated kernel memory
as during the 1st copy.

Change-Id: I3d31cb11a24e969db4fd1728cf6ab1ce983a75e9
Signed-off-by: Armaan Siddiqui <asiddiqu@codeaurora.org>
2021-08-04 00:10:44 +05:30
Ashok Vuyyuru
50e1ec6d09 msm: ipa3: Changes to remove the CNTXT_SCRATCH_1 config
Context scratch 1 register configuration not required, So removing
these changes.

Change-Id: I91e336b1a37959cd20024170694db5c4498c13d7
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2021-08-02 23:55:50 +05:30
qctecmdr
c6ba8c1111 Merge "msm: ipa: fix use-after-free of rt_tbl" 2021-07-23 09:00:21 -07:00
qctecmdr
bbeb3bfa7a Merge "msm: ipa3: Disable HOLB for ODL pipe during suspend" 2021-07-20 15:05:50 -07:00
Piyush Dhyani
b6e679fd85 msm: ipa3: Fix to prevent Integer Overflow
The value of `req->filter_spec_ex2_list_len`
is user input via ioctl and it's type is uint32,
so an integer overflow may occur. Which can result
in out of bound access in the following loop. Now
add changes to prevent Integer overflow.

Change-Id: Ia29b9ddc674e5dd3d5baf6623cf0a464c156d8f7
Signed-off-by: Piyush Dhyani <pdhyani@codeaurora.org>
2021-07-16 02:40:06 -07:00
qctecmdr
39c0e50d30 Merge "msm: ipa3: ignore multiple crash" 2021-07-13 14:37:07 -07:00
qctecmdr
fa0195fc76 Merge "msm: ipa: fix IPA_COALESCE_DISABLE handling" 2021-07-13 07:21:13 -07:00
Pooja Kumari
842d33d296 msm: ipa3: ignore multiple crash
Ignore recursive panic and multiple crash instances.

Change-Id: If76d8bb095fa68979bf6a98929fd4629cc3a9c75
Signed-off-by: Pooja Kumari <kumarip@codeaurora.org>
2021-07-13 04:35:49 -07:00
Chaitanya Pratapa
76d313e0f7 msm: ipa: fix IPA_COALESCE_DISABLE handling
Make changes to populate qmap_id when disabling coalescing.

Change-Id: Iaf0981bd22948b87bb8f9c548fe74e789eaf689c
Signed-off-by: Chaitanya Pratapa <cpratapa@codeaurora.org>
2021-07-12 23:07:22 -07:00
qctecmdr
c9428af37c Merge "msm: ipa3: Add change to retry memory allocation on failure" 2021-07-08 02:52:11 -07:00
Praveen Kurapati
579642679d msm: ipa3: Add change to retry memory allocation on failure
Adding changes to retry with GFP_KENREL flag when memory allocation
fails with GFP_ATOMIC flag. Panic the device if after max retries
also memory allocation fails.

Change-Id: Ic9ad827757de92715be5acc5645b7e860b4bd0e4
Signed-off-by: Praveen Kurapati <pkurapat@codeaurora.org>
2021-07-07 18:00:39 +05:30
Ashok Vuyyuru
6a1c52956f msm: ipa3: Enable hardbyte limit for WAN consumer pipe
Enable hardbyte limit WAN consumer pipe.

Change-Id: I27c5af71aeadfb40e6870da24c0b69f1cd60d806
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2021-07-05 21:47:48 +05:30
qctecmdr
21cd955642 Merge "msm: ipa3: Add proper check for FNR stats query" 2021-06-30 18:33:21 -07:00
Goutam Bose
bf9c2b1168 msm: ipa: fix use-after-free of rt_tbl
Fix use-after-free of rt_tbl in __ipa_del_flt_rule
by checking if the rt_tbl is already freed.

Change-Id: I09541f65f474dc42f262c603d99f6bbcbb0ce8ec
Signed-off-by: Goutam Bose <gbose@codeaurora.org>
2021-06-30 12:04:40 +05:30
qctecmdr
7eee966ca0 Merge "msm: ipa3: Add proper check for incoming skb" 2021-06-28 08:00:07 -07:00
qctecmdr
61e1e42e6b Merge "msm: ipa3: Adding changes to read the return code if IRQ not received" 2021-06-25 04:40:41 -07:00
Praveen Kurapati
73e7ec7292 msm: ipa3: Add proper check for incoming skb
There is a chance that incoming skb can is NULL in TX direction.
Add proper check to avoid any NULL ptr access issue.

Change-Id: I8bd4524e20ddefb4bd30a3ca4a09b65370b9b4ae
Signed-off-by: Praveen Kurapati <pkurapat@codeaurora.org>
2021-06-24 21:59:18 +05:30
Praveen Kurapati
de4c6e68ce msm: ipa3: Add proper check for FNR stats query
In some targets, FnR tethering stats query support
is not present. Add changes to check for support
present or not before query.

Change-Id: I415e019ff0cb01cf09c8ba6cd9fef44ae815c11b
Signed-off-by: Praveen Kurapati <pkurapat@codeaurora.org>
2021-06-24 10:23:21 +05:30
Ashok Vuyyuru
719233800c msm: ipa3: Disable HOLB for ODL pipe during suspend
1. Disable HOLB for ODL pipe during suspend to avoid dropping the packet
2. Enable HOLB while unsuspend the pipes.
3. Enable drop stats for ODL pipe.

Change-Id: Id0a5871ebe4a0925c60dea39f197af9e1892d05e
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org
2021-06-16 21:05:25 -07:00
qctecmdr
3cb33329d4 Merge "msm: ipa3: add rmnet_ctl enablement check" 2021-06-13 15:43:06 -07:00
Praveen Kurapati
b3f4d167be msm: ipa3: add rmnet_ctl enablement check
Add changes to check if rmnet_ctl support present
or not.

Change-Id: Ic99811ffcedbe474eeb80637e61901b55e448372
Signed-off-by: Praveen Kurapati <pkurapat@codeaurora.org>
2021-06-12 21:19:19 +05:30
qctecmdr
65331c0b33 Merge "msm: ipa3: Add check to avoid Quota indication for WLAN" 2021-06-08 10:38:38 -07:00
Praveen Kurapati
b946aea8f0 msm: ipa3: Add check to avoid Quota indication for WLAN
Quota indication is not yet supported on WLAN Iface.
Add check to return if the request comes for WLAN Iface.

Change-Id: Ib183d0ed21a87f6f759af8d4e5bc4093dffd9374
Signed-off-by: Praveen Kurapati <pkurapat@codeaurora.org>
2021-06-08 11:05:04 +05:30
qctecmdr
3f28e535f6 Merge "msm: ipa3: Fix to changes the ring variable type" 2021-06-07 04:32:18 -07:00
Ashok Vuyyuru
e15d5ede0b msm: ipa3: Adding changes to read the return code if IRQ not received
In some cases GP_INT1 interrupt not receiving even GSI FW send the
interrupt. In those cases cases reading the flow control command return
code to check completion.

Change-Id: I329550ab94af9caac870c6050761d3701f0517cd
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2021-06-05 16:25:56 +05:30
Ashok Vuyyuru
a890ae3b7b msm: ipa3: Fix to use right casting to avoid the compilation issue
Caller function passing the constant value converting to int
pointer will cause the problem. Adding changes to use right casting
to avoid compilation issue.

Change-Id: I8440f16e4e53e0788c2d1eae35f4b6ebf3178ead
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2021-06-05 00:46:16 +05:30