Commit Graph

52 Commits

Author SHA1 Message Date
Rishabh Garg
d5c81c5204 ipa3:msm: Added debugfs support for drop packet stats
enabled the debug support for drop packets on the basis of
pipe number.

Change-Id: Ia1811dd7a5b28bfc787ed7e28e661dfac3e41a17
Signed-off-by: Rishabh Garg <rishgarg@codeaurora.org>
2020-05-26 06:21:44 -07:00
Sivakanth vaka
b93346f3ba msm: ipa3: fixed memory leak
SMMU mapping resources are not freed as part of wdi disconnect.

Change-Id: I702ac3bc0b5643424d051c45ec607d925f9c369d
Signed-off-by: sivakanth vaka <svaka@codeaurora.org>
2020-05-21 11:44:36 -07:00
Ilia Lin
7e89bf0760 msm: ipa: Fix ipa_pre_init teardown
Part of allocations made by the ipa_pre_init() are not freed correctly.
Fixing this by calling the relevant cleanup's.
Since the ipa_odl_init() is not the last allocation now,
the appropriate ipa_odl_cleanup added.

Change-Id: Iedbe1dff829f5bedbf788ffd89928982a498d065
Signed-off-by: Ilia Lin <ilial@codeaurora.org>
2020-05-21 05:53:02 -07:00
Bojun Pan
acde797a5f msm: ipa: add log for uC HOLB monitor
Log last 20 HOLB event for each client.
Add debugfs support to print those events.

Change-Id: I4aa1bd6c86b22efbbaa3a5be2030667d3e4c8bec
2020-05-19 09:39:24 -07:00
Bojun Pan
e32086115f msm:ipa:use separate event ring for low latency UL pipe
Setup a separate event ring for low latency UL pipe.

Change-Id: Ia7800457430f9d941587f4bffc9de3ff2b15ef2b
2020-05-18 22:35:48 -07:00
qctecmdr
656cb75924 Merge "msm: ipa: Update debugfs to print rules correctly" 2020-05-18 18:15:23 -07:00
qctecmdr
8df42fb3ca Merge "msm: ipa: enable SYSPIPE_ERR_DETECTION bit for deaggr_err" 2020-05-18 15:00:00 -07:00
qctecmdr
5a5437d6d7 Merge "msm:ipa: add protection for vote/unvote from ioctl" 2020-05-14 23:32:43 -07:00
Bojun Pan
1342ce16e1 msm: ipa: Update debugfs to print rules correctly
This change will fix the ip4_rt and ip4_flt debugfs variables to print
the complete strings for ipa3_attrib_dump_eq.

Change-Id: Ibff24a137961657d5f8e506c17f9a93f64feb2dd
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
2020-05-14 23:09:17 -07:00
Bojun Pan
70fcaf66b7 msm: ipa: 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 rndis.
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 rndis as well based
on recommendations.

Change-Id: Ice434c163091392ba9db386139dc5e439fb4e4fd
2020-05-11 12:18:11 -07:00
Amir Levy
1ef673d4aa msm: ipa3: enable tx-napi via ipa.c
since current issues with adding changes to the
dts, the tx-napi property is enabled now independently
of the dts.

Change-Id: I178bf6fe4e17bf107f98086a9fd52f4cad484950
Acked-by: Tal Gelbard <tgelbard@qti.qualcomm.com>
Signed-off-by: Amir Levy <alevy@codeaurora.org>
2020-05-11 16:10:07 +03:00
qctecmdr
c5986dd375 Merge "msm: ipa3: Fix to handle NULL ptr access" 2020-05-08 10:25:13 -07:00
Praveen Kurapati
6f4a63a5a1 msm: ipa3: Fix to handle NULL ptr access
Due to modem slow init, race condition is seen during subsequent
SSR. Add changes to protect IPA handle using mutex lock.

Change-Id: I4390fc1370bc15d232a386ae07c3cb018d5744d3
Signed-off-by: Praveen Kurapati <pkurapat@codeaurora.org>
2020-05-08 10:37:58 +05:30
Bojun Pan
eaa8ff2543 msm:ipa: add protection for vote/unvote from ioctl
In security fuzzy test, the ioctl could be called multiple time
for devote/vote, which could cause a devote when IPA already go
PC and cause the assert.

Change-Id: I47e6469d17f2b9bfa93e115dd704a415b6d024d8
2020-05-07 14:10:18 -07:00
Sivan Reinstein
17e4d9ddd5 msm: ipa: gsi: Add support for EV RP DDR access feature
Allocate memory on DDR for event RP and provide it to
the GSI context.
Access the event RP using the DDR pointer instead of
reading the GSI register.

Change-Id: Idaaa352aa8cc20089ce663a2740e6bb121d8258d
Acked-by: Nadav Levintov <nadavl@qti.qualcomm.com>
Signed-off-by: Sivan Reinstein <sivanr@codeaurora.org>
2020-05-07 08:44:26 +03:00
Amir Levy
c45018dd9f msm: add: changed tx completion to be done in napi context
In an effort to improve the data path changed the TX
data path to use NAPI for tx completions.
Added a specific polling function for NAPI, and a napi_struct
to each sys pipe.

Change-Id: I168a03a112109a2a9a7a747bf08147107a8d5fc7
Acked-by: Tal Gelbard <tgelbard@qti.qualcomm.com>
Signed-off-by: Amir Levy <alevy@codeaurora.org>
2020-05-06 12:39:14 -07:00
Amir Levy
e42bd3284e msm: ipa3: Add hw_type_index to ipa3_context
Caching hw_type_index in ipa3_context in ipa3_pre_init.

Change-Id: Iab6e801165db7c1fcb4cc6a4c0dc5cbc83052e94
Acked-by: Eliad Ben Yishay <ebenyish@qti.qualcomm.com>
Signed-off-by: Amir Levy <alevy@codeaurora.org>
2020-05-06 01:35:09 -07:00
qctecmdr
e9dfda8821 Merge "msm: ipa3: Change the hw version check for tethered stats" 2020-05-06 00:02:59 -07:00
qctecmdr
c4e6f97589 Merge "msm: ipa: Fix updating the doobell for WDI3" 2020-05-05 23:06:09 -07:00
Amir Levy
1460c9b090 msm: ipa4: update proc_ctx generic command params
Update generic header processing command params to
have tlv length of 2 and  make LSB bits of header
address followed by MSB bits.

Change-Id: If4e53dbb6426c24028c81add1032138ee6e1a37b
Signed-off-by: Amir Levy <alevy@codeaurora.org>
2020-05-05 15:19:50 +03:00
sivakanth reddy vaka
5d133c8bbd msm: ipa3: Change the hw version check for tethered stats
Added Changes to support hw tethered stats only when
wdi3 over gsi support is present.

Change-Id: I5ab7cf9772d88f31c36553902e60b090d437bbc8
Signed-off-by: sivakanth reddy vaka <svaka@codeaurora.org>
Signed-off-by: Chaitanya Pratapa <cpratapa@codeaurora.org>
2020-05-04 22:56:16 -07:00
Chaitanya Pratapa
a1d89b7555 msm: ipa: Fix updating the doobell for WDI3
For WDI3, requirement is to ring the event ring DB
with a value outside of the ring. Currently we are taking the
event_ring_size from non SMMU structure which is incorrect.
Make a chane to use the value based on SMMU enablement.
Also make change to ring the DB with the below logic.
Event ring base addr + Event ring size + 1 element size.

Change-Id: Ie9e4cad63070d1488d0a36f9d08279d2d566055a
Signed-off-by: Chaitanya Pratapa <cpratapa@codeaurora.org>
2020-05-04 16:56:02 -07:00
Michael Adisumarta
502288d0ba msm: ipa3: Correctly return error for ipa3_mdfy_flt_rule
Return the right error in internal mdfy_flt_rule for
better IPACM debugability and update the status last
after the modify in and out.

Change-Id: Id872cd8fcea9816d13a20a4cf71c47311897aa9d
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
2020-05-04 15:23:35 -07:00
Amir Levy
942aa8f8d5 msm: ipa: warn if header type isn't compatible with mode
In case of Vlan mode, verify that registered header is of
correct type and warn otherwise.

Change-Id: Ic5c529f1c9cabf77d0ef9f996105014d4a272c7c
Signed-off-by: Amir Levy <alevy@codeaurora.org>
2020-05-04 11:59:14 +03:00
Praveen Kurapati
5e982dac99 msm: ipa4: Fix race condition in adpl pipe open
Observing race condition during odl pipe open
simultaneously. Add changes to protect the scenario
with mutex lock.

Change-Id: Ib79df57fe871ed8ce8ce480589a93235d030cba0
Signed-off-by: Praveen Kurapati <pkurapat@codeaurora.org>
2020-04-30 10:56:47 +05:30
Bojun Pan
e30ed885a2 msm: ipa4: capture the unclock gsi IPA register access
Add more protect on the unclock gsi IPA register access.
In case this is a valid access, assert before disabling
the IPA clock.

Change-Id: If2cc5a9942a5e457bbd8badaabde78138f676176
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
2020-04-28 14:08:21 -07:00
Chaitanya Pratapa
3eb4edcdfa msm: ipa: Enable uC HOLB monitoring
Includes all changes needed to support the uC HOLB monitoring
feature for slow peripherals.

Change-Id: I09668ab6a2790be766cfddee388de92b9bc83445
Acked-by: Priyadarshini Rajagopal <prajagop@qti.qualcomm.com>
Signed-off-by: Chaitanya Pratapa <cpratapa@codeaurora.org>
2020-04-28 10:53:31 -07:00
Jennifer L. Zenner
f127bb6378 msm: ipa3: tx optimization - caching tx_wrapper
Caching tx_wrapper for tx DP optimization.
This change modifies tx_wrapper allocation from completely
dynamic,to partially dynamic for the WAN and LAN producer pipes.

A new list of free tx_wrapper is added,this can
dynmically decrease and grow, with a thereshold
which is initially read from the dts, and can be
changed via debugfs on runtime.

Change-Id: I60032a67f9ae87baeb42848cc312bf211c84f4e0
Acked-by: Tal Gelbard <tgelbard@qti.qualcomm.com>
Acked-by: Chemin Hsieh <cheminh@qti.qualcomm.com>
Signed-off-by: Jennifer L. Zenner <jzenner@codeaurora.org>
2020-04-21 23:33:09 -07:00
qctecmdr
683ff3e645 Merge "Enable IPA and GSI driver compilation on techapck for holi target" 2020-04-20 10:13:46 -07:00
Ashok Vuyyuru
6e7bb4015e Enable IPA and GSI driver compilation on techapck for holi target
Add conf and header files to enable compilation in
GKI QGKI and debug modes for holi target.

Change-Id: I37ec5333602ee2dd0be89504f8dbf8951562cf25
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2020-04-18 01:42:20 +05:30
Bojun Pan
7d97a47c9b msm: ipa4: fix the rmnet_ctl tx spin_lock init issue
Add the spin_lock init for rmnet_ctl tx lock.

Change-Id: Ic9837d0ddad493dbeb9fc2566a9756b33811c40a
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
2020-04-16 18:30:58 -07:00
Michael Adisumarta
e5127624bd msm:ipa: changes to defer remote channel starting for rndis connect
this change defers starting of remote channels on device for rndis to
wan state ioctl is received thus avoiding double channel starts from
usb connect and wan state ioctl.

Change-Id: Ibd0960927496a1c2fd14b2df8fa94287dd2388a7
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
2020-04-15 18:44:18 -07:00
Armaan Siddiqui
764c42be07 msm: ipa: Fix compilation issues when DEBUG_FS is disabled
Adding changes to fix compiltaion errors when
flag CONFIG_DEBUG_FS is disabled.

Change-Id: Ib27c1ee1f883221f7cf240344b16d32219fd585c
Signed-off-by: Armaan Siddiqui <asiddiqu@codeaurora.org>
Signed-off-by: Prakruthi Deepak Heragu <pheragu@codeaurora.org>
2020-04-09 19:18:12 -07:00
Bojun Pan
03901ca73a msm: ipa: replace the deprecated APIs.
replace ioremap_nocache with ioremap

Change-Id: I6533d9f6dbbce8ef97d76963d3194b05d7f8376a
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
2020-04-07 15:49:20 -07:00
qctecmdr
ade0fb0c79 Merge "msm: ipa3: Fix to use the msecs_to_jiffies" 2020-04-07 12:40:54 -07:00
Ashok Vuyyuru
607c3f123c msm: ipa3: Fix to use the msecs_to_jiffies
Based on HZ configured in target defconfig wait time was changing.
To avoid these scenario using msecs_to_jiffies function it will
give fixed time value based on HZ configured on the system.

Change-Id: Ia3fe08c238afb618b158b67d1b226ad62197391f
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2020-04-07 22:06:39 +05:30
Ashok Vuyyuru
444bdbd243 msm: ipa4: Adding changes to support load new GSI FW
Lito and Lagoon targets sharing same lunch option but
using different signing images, adding support
to load specific FW image to based on DTSI entry.

Change-Id: I468378fa163255a1ae8b0f7f2bb9726e7b656bd6
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2020-04-04 00:32:33 +05:30
Bojun Pan
c8a055ea6c xmsm: ipa4: rmnet_ctl low latency pipe support
Add 2 new pipes support for qmap flow control and low latency
traffic from rmnet_ctl module.

Change-Id: Iae11e742f1f3d1d3ec7b21b02426b0164dcb13c5
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
2020-03-30 23:00:48 -07:00
Ashok Vuyyuru
62f45adb3d msm: ipa: Fix to avoid NULL pointer access after freeing it
Observing SMMU fault because of providing the already free pointer to
IPA HW. Add changes to avoid the accessing the already freed pointer.

Change-Id: I4d7420816aec0ab7207c683315558e551373d8bc
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
Signed-off-by: Chaitanya Pratapa <cpratapa@codeaurora.org>
2020-03-23 11:58:22 -07:00
Ashok Vuyyuru
58de42af6b msm: ipa3: Fix to not send command for test prod pipe
Following issues are observed:
 - For coalescing close frame not incrementing the ep_flt_num
 - In endpoint mapping added new unused endpoint with filter support
   because of that sending command for unused pipe.
Add changes to increment ep_flt_num number when sending coalescing
close frame command and avoid sending command for TEST_PROD pipe.

Change-Id: I3604c015308977c45eb1b251ed54d6e6744f643d
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
Signed-off-by: Chaitanya Pratapa <cpratapa@codeaurora.org>
2020-03-19 17:25:18 -07:00
Chaitanya Pratapa
23515598ab msm: ipa: Update source and dest resource group values
This update will ensure that all the source and destination groups are
updated for IPA4.9.

Change-Id: I33e4c054d762f0fa2438d12e0c7a76dc10ea1395
Acked-by: Priyadarshini Rajagopal <prajagop@qti.qualcomm.com>
Signed-off-by: Chaitanya Pratapa <cpratapa@codeaurora.org>
2020-03-13 17:52:39 -07:00
qctecmdr
c861b628a4 Merge "msm: ipa: Fix ipa3_wwan_xmit return type" 2020-03-11 13:04:34 -07:00
qctecmdr
475122cbfe Merge "update trace paths" 2020-03-09 12:10:53 -07:00
Chaitanya Pratapa
7049e7475f msm: ipa: Fix ipa3_wwan_xmit return type
This change will fix the error seen with CFI for the return type of
ipa3_wwan_xmit.

Change-Id: Ib201debb338295f3a83bf07f51e0434cd3519db4
Acked-by: Priyadarshini Rajagopal <prajagop@qti.qualcomm.com>
Signed-off-by: Chaitanya Pratapa <cpratapa@codeaurora.org>
2020-03-05 18:24:57 -08:00
Amir Levy
d1106307c3 update trace paths
update trace paths to direct to techpack dataipa folder
rather than old kernel path

Change-Id: Id6faa1f7858ecd493e66b169d31b15b1283ca887
Signed-off-by: Amir Levy <alevy@codeaurora.org>
2020-03-04 15:06:50 +02:00
Amir Levy
05adaa0971 align with ipa driver in kernel
As IPA driver moved to techpack, align with kernel version

Change-Id: Ifc3e0d40b6d54f0828fd4c4afc3b8e51a3ec7ffe
Signed-off-by: Amir Levy <alevy@codeaurora.org>
2020-02-27 14:13:25 +02:00
Amir Levy
73c931c92c Enable IPA and GSI driver compilation on techapck
Update makefile to enable IPA and GSI driver
compilations. Add ipa_clients_manager that will register
ipa clients API to ipa_framework at the kernel.
Add conf and header files to enable compilation in
GKI QGKI and debug modes.

Change-Id: I6993b1f6e88f89c8cd8c02fa2fc8cf6a6f169f7d
Signed-off-by: Ghanim Fodi <gfodi@codeaurora.org>
Signed-off-by: Amir Levy <alevy@codeaurora.org>
2020-02-24 16:18:32 +02:00
Bojun Pan
a619aab34b msm: ipa4: debug patch gsi interrupt issue
Debug patch for GSI interrupt issue.

Change-Id: I705cd893233e1afcaeed6fedb424830e39621114
Acked-by: Ashok Vuyyuru <avuyyuru@qti.qualcomm.com>
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
2020-02-06 14:25:58 +02:00
Prakruthi Deepak Heragu
6ef7ceaf5c msm: gsi: Fix the WARNING for gsi_write_channel_scratch
Definition of the __gsi_update_mhi_channel_scratch is moved to the end
where it is followed by no other non static function.

Change-Id: I6243fbb322c504d606bd5cd02302627afadc82ea
Signed-off-by: Prakruthi Deepak Heragu <pheragu@codeaurora.org>
2020-02-06 14:25:45 +02:00
Ghanim Fodi
d0ea932ccf Update IPA and GSI driver techpack snapshot
Upate the driver to msm-5.4 kernel snapshot as of
'commit <e1007d065f6> ("sched/fair: consider uclamp
 boost while deciding the start_cpu")'.

Change-Id: If63ae521dd26cbf72514cd0b95acfe38ed68cf82
Signed-off-by: Ghanim Fodi <gfodi@codeaurora.org>
2020-01-29 21:23:50 +02:00