Commit Graph

194 Commits

Author SHA1 Message Date
Praveen Kurapati
c3b184eac4 msm: ipa3: Assert the device when IPA FW not loaded
Even though IPA FW is not loaded device continue perform
other operations. Due to which device moves to unstable
state. Added changes to assert the device when IPA FW not
loaded.

Change-Id: Ibc164ebfef382c0e06b0f9b81f91dcd5928a5f3c
Signed-off-by: Praveen Kurapati <pkurapat@codeaurora.org>
2020-10-21 18:18:22 +05:30
qctecmdr
9899d28499 Merge "msm: ipa: Fix rndis client disconnection gracefully" 2020-10-13 18:22:52 -07:00
qctecmdr
6be9b12bb8 Merge "msm: ipa3: Send enable force clear only for producer pipe" 2020-10-13 14:48:48 -07:00
Ashok Vuyyuru
5ed3cc3fcd 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.

Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
Change-Id: I850f360f18c6598af6914c9cd2c89cacad1ac4c9
2020-10-12 11:26:52 +05:30
qctecmdr
1903fc4aed Merge "msm: ipa: fix to delete napi tx object" 2020-10-10 14:01:25 -07:00
qctecmdr
08bab0a6ce Merge "msm: ipa: Fix setting disconnect in progress flag" 2020-10-09 17:56:28 -07:00
qctecmdr
222ef78f75 Merge "msm: ipa3: Fix to unmap sgt pages with correct size" 2020-10-09 12:49:33 -07:00
Chaitanya Pratapa
63d979273d msm: ipa: Fix rndis client disconnection gracefully
if there are packets coming from rndis client to device
IPA driver tries to gives those packets to network driver.
If at the same time USB disconnection is in progress, there
can be a possibility of race where callback is called with NULL
private data and it can result in a undefined behavior at client
driver. Make changes to add proper checks to handle the scenario
gracefully.

Change-Id: I7b3a5731ae21362dc67c53a2de464b17a223d4ba
Signed-off-by: Praveen Kurapati <pkurapat@codeaurora.org>
Signed-off-by: Chaitanya Pratapa <cpratapa@codeaurora.org>
2020-10-09 18:21:50 +05:30
Bojun Pan
7e92b9e0e8 msm: ipa: Fix setting disconnect in progress flag
When USB is disconnected USB driver deregisters callback
with IPA driver. If there are exception packets coming to USB
driver at the same time there is a possiblity of race condition
where callback is de-registered and IPA driver tries to access it.
Make changes to restrict the callback access when disconnect is
in progress.

Change-Id: I85d2876847bfd0b23f19b2b81e1aab68729b2e31
Acked-by: Chaitanya Pratapa <cpratapa@qti.qualcomm.com>
Signed-off-by: Praveen Kurapati <pkurapat@codeaurora.org>
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
2020-10-09 17:55:51 +05:30
Akshay Pandit
09b94adf7e ipa3: Fix to save sgt table info in proper context
Sg table tables are not contiguous page due to this while copying
total sg table it failing. To avoid this copying the each sg
table individually.

Acked-by: Akshay Pandit <pandit@codeaurora.org>
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2020-10-09 11:55:28 +05:30
Ashok Vuyyuru
eca7b0f54f msm: ipa3: Fix to unmap sgt pages with correct size
scatterlist pages not unmapped properly, it was leading to
issue when mapping the same pages again. Adding changes
to store scatterlist information properly and unmap the
page with correct length.

Change-Id: If11926608f633ce1d66150b1e4b6c515adc48049
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2020-10-09 11:48:46 +05:30
Chaitanya Pratapa
81310e8512 msm: ipa: fix to delete napi tx object
Make changes to delete NAPI TX object when pipe setup fails.

Change-Id: Ie7124fc9f996795b1a955166a9cae198f6a57f03
Signed-off-by: Chaitanya Pratapa <cpratapa@codeaurora.org>
2020-10-07 16:05:32 -07:00
Akshay Pandit
a2ea5ff32c msm: ipa3: fix the unmap logic
Ethenet driver npn phy address was same for UL/DL
pipes, currently this address was unmapped during
DL pipe disconnect where UL pipe still avtive,
move the logic to do the unmamp to the last pipe
disconnect.

Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
2020-10-07 03:37:37 -07:00
Ashok Vuyyuru
fb1282f82f msm: ipa3: Fix to map the npn phy address only once
Ethenet driver npn phy address was same for UL/DL
pipes, currently this address was mapped twice.
Added changes to map the map npn phy address only
once.

Change-Id: Icd713943326aad38ecf8e080a73d1d6bb8f641d2
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2020-10-07 03:28:54 -07:00
Ashok Vuyyuru
02d7436603 msm: ipa3: Reduce NAPI weight to 32
observing the shadow stack overflow due to skb is
chained using the frag_list more than 64. To reduce the
skb chained reducing the NAPI weight to 32.

Change-Id: I1164c7d8e886a1079d30c213c91827b0aa191db2
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2020-10-06 23:44:20 +05:30
qctecmdr
7e372e6a9d Merge "msm: ipa: Add change to support wdi gsi db polling" 2020-10-05 13:38:06 -07:00
Armaan Siddiqui
a577e8ee97 msm: ipa: Add change to support wdi gsi db polling
Changes done to support wdi gsi db polling based on
the polling flag whether enabled in dtsi or not.

Change-Id: Ib5559da136866dafc0b3ab3908c6073111dbab21
Signed-off-by: Armaan Siddiqui <asiddiqu@codeaurora.org>
2020-09-30 23:45:22 +05:30
qctecmdr
a69bd6f283 Merge "msm: ipa: add state for rmnet_ctl tx/rx pipes" 2020-09-28 17:30:58 -07:00
qctecmdr
2c16b81931 Merge "msm: ipa3: Rate limit excessive logging" 2020-09-23 19:45:35 -07:00
Bojun Pan
b793aca3be msm: ipa: add state for rmnet_ctl tx/rx pipes
When ssr happen in middle of egress ioctl, only tx pipe is setup
and the current state in teardown cannot handle it.
The fix is to add state for tx/rx setup separately.

Change-Id: I0eb4011ce91139acce3a619a8179d84066873953
2020-09-23 15:11:21 -07:00
qctecmdr
19c963a83d Merge "msm: ipa: Fix to remove duplicate proxy vote" 2020-09-23 08:50:32 -07:00
Sivakanth vaka
3049e6f03e msm: ipa3: Rate limit excessive logging
Rate limiting excessive logs when modem is in limited service.

Signed-off-by: sivakanth vaka <svaka@codeaurora.org>
2020-09-23 12:38:17 +05:30
Bojun Pan
f53c2a8a7a msm: ipa: correct the pointer in idr for FnR stats counter
The stats counter which saved in idr was some stack memory which
could be freed and cause memory corruption. The fix is to use
the memory allocated in heap instead.

Change-Id: Ie398b0271571fcff41cdb85de4d77d202b6552b5
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
2020-09-18 18:25:31 -07:00
Chaitanya Pratapa
7224364726 msm: ipa: Fix to remove duplicate proxy vote
In case if modem crashes even before uC is loaded, there is
a possibility that we hold the proxy vote twice and the clock
will not be disabled. Make changes to avoid duplicate proxy vote.

Change-Id: Id62994c79eff6868e3a491aa53963ec127ea1213
Signed-off-by: Chaitanya Pratapa <cpratapa@codeaurora.org>
2020-09-16 23:14:56 -07:00
qctecmdr
1a8bbaabfd Merge "msm: ipa3: Update the channel mode before start channel" 2020-09-16 18:58:43 -07:00
qctecmdr
f3fb4e64fb Merge "msm: ipa3: Fix to increase the inactivity timer" 2020-09-16 18:25:28 -07:00
Ashok Vuyyuru
a565f3ec5e msm: ipa3: Schedule the NAPI only from interrupt context
Due scheduling the NAPI in suspend path observing race conditions
in updating channel polling context and pipe polling context. To
avoid these scenario scheduling NAPI only from interrupt context.

Change-Id: I8eb0438618aedb9873e6eafc269435cc67c03dd5
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2020-09-16 23:31:32 +05:30
Ashok Vuyyuru
efa43ef916 msm: ipa3: Fix to increase the inactivity timer
In low latency ping scenario clock unvoting fastly due to this
ping RTT was increased. To avoid these scenario increased the
inactivity timer to 100msec.

Change-Id: I9b11e2adbe087aa67fa2e7ed751b190abb09d0ed
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2020-09-16 22:27:38 +05:30
Ashok Vuyyuru
ecf3b98c7c msm: ipa3: Update the channel mode before start channel
Observing the race condition if channel mode configured after
channel start. To avoid these race conditions configuring
the channel mode and starting the channel.

Change-Id: I8f8ec2d9faed320539e2b18de90ab24059a5616c
2020-09-16 22:17:09 +05:30
qctecmdr
596aec557e Merge "msm: ipa: adding checks if the rt_rule is not freed" 2020-09-11 05:10:34 -07:00
Bojun Pan
3b8fe1bc8e msm: ipa: fix the use-after-free on qmi framework in ssr scenario
IPA drvier free the qmi server hdl without notify the qmi
framework which is causing the use-after-free on QMI framework.
The fix is to notify qmi framework before freeing the qmi handle.

Change-Id: I1ec9d3efd29283fddd958561a538b2995222a53c
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
2020-09-09 15:06:26 -07:00
Michael Adisumarta
3fa607227c msm: ipa: adding checks if the rt_rule is not freed
Adding checks if the rt_rule is not freed
before committing.

Change-Id: I4a2c86c24587a6a3ea7318bac438a9f27784f2f7
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
2020-09-03 19:37:15 -07:00
Bojun Pan
8e1f7e0c74 msm: ipa: set the mac header to 0 for rx skbs
packet_rcv_spkt is expecting to strip out the skb_mac_header.
Part of the alloc_skb, the mac header is setup ~0 which is causing
the skb data point to wrong location.

Change-Id: Ib8c14c029145da6a779ead21fb851b26677f4d0f
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
2020-09-02 21:58:57 -07:00
qctecmdr
feeb959896 Merge "msm: ipa: rate limiting the warning" 2020-09-02 19:47:07 -07:00
qctecmdr
078699f087 Merge "msm: ipa: Fix to set holb discard" 2020-09-02 06:22:27 -07:00
qctecmdr
45998a733a Merge "msm: ipa: stay in NAPI mode when default pipe has low credits" 2020-09-02 02:32:13 -07:00
qctecmdr
c19fb2d8ce Merge "msm: ipa3: Following HPG sequence for HOLB enabling" 2020-09-02 00:18:36 -07:00
Chaitanya Pratapa
d53edd4445 msm: ipa: Fix to set holb discard
As part of HOLB monitoring, uc will clear the HOLB discard if
it was set as part of HOLB monitoring or it can clear if
peripheral recovers just before receiving HOLB_DEL command.
Make change to set HOLB discard back if it was intended to be
configured from AP as part of disconnect scenarios.

Change-Id: I6659a62499150844c3b540fadb4ba8b9535f5e45
Signed-off-by: Chaitanya Pratapa <cpratapa@codeaurora.org>
2020-09-01 21:31:21 -07:00
Bojun Pan
8ed7d53cf1 msm: ipa: stay in NAPI mode when default pipe has low credits
When we have no buffer available in HW and switch to irq, a dead-loop is
observed between sending force close comamnd and replenish workqueue.
The fix is to keep in polling mode, wait for napi-poll and replenish again.

Change-Id: Ied0504564f86f41b8b5f9aa25170768027bf3391
2020-09-01 17:47:15 -07:00
Michael Adisumarta
c999c696ac msm: ipa: rate limiting the warning
Rate limitting the warning if client doesn't have
callback.

Change-Id: I09b02181e4c34ecf342e150de76eace9341a0c0a
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
2020-09-01 16:32:48 -07:00
Chaitanya Pratapa
13c8f5cea2 msm: ipa: disable status on ODL_DPL_CONS pipe above IPAv4.5 targets
ADPLv3 targets do not require status to be enabled on ODL_DPL pipe.
Make changes to disable the status for targets with IPAv4.5 and above.

Change-Id: Ica07a25a01e742928d3ecb19a88b7ee2305235ae
Signedo-off-by: Chaitanya Pratapa <cpratapa@codeaurora.org>
2020-08-31 17:08:30 -07:00
Michael Adisumarta
915d352b94 msm: ipa3: Following HPG sequence for HOLB enabling
Correcting the sequence to dynamically change the HOLB timer.

Change-Id: Iefcac36b93f3aee037628e3b0ec81aa5f5636caa
Acked-by: Suhas mallesh <smallesh@codeaurora.org>
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
2020-08-25 17:49:51 -07:00
qctecmdr
996d5675d6 Merge "ipa: Fix debugfs tethering stats print" 2020-08-22 13:59:26 -07:00
qctecmdr
85389c4153 Merge "ipa: Fix MHI channel resume after stuck GSI" 2020-08-22 13:28:32 -07:00
qctecmdr
60195e2ad2 Merge "msm: ipa: Fix lan polling to use max budget" 2020-08-20 00:41:34 -07:00
qctecmdr
33b0fd1d1a Merge "msm: ipa4: fix the unclock gsi IPA register access" 2020-08-19 19:14:56 -07:00
qctecmdr
3d503d5b16 Merge "msm: ipa4: Disable uc monitoring stats for holi target" 2020-08-19 18:30:16 -07:00
qctecmdr
08bb775bb1 Merge "msm: ipa4: Configure the destination resource group for DRB-IP" 2020-08-19 17:58:54 -07:00
Ashok Vuyyuru
8cb85b52b3 msm: ipa4: Disable uc monitoring stats for holi target
In holi target due uC memory constraints uC monitoring stats
not support. So disabling the sending monitor command to uC.

Change-Id: I34e319118287fcd82876344bd85ab53c50cf5651
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2020-08-19 22:02:20 +05:30
Ashok Vuyyuru
7c957296ab msm: ipa4: Configure the destination resource group for DRB-IP
Adding changes to configure the destination resource group for DRB-IP.

Change-Id: I41248e7e7e92a0e4635b8661d1f324be165bd2fa
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2020-08-19 21:58:56 +05:30