Commit Graph

288 Commits

Author SHA1 Message Date
Michael Adisumarta
dd7950746f techpack: ipa: Fixing compile errors
Addressed unintialized pointers and P1 errors and
fixing them accordingly.

Change-Id: Iba70c5fdf91fffd823c3473383e687fe8b549b64
Signed-off-by: Michael Adisumarta <madisuma@codeauror.org>
2020-07-14 16:43:36 -07:00
Ashok Vuyyuru
a2aa9f1235 msm: ipa4: Fix to mask the global interrupt INT1
Receiving the global interrupt INT1 without sending any
generic commands. So disabling interrupt by default.
Enabling the interrupt only before sending the generic command.

Change-Id: I55011933d92d29e19cc478ed1dbea9d08b95d239
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2020-07-14 10:33:00 +05:30
Michael Adisumarta
b5286ca355 msm: ipa: use detach/attach netif instead of stop/wakeup
To make sure detach and attach netif instead of stop
and wakeup and also to update transfer timer update.

Change-Id: I9d589b7f9f6fe98f778df509d3c16f339dfdeea1
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
2020-07-13 21:23:44 -07:00
Ilia Lin
554a879753 gsi: Fix NULL pointer dereference on event-less channels
If gsi_start_channel() or gsi_stop_channel() are called
on a channel with no event ring allocated, there will be
null pointer dereference error.
Adding null pointer check.

Change-Id: I200aa09f49c2394041f66c33c458f7daa9aeaf8c
Signed-off-by: Ilia Lin <ilial@codeaurora.org>
2020-07-13 12:04:33 +03:00
Ilia Lin
86e8365599 ipa: Fix MHI flavor detection
The ipa3_get_hw_type_index() uses the ipa3_ctx->ipa_config_is_mhi
for MHI flavor detection. Therefore the ipa3_ctx->ipa_config_is_mhi
has to be initialized before the ipa3_get_hw_type_index() call.

Change-Id: I8446c68f8b1fb0e2a56838e92f59198bd6890462
Signed-off-by: Ilia Lin <ilial@codeaurora.org>
2020-07-13 09:15:44 +03:00
qctecmdr
8ca7410b47 Merge "msm:ipa: add stats for low latency data-path" 2020-07-08 20:28:57 -07:00
qctecmdr
e4a4c9197a Merge "msm:ipa: fix for EOB scatter & gather support" 2020-07-08 20:02:01 -07:00
qctecmdr
9888de5027 Merge "ipa: fix ipa3_send_nop_desc locking before alloc" 2020-07-08 11:24:26 -07:00
qctecmdr
c81a5ae586 Merge "msm: ipa3: Fix to avoid gsi/sys len stats mismatch" 2020-07-08 08:08:10 -07:00
Bojun Pan
532fe68c9c msm:ipa: add stats for low latency data-path
Rate limit the warning which could cause latency on low_lat data path.
Add stats count for buffer replenish issues.

Change-Id: I8ce8c7584be211e215a05b6c5c9a1ff1b2512240
2020-07-07 14:40:38 -07:00
qctecmdr
8bb9e5aa2e Merge "techpack: ipa: Fix include path" 2020-07-07 12:45:20 -07:00
Ashok Vuyyuru
dfa193fcfc msm: ipa3: Fix to avoid gsi/sys len stats mismatch
In suspend just before stopping the channel possible to receive
the IEOB interrupt and xfer pointer will not be processed in this
mode but gsi stats are updated.  In resume after starting the channel
will receive the IEOB interrupt and xfer pointer will be overwritten
because of this observing the gsi/sys len stats are not matching and
buffers won't be replinished properly leading to HW stall.
To avoid this process all data in polling context, gsi/sys len
stats are updated properly.

Change-Id: Id665448165b6aa51b251cddd72573c6df64ee541
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2020-07-07 22:55:23 +05:30
qctecmdr
c67509b1c4 Merge "msm: ipa4: flow control changes for rmnet pipe" 2020-07-07 09:55:50 -07:00
qctecmdr
809b201347 Merge "msm: ipa3: Cache gsi_ver" 2020-07-07 09:26:18 -07:00
qctecmdr
be18f5ed82 Merge "msm: ipa: Add default cases for gsi and ipa hw version" 2020-07-07 06:55:32 -07:00
Amir Levy
f02a072963 msm: ipa3: Cache gsi_ver
Caching gsi_ver in static global variable ipa3_res.
Added gsi_ver to struct ipa3_plat_drv_res.
Caching gsi_ver in function ipa3_post_init in gsi_props of type
struct gsi_per_props.

Change-Id: I63e286d907be8d6151ed3a19bb1ef3c0601b9dc7
Acked-by: Eliad Ben Yishay <ebenyish@qti.qualcomm.com>
Signed-off-by: Amir Levy <alevy@codeaurora.org>
2020-07-07 00:34:12 -07:00
qctecmdr
e348baa3ab Merge "msm: ipa: Fix to ignore return value of netif_receive_skb" 2020-07-04 16:00:22 -07:00
qctecmdr
ba036e5337 Merge "techpack: ipa: Fixing compile errors" 2020-07-04 15:16:18 -07:00
Michael Adisumarta
f4ea405fa9 techpack: ipa: Fixing compile errors
Addressed NULL check and P1 errors and fixing them accordingly.

Change-Id: I1a7e03fad2bd54d4c035a783f16709be12cd5be8
Signed-off-by: Michael Adisumarta <madisuma@codeauror.org>
2020-06-30 16:01:47 -07:00
Ilia Lin
44ea5a55e0 techpack: ipa: Fix include path
Defined proper include search path for the header files
in the project, and changed the "#include" lines accordingly.

Change-Id: I759177e2e2c32b2e062774d2a68d40b63a0f6906
Signed-off-by: Ilia Lin <ilial@codeaurora.org>
2020-06-28 09:14:17 +03:00
Chaitanya Pratapa
f3219c84cd msm: ipa: enable status supression on WAN_PROD pipe
Processing status on every packet increases MIPS consumption
on Q6. Enable status supression to disable sending status
for every packet on UL path.

Change-Id: Ie818bcac683ee8b46e2e8a7a64e62e17ffda67ad
Signed-off-by: Chaitanya Pratapa <cpratapa@codeaurora.org>
2020-06-25 21:05:49 -07:00
Armaan Siddiqui
85c85ac455 msm: ipa: Add default cases for gsi and ipa hw version
Add default cases to avoid compilation error for unsupported
or new hw version

Change-Id: I37d8c753225a71ef6f1f28261e5938e40435fe50
Signed-off-by: Armaan Siddiqui <asiddiqu@codeaurora.org>
2020-06-25 00:53:53 +05:30
Chaitanya Pratapa
5b8bdb72db msm: ipa: Fix to ignore return value of netif_receive_skb
Default return value of netif_receive_skb is drop. Make
changes to ignore the return value to avoid printing error
for every packet.

Change-Id: I002e53c85d6bfa781240e65ee38175dae68a80bb
Signed-off-by: Chaitanya Pratapa <cpratapa@codeaurora.org>
2020-06-24 11:52:40 -07:00
Amir Levy
cf1055773b ipa: fix ipa3_send_nop_desc locking before alloc
After adding the tx_pkt_wrapper cache the allocation
was done in GFP_KERNEL while SoftIrqs are disabled
since spin_lock_bh was used.
This change releases the spinlock before allocation is done.

Change-Id: I3c3cee3e82d581c79a0258d3fcec378ed3d9a07c
Acked-by: Tal Gelbard <tgelbard@qti.qualcomm.com>
Signed-off-by: Amir Levy <alevy@codeaurora.org>
2020-06-24 07:37:55 -07:00
qctecmdr
8a9d067807 Merge "Register more ipa API" 2020-06-23 16:48:26 -07:00
Bojun Pan
ac6004def6 msm:ipa: fix for EOB scatter & gather support
1. Fix the issue where IPA adds the fragments into
the skb in reverse.
2. Fix the size update to stack for EOB packet.

Change-Id: I24e33391859dfe735cd3258a797e2c86d90bdfd6
2020-06-23 14:12:54 -07:00
Chaitanya Pratapa
ec886de69e ipa: Add support to notify wan upstream iface info
Netmgr requires upstream iface info whenever tethering is
enabled to toggle RSB advanced feature on/off for the
respective upstream iface. Make changes to give provision
to get upstream iface whenever tethering is enabled and
post a uevent.

Change-Id: I841e334fa9000dd5a0f0cc4fce52c5432f67cba8
Signed-off-by: Chaitanya Pratapa <cpratapa@codeaurora.org>
2020-06-21 20:07:47 -07:00
Amir Levy
253faa1d8c Register more ipa API
register the following ipa clients to ipa_framework:
ipa_wdi3
ipa_gsb
ipa_uc_offload
ipa_mhi
ipa_wigig
this comes as an addition to ipa_usb support.

Add all remaining IPA core driver API functions.
remove internal functions.
remove deprecated code from mhi_client and ipa_rm.

Change-Id: Ia56520863446c42ca7b4602f1633e0887abb0b40
Signed-off-by: Amir Levy <alevy@codeaurora.org>
2020-06-20 23:55:14 -07:00
qctecmdr
e42ec8bab3 Merge "msm: ipa3: Fix increase the NAPI budget to maximum" 2020-06-19 13:24:50 -07:00
qctecmdr
7c22e26a44 Merge "msm: ipa: fix to check for ECONNRESET" 2020-06-19 12:57:38 -07:00
qctecmdr
9964653a72 Merge "msm: ipa3: Update channel start as success in flow control state" 2020-06-19 12:10:38 -07:00
qctecmdr
415e826ed9 Merge "msm: ipa: Fix not resetting HOLB configuration for USB DPL Pipe" 2020-06-19 11:42:54 -07:00
Ashok Vuyyuru
1346a26798 msm: ipa3: Fix increase the NAPI budget to maximum
Because of less NAPI budget it's need to reschedule multiple
times in high tput scenario.To avoid multiple reschedule
configuring maximum NAPI budget value.

Change-Id: Id8745b54c3909d01df69376a823396ea4c94eebb
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
Signed-off-by: Chaitanya Pratapa <cpratapa@codeaurora.org>
2020-06-19 23:06:33 +05:30
Michael Adisumarta
8135efe0d4 msm: ipa: fix to check for ECONNRESET
ECONNRESET is returned if Q6 QMI service is down. Make changes to
check for ECONNRESET as well to detect SSR.

Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
2020-06-17 16:07:02 -07:00
Praveen Kurapati
2c82e9319e msm: ipa3: Update channel start as success in flow control state
Observing race condition when we are starting the channel and
modem trying to offload flow_control on same channel. Add changes
to retrun success if channel state is flow control when trying to
start the channel.

Change-Id: Id254cd0e3e17c74e931d27cb96577224559c091e
Signed-off-by: Praveen Kurapati <pkurapat@codeaurora.org>
2020-06-17 12:31:13 -07:00
Ashok Vuyyuru
8b2da330a4 msm: ipa4: flow control changes for rmnet pipe
When the RMNET pipe channel in the started state receiving the
junk packets, it leading IPA HW stall. Add changes to support
the new flow control channel state for rmnet pipe, it avoids
entering the junk packet to IPA HW.

Change-Id: If2b3992e8cdc93343e70f9d2c1783bbbde329bc2
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2020-06-17 22:47:36 +05:30
Amir Levy
7fa129bfd4 ipa: revert tx-napi to be enabled via dts
This is a revert of a temporary change:
I178bf6fe4e17bf107f98086a9fd52f4cad484950

Was done since issues with the dts was resolved.

Change-Id: I7fec695989bee54f96c8cbe6c8f30dcce4a1e005
Acked-by: Tal Gelbard <tgelbard@qti.qualcomm.com>
Signed-off-by: Amir Levy <alevy@codeaurora.org>
2020-06-17 09:52:00 -07:00
Chaitanya Pratapa
4ebba45613 msm: ipa: Fix not resetting HOLB configuration for USB DPL Pipe
When switching from USB DPL to ODL or vice versa, HOLB configuration
should not be resetted as there can be a race where HOLB set by Modem
is removed by AP.

Change-Id: I8d7feb43f2c28b3a8f150e64b5089f9d8b991545
Signed-off-by: Chaitanya Pratapa <cpratapa@codeaurora.org>
2020-06-16 22:00:46 -07:00
Arnav Sharma
0701cc2fb8 Fastforwarding dataipa code to data-kernel.lnx.1.1
Change-Id: Ia444a39ed3b08abdacccd27a24685cd6ddcfc995
2020-06-11 16:49:53 -07:00
Michael Adisumarta
4045331780 msm: ipa: read channel stats from local variable
Fetch channel stats from local variable instead of
reading it from MMIO, which would have resulted in
Unclocked access.

Change-Id: I9a4eedeaa28cd52fade6ab9bea7151b702ca46d0
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
2020-06-10 21:09:44 -07:00
Bojun Pan
03f3d1ac41 msm: ipa: fix the use after free in rmnet_ipa_ctl xmit
skb->len is still used to update the tx stats, after the skb
could be freed in tx completion context.

Change-Id: I2c490dfdbc9401613816058c1c8207ea6b6f3450
2020-06-08 15:15:58 -07:00
Amir Levy
ec17a7f341 msm: ipa: cancel timer after EOT packet sent
Canceling the nop descriptor timer in case we eventually
do send an EOT packet since we cross the threshold

Change-Id: Ifcf8615c19cf8ce36a2198d214c7c7ff68501e43
Acked-by: Tal Gelbard <tgelbard@qti.qualcomm.com>
Signed-off-by: Amir Levy <alevy@codeaurora.org>
2020-06-02 00:09:13 -07:00
qctecmdr
557c185a3d Merge "msm:ipa: fix the tx_napi enable condition" 2020-05-29 12:41:47 -07:00
qctecmdr
19cf065ea0 Merge "msm: ipa: fix to check for ECONNRESET" 2020-05-29 11:49:46 -07:00
Bojun Pan
f4527983e0 msm:ipa: fix the tx_napi enable condition
Only enable the tx_napi on APPS_PROD pipes.

Change-Id: Iaff4645e618d37604a86b5fc05f6cfe6e677c156
2020-05-28 10:28:25 -07:00
Chaitanya Pratapa
18866f3967 msm: ipa: fix to check for ECONNRESET
ECONNRESET is returned if Q6 QMI service is down. Make changes to
check for ECONNRESET as well to detect SSR.

Change-Id: If466106ed6726aa7d60af86bdcf5e55ef03b6e2c
Signed-off-by: Chaitanya Pratapa <cpratapa@codeaurora.org>
2020-05-27 22:14:16 -07:00
Bojun Pan
f29b6320d4 msm: ipa: fix the unlock issue for rmnet_ctl module
Fix the double unlock issue on rmnet_ctl_wakeup_ipa.

Change-Id: I3f559a7296463fee446da5b8f0174ccae91ba43a
2020-05-27 11:15:07 -07:00
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