Commit Graph

732 Commits

Author SHA1 Message Date
Armaan Siddiqui
5e4d4e39a1 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 01:06:58 -07:00
qctecmdr
d1f804e2ac Merge "msm: ipa3: Changes to remove the CNTXT_SCRATCH_1 config" 2021-08-03 17:33:42 -07:00
Ashok Vuyyuru
3d2bf967c0 msm: ipa3: Changes to remove the CNTXT_SCRATCH_1 config
Context scratch 1 register configuration not required, So removing
these changes.

Change-Id: Ic72fc128fc6468e5844d10d9321a85a85c4ed60c
2021-08-03 00:01:19 +05:30
Michael Adisumarta
a32e97b893 msm: ipa: Update qtimer granularity for IPA_hw_type > 5.0
Update qtimer granularity for IPA_hw_type > 5.0 to match
HPG requirement. Use the new granularity for configuring
timer if the lower granularities fail. Remove assert
for debugfs to gracefully handle bad timer value.

Change-Id: I57d4913950afd0dec9adddc65441043263302872
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
2021-07-29 16:06:03 -07:00
Goutam Bose
fd487e6278 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-07-26 18:49:04 -07:00
qctecmdr
d523e31764 Merge "msm: ipa: Updating the last index of qmi handler array with NULL" 2021-07-26 14:39:21 -07:00
qctecmdr
5d8fee29fc Merge "ipa: Remove unneeded warning" 2021-07-26 10:05:46 -07:00
Skylar Chang
a89c78b8a7 msm: ipa3: directly give prot_id in stats_dealloc
Directly to give prot_id in ipa3_uc_debug_stats_dealloc
instead of using IpaHwOffloadStatsDeAllocCmdData_t
structure.

Change-Id: I20d717e43dc3c8161e05338a21d053245e5502f7
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
2021-07-23 13:02:20 -07:00
qctecmdr
2179be587b Merge "msm: ipa3: Disable HOLB for ODL pipe during suspend" 2021-07-23 10:17:48 -07:00
qctecmdr
b2c0cdf9b2 Merge "ipa: NTN3 EDMA mode limitation DB fix" 2021-07-22 06:06:34 -07:00
Ashok Vuyyuru
8cea05c6ab 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-07-22 14:06:10 +05:30
Ilia Lin
d9c21ec0f3 ipa: NTN3 EDMA mode limitation DB fix
Provide MSI DB register address instead of DB register.

Change-Id: If31998b71c71f11020577c7a581cc11ac93db29f
Acked-by: Eliad Ben Yishay <ebenyish@qti.qualcomm.com>
Signed-off-by: Ilia Lin <ilialin@codeaurora.org>
2021-07-22 10:06:30 +03:00
qctecmdr
96433bd0f6 Merge "msm: ipa5: ipa_stats support for ipa_lnx_agent" 2021-07-20 19:55:14 -07:00
Michael Adisumarta
8e3953ea4e msm: ipa5: ipa_stats support for ipa_lnx_agent
Includes support for IPA stats to be able to send log packet
to ipa_lnx_agent and then to SPEARHEAD framework.

Change-Id: I3112fc6b2e66e15140f638bfff9905bba6997e46
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
2021-07-20 13:44:23 -07:00
qctecmdr
b63f1930db Merge "msm: ipa3: ignore multiple crash for active_clients" 2021-07-19 17:49:34 -07:00
qctecmdr
fbd3bfa6f7 Merge "msm: ipa3: Return the correct max PDN value for all IPA HW types" 2021-07-19 15:28:21 -07:00
Skylar Chang
e16486e14d msm: ipa3: ignore multiple crash for active_clients
Ignore recursive panic and multiple crash instances
for ipa3_active_clients_panic_notifier.

Change-Id: I1abcb641dc4ceb18e3638f9cd8a8725b029bb524
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
2021-07-19 09:53:13 -07:00
qctecmdr
50c4f795a9 Merge "msm: ipa3: increase pkt ctx for cv2x rsrc grp" 2021-07-19 04:58:28 -07:00
Raghavendar rao l
155c5abe4b msm: ipa: Updating the last index of qmi handler array with NULL
Update in the qmi handler structures last index to NULL, to avoid
the out of bound access attempt while handling qmi notifications
from IPA.

Change-Id: I51b3e4369fcf4c9c235307cfd7c6415c525da496
Signed-off-by: Raghavendar rao l <rlomte@codeaurora.org>
2021-07-19 10:59:04 +05:30
qctecmdr
3f75dd9c55 Merge "msm: ipa3: Fix to prevent Integer Overflow" 2021-07-17 09:13:54 -07:00
Pooja Kumari
be8c107e27 msm: ipa3: increase pkt ctx for cv2x rsrc grp
Made the changes to increase rsrc pkt conexts
from 1 to 6 to support cv2x auto case.

Change-Id: I2f9774fd473248ce4f86748be83c2a9b58ab16a8
Signed-off-by: Pooja Kumari <kumarip@codeaurora.org>
2021-07-15 12:00:28 +05:30
Ilia Lin
01285ef741 ipa: Remove unneeded warning
If userspace commands to delete last rule in a routing table,
then a an empty table may be commited. This is possible case,
so no warning is needed.

Change-Id: I04b6a9d3bdcaf28f35046c328e46a2719680d2a1
Signed-off-by: Ilia Lin <ilialin@codeaurora.org>
2021-07-15 08:11:12 +03:00
qctecmdr
0739e92588 Merge "ipa: Fix dangling HPC entry rndis/ecm composition switch when ULSO enabled in dts" 2021-07-14 11:15:43 -07:00
Piyush Dhyani
46ca374819 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-14 20:36:31 +05:30
qctecmdr
daf9ada1b3 Merge "msm: ipa3: add dymaic IPPT SW-flt functionality" 2021-07-13 23:09:22 -07:00
Michael Adisumarta
0cdb57b77b msm: ipa3: Return the correct max PDN value for all IPA HW types
Caculate the correct max PDN value from PDN config size
divided by pdn entry size.

Change-Id: I65ed83a5e0368f20dded7c06a7c876010c766d90
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
2021-07-13 18:40:14 -07:00
Chaitanya Pratapa
2df5dc79e6 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-13 12:47:39 -07:00
qctecmdr
cd6e0937aa Merge "msm: ipa3: add v2x ethernet pipes" 2021-07-13 09:14:53 -07:00
Chaitanya Pratapa
1110aa3cf8 msm: ipa: WAR for ULSO
1. Disable coalescing pipe aggregation timer.
2. Change all pipes resource group to UL (apart from URLLC pipe)
3. Only send force close coalece cmd for tag process.
4. Add dummy register read in tag process IC sequence.
5. Adjust src RSC group settings for UL/DL

Change-Id: I9e94c1bdc7f879a85cbbf3921bff6a04d7901c1a
2021-07-12 22:42:32 -07:00
Skylar Chang
7992c93d83 msm: ipa3: add dymaic IPPT SW-flt functionality
Add the support for user-space module to dynamically
enable or disable IPPT SW-flt lists based on ipv4 or
connection port number to decide traffic going to
ipa offload or not.

Change-Id: I49472f94201c46bc9d9716eb5ff133fb462bf435
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
2021-07-12 13:33:36 -07:00
qctecmdr
a0318b2d20 Merge "msm: ipa3: ignore multiple crash" 2021-07-09 14:11:37 -07:00
Armaan Siddiqui
950ff0bdd3 msm: ipa: Don't assert when packet size is large
Earlier IPA was asserting when received packet size
larger than expected, now instead of that we drop
the packet.

Change-Id: I677c59564aa667c93069b8dda370635332bc077c
Signed-off-by: Armaan Siddiqui <asiddiqu@codeaurora.org>
2021-07-09 14:23:04 +05:30
Pooja Kumari
6a9c7c2c36 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-08 23:15:01 -07:00
qctecmdr
b572606090 Merge "msm: ipa: clean up netdev resources in AFTER_SHUTDOWN cb" 2021-07-08 05:55:22 -07:00
qctecmdr
881d30703e Merge "msm: ipa: reorder route rules on wan ron routing table" 2021-07-08 02:50:37 -07:00
qctecmdr
0a34c2f044 Merge "msm: ipa: Remove redundant error logs and warning logs" 2021-07-08 02:11:53 -07:00
Michael Adisumarta
ab6b8a4d6c msm: ipa3: Use vmemdup_user for kernel version 5.10
vmemdup_user has been added to kernel 5.10 symbols
so no need to use memdup_user anymore.

Change-Id: I563da3a1f387ad6a34c28b665686f6e6cd15d6ac
2021-07-07 05:32:20 -07:00
qctecmdr
c25ab41b48 Merge "msm: ipa3: Fix to changes the ring variable type" 2021-07-06 22:52:14 -07:00
Ilia Lin
593bccb51c ipa: Fix dangling HPC entry rndis/ecm composition switch when
ULSO enabled in dts

Rndis/ecm use hpc based header insertion for ulso. HPC entry and
a linked header entry are added on init and removed on destruction
of rndis/ecm. Previously, the HPC entry was left dangling, pointing
to a deleted header entry.

Change-Id: I59ed7ed5ee8b3dd012f3b7d4104370dd6deac60a
Acked-by: Eliad Ben Yishay <ebenyish@qti.qualcomm.com>
Signed-off-by: Ilia Lin <ilialin@codeaurora.org>
2021-07-06 10:28:26 +03:00
Piyush Dhyani
8897667934 msm: ipa: Fix KW P1 Issues.
Changes to fix KW issues.

Change-Id: Ie89014fb738e72d4f95f8e44eb139a5fdfecaf92
Signed-off-by: Piyush Dhyani <pdhyani@codeaurora.org>
2021-07-05 16:28:58 +05:30
qctecmdr
eec24e2539 Merge "ipa: Fix overflow in header deletion" 2021-07-02 19:08:25 -07:00
Pooja Kumari
399b24aba0 msm: ipa3: add v2x ethernet pipes
Add cv2x ethernet endpoint configuration changes.

Change-Id: I6d1ac9cb5a282a871722e56f51c7c027b24b6b55
Signed-off-by: Pooja Kumari <Pooja Kumari@codeaurora.org>
2021-07-02 19:11:41 +05:30
Michael Adisumarta
e83b209ad3 msm: ipa: Remove redundant error logs and warning logs
Removing Error logs and Warning logs from rndis and PM module.

Change-Id: Ie993b1d1fe0936eb75bb90c54bf62fd5a848fc5f
SIgned-off-by: Michael Adisumarta <madisuma@codeaurora.org>
2021-07-01 19:05:49 -07:00
Perry Randise
80b50ead8c msm: ipa3: EoGRE feature fix
Three functional changes:

1) Eogre to uC header corruption (ie. first byte) fixed with this
   change by adding the DUMMY consumer to the IPA's endpoint
   configuration.

2) Removed the ethernet conditional from the reconfigure ep metadata
   reg to override mux-id.

3) Added IPA_PROC_CTX_TLV_TYPE_HDR_ADD tlv back to the
   IPA_HDR_PROC_EoGRE_HEADER_REMOVE process context message.

Change-Id: I08a1af3156724f965ccad5a6c1026ef2e62bc063
Signed-off-by: Perry Randise <prandise@codeaurora.org>
2021-06-30 14:08:40 -04:00
qctecmdr
fc361c9655 Merge "msm: IPA: NTN3 offload BU: modify interrupt moderation values" 2021-06-29 22:31:58 -07:00
Ilia Lin
1b186d274b ipa: Fix overflow in header deletion
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.

Also adding more security checks in the same flow.

Change-Id: I1f2e42673f030aca622c2b232ac5d463fefc485f
Signed-off-by: Ilia Lin <ilialin@codeaurora.org>
2021-06-29 09:50:40 +03:00
qctecmdr
3861667798 Merge "msm: ipa: remove condition to avoid crash in wrap around case" 2021-06-28 21:39:23 -07:00
Ilia Lin
4a9b74c041 msm: IPA: NTN3 offload BU: modify interrupt moderation values
Modify the values used for Tx tail pointer update per completion.

Change-Id: Id6ed8e9d7ca05a8b8611407f05c69633d09a9c82
Acked-by: Eliad Ben Yishay <ebenyish@qti.qualcomm.com>
Signed-off-by: Ilia Lin <ilialin@codeaurora.org>
2021-06-28 16:38:48 -07:00
Michael Adisumarta
fca610a919 msm: ipa: reorder route rules on wan ron routing table
Reordering route rule to include low latency rule on top
of the wan routing table.

Change-Id: Ic92e68b1659740d26bc34619921887f60b9d2055
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
2021-06-25 15:20:06 -07:00
qctecmdr
eb16241db6 Merge "msm: ipa: fix the double free for the queue transfer failure" 2021-06-24 16:12:23 -07:00