Commit Graph

351 Commits

Author SHA1 Message Date
qctecmdr
625c41160e Merge "msm: ipa3: Fix race condition during teardwon pipe" 2020-10-27 18:01:51 -07:00
Chaitanya Pratapa
7abd8fd060 msm: ipa: Add new IOCTLs to get and set MTU
Add a new IOCTL that will allow userspace modules to
get and set the v4/v6 mtu for a specific rmnet interface
for IPA driver and IPACM to use.

Change-Id: Iaf0685ef7095960ddd1cd3fff803956a18e0a942
Signed-off-by: Chaitanya Pratapa <cpratapa@codeaurora.org>
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
2020-10-27 16:33:28 -07:00
Ashok Vuyyuru
056ae77554 msm: ipa3: Fix race condition during teardwon pipe
When endpoint in polling mode possible to pipe teardown trigger parallel
it leads to race condition. Adding changes to check in endpoint came out
of polling mode and continue to teardown the endpoint.

Change-Id: I0b22d6a7a1f5229acec2dbc9dd5cb76488c09faa
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2020-10-28 00:03:46 +05:30
Bojun Pan
1bc2e39799 msm: ipa: IPA EMAC offload enhancement for HQX
Add support for contigious ring SMMU mapping.
Add Tx notify cb support for completions.

Change-Id: I3fa19a853311dd64ff7d247e6349009d692efb59
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
2020-10-27 22:34:55 +05:30
qctecmdr
fd8a20143f Merge "msm: ipa: removing warn on no client callback" 2020-10-22 01:41:36 -07:00
qctecmdr
491c0e168c Merge "msm: ipa3: Assert the device when IPA FW not loaded" 2020-10-21 18:38:44 -07:00
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
59ba38c627 Merge "msm: ipa: Fix use-after-free in ipa3_alloc_counter_id" 2020-10-20 20:01:34 -07:00
qctecmdr
db1950ae4f Merge "msm: ipa3: Add max PDN num based on hardware version" 2020-10-20 02:46:57 -07:00
qctecmdr
c8e9fa2ecb Merge "msm: ipa4: Add change to stop netdev" 2020-10-19 18:16:47 -07:00
qctecmdr
e4e6dab6e5 Merge "msm: gsi: dump channel information" 2020-10-19 11:59:36 -07:00
Pooja Kumari
ccab5b663e msm: ipa3: Add max PDN num based on hardware version
Currently defined max PDN number is generic for all
hardware version which is incorrect. Define PDN based
on hardware version to support correct number of PDN.

Change-Id: I3e898a32104562584b4702132c57b7f1cb8deeca
Signed-off-by: Pooja Kumari <kumarip@codeaurora.org>
2020-10-19 13:56:00 +05:30
Praveen Kurapati
8fd807809b msm: ipa3: Fix to use proper clock timer
Add changes for active client logging info to use
proper timer and reflect number of active clients.

Change-Id: Ifff1616c88850ef8c604bca54957d953e5154598
Signed-off-by: Praveen Kurapati <pkurapat@codeaurora.org>
2020-10-16 16:24:33 +05:30
Praveen Kurapati
6e129eb1ea msm: ipa4: Add change to stop netdev
As SSR event is not received to APPS, some data
is sent to modem. Add change to stop netdev first
during SSR events and halt the modem channels.

Change-Id: Id62d5f0cf811a30dc796401c15cf1ed6b8425992
Signed-off-by: Praveen Kurapati <pkurapat@codeaurora.org>
2020-10-16 14:28:28 +05:30
Michael Adisumarta
d0c1bd6bdf msm: ipa: removing warn on no client callback
Removing warn on whilst no client call back on
pm register.

Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
2020-10-14 15:32:50 -07:00
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
4265276331 msm: ipa: Add additional trace points for rx/tx
Make changes to add additional trace points for rx
and tx path. Also enhance existing traces to capture more
information.

Change-Id: I40d5bfc4080a47d986e16ac157524c341949e51e
Signed-off-by: Chaitanya Pratapa <cpratapa@codeaurora.org>
2020-10-08 18:02:04 -07:00
Michael Adisumarta
0d5800910f msm: ipa: Fix use-after-free in ipa3_alloc_counter_id
Make changes to memcopy before preload end.

Change-Id: 	Icc056a3bcd5b739b8165813202c87dd84e72c78a
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
2020-10-08 16:22:27 -07:00
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
Chaitanya Pratapa
4e3719b0fc msm: gsi: dump channel information
Dump channel information when stop channel fails.

Change-Id: I39ef3338c9e7e968ee6a592debc23edbff9f8fc8
Signed-off-by: Chaitanya Pratapa <cpratapa@codeaurora.org>
2020-10-06 13:36:27 -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