1191 Commits

Author SHA1 Message Date
Pooja Kumari
8799b3ea93 ipa3: validate ipahal_ctx before use
Add check to validate ipahal_ctx before dereference
to avoid NULL pointer dereference error.

Change-Id: Id07ab470629c09a9a9d96f874cb0147cd71e4976
Signed-off-by: Pooja Kumari <kumarip@codeaurora.org>
2020-09-08 10:08:46 +05:30
qctecmdr
df46098ca0 Merge "msm: ipa3: remove debug log to avoid flooding" 2020-09-03 03:22:59 -07:00
qctecmdr
7a61698d03 Merge "msm: ipa: update the iommu mapping for WDI rings" 2020-09-02 10:08:43 -07:00
qctecmdr
307064fba6 Merge "msm: ipa3: add v2x ethernet support" 2020-09-02 01:46:46 -07:00
qctecmdr
f156a1c0aa Merge "msm: ipa3: Fix to save sgt table info in proper context" 2020-08-27 16:58:37 -07:00
Sivakanth vaka
b0e43e6b70 msm: ipa3: remove debug log to avoid flooding
Each time read_write_context is being invoked the dma_enable
will log the debug print if reference count is greater than 0.

Change-Id: Ib922c7920a08ff85b06522767a9027c84e2afb9c
Signed-off-by: sivakanth vaka <svaka@codeaurora.org>
2020-08-25 12:23:05 +05:30
Skylar Chang
bc888f07a3 msm: ipa3: add v2x ethernet support
Add the v2x ethernet pipe connect support
for offloading v2x traffic.

Change-Id: I5e84f7e1d07722eeb5a7b9fbfbccb69451c72934
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
2020-08-23 23:53:48 -07:00
Skylar Chang
17cb32c226 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.

Change-Id: I697edb844b8134d2a1d52e3c2bcfd0a7066edb2f
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
2020-08-22 18:36:05 -07:00
qctecmdr
57fcfe9790 Merge "msm: ipa3: add eth ep_pair info" 2020-08-20 01:16:21 -07:00
Ashok Vuyyuru
2e16536254 msm: 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.

Change-Id: I08dfceaaee674ab642126c42d6978af5749d9909
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2020-08-19 01:52:05 +05:30
qctecmdr
0320f1046a Merge "msm: ipa: Fix deleting the routing entries" 2020-08-11 22:27:07 -07:00
qctecmdr
1b0e3f904f Merge "msm: ipa: eth: Prevent suspend for 2 seconds after device resume" 2020-08-11 22:27:06 -07:00
Michael Adisumarta
8aded3de2b msm: ipa: Add IPv6 NAT uc activation interface
Add IOCTLs for adding and deleting uc activation entries.
Amend Socksv5 add\delete entry algorithm to allow IPv6 NAT
and Socksv5 entries to co-exist in activation table.
Add debugfs entry to dump uc activation table.

Change-Id: I5382a393cb2890cd6c6ee4dc73eadf16c603294a
Signed-off-by: Amir Levy <alevy@codeaurora.org>
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
2020-08-09 18:26:12 -07:00
qctecmdr
f3883bd3b4 Merge "msm: ipa3: Fix to save the ntn buffers in SMMU disabled case" 2020-08-08 20:55:57 -07:00
Michael Adisumarta
3e0c01f48d msm: ipa: Fix deleting the routing entries
Make changes to delete the route entry even when the hdr/proc_ctx
handles are already freed. Otherwise the entry will be dangling.

Change-Id: Icbab6b96fa137c5214b37ea33c6203c5a54273ac
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
2020-08-06 21:09:39 -07:00
qctecmdr
1b3be85b2e Merge "msm: ipa3: Configure correct aggeragtion byte limit" 2020-08-06 10:35:41 -07:00
qctecmdr
1023d1f6a4 Merge "msm: ipa3: put ecm default as vlan in auto config" 2020-08-05 11:16:37 -07:00
qctecmdr
8f0f18d53d Merge "msm: ipa3: Fix to unmap sgt pages with correct size" 2020-08-05 10:59:22 -07:00
Ashok Vuyyuru
abb512e306 msm: ipa3: Fix to save the ntn buffers in SMMU disabled case
Not able to unmap the buffers due not saving data buffers
when SMMU disabled on EMAC side. Adding changes to save the
data buffer list in EMAC SMMU disabled case also.

Change-Id: Ia22110b450477927c35942f2161c2730086da892
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2020-08-05 19:26:30 +05:30
Skylar Chang
9ef4d26365 msm: ipa3: put ecm default as vlan in auto config
Made the change to put ecm as default in vlan mode
on auto configuration to resolve the issue where
usb connects to IPA faster than ipa-driver getting
vlan info from user-space.

Change-Id: I83d876e555e06eba762d98394e155df9b9797820
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
2020-08-04 10:36:29 -07:00
Bojun Pan
83b03a20d0 msm: ipa: update the iommu mapping for WDI rings
In IPA4.5, Lower-16_bits of Ring base + ring length can’t exceed 16 bits.
The fix here is to adjust the iova for ring base in smmu enable case.

Change-Id: I55ef76e6482b08e69976f1e7da9e2aa7fa9d7e09
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
2020-08-03 22:19:00 -07:00
Ashok Vuyyuru
db67b69c76 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-08-03 11:18:10 +05:30
Ashok Vuyyuru
a421185cff msm: ipa3: Configure correct aggeragtion byte limit
IPA HW will treat aggeragtion byte limit value 1 consider as 1K.
Adding changes to configuring the aggeragtion byte value w.r.t
IPA HW requirement.

Change-Id: Ibe9353a39971296f7e4b04f30039457c07c63033
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2020-07-31 18:23:47 +05:30
Jinesh K. Jayakumar
b3201eeadf msm: ipa: eth: Prevent suspend for 2 seconds after device resume
Hold wake lock for 2 seconds after a device resume for allowing the
device to settle and link interrupts to arrive after a resume.

Change-Id: I91fd3d689895a9526d66d613a273cb7cc231fb2e
Signed-off-by: Jinesh K. Jayakumar <jineshk@codeaurora.org>
2020-07-30 15:54:52 -07:00
qctecmdr
472cf8f2a8 Merge "msm: ipa3: Support uc header proc ctx for DSCP insertion" 2020-07-29 17:10:21 -07:00
Skylar Chang
3595311ff9 msm: ipa3: add eth ep_pair info
Add ep details corresponding to
RMNET_CV2X tethering over eth.

Change-Id: I0285887470c950a73e61dd51bf673bbc650d40bb
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
2020-07-17 23:58:08 -07:00
Skylar Chang
e18ef3bc1e msm: ipa3: add v2x ethernet pipes
Add cv2x ethernet endpoint configuration changes.

Change-Id: I6d1ac9cb5a282a871722e56f51c7c027b24b6b55
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
2020-07-17 23:56:28 -07:00
Akshay Pandit
5d0b7069d1 msm: ipa3: Support uc header proc ctx for DSCP insertion
Add UC header proc ctx support for inserting DSCP in layer 3 header.

Change-Id: I976b1f2bbbfda2acb3dd52fdebab09ac1ed90ecd
Signed-off-by: Akshay Pandit <pandit@codeaurora.org>
2020-07-17 20:20:18 +05:30
Ashok Vuyyuru
6499aacb4e 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
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2020-07-17 15:45:36 +05:30
Bojun Pan
0c9f9e9b79 msm: ipa: send the endp_desc QMI for low_lat only on non-auto mode
There is no low_lat use case on auto mode, so the ep mapping is
not defined.
Add sanity check to not sent endp_desc QMI for ep which is not
defined.
Add check to make sure send endp_desc specific to low lat only
for mhi non-auto case.

Change-Id: I6fe72556433c0ac84772411cc5b1ac99bcadc30e
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
2020-07-15 17:09:22 -07:00
qctecmdr
11b501f7bc Merge "ipa3: Support wdi3 over gsi on msmnile APQ target" 2020-07-13 04:11:41 -07:00
qctecmdr
798a2a7f9d Merge "msm: ipa: Move the QMI for mhi pipe info to modem bootup" 2020-07-10 00:10:22 -07:00
qctecmdr
b9175ffa4b Merge "msm: ipahal: Add uCP exception case for status pkt" 2020-07-09 17:49:18 -07:00
qctecmdr
2bc8843141 Merge "msm: ipa3: increase pkt ctx for cv2x rsrc grp" 2020-07-09 17:49:17 -07:00
Michael Adisumarta
a948d7af15 msm: ipahal: Add uCP exception case for status pkt
Add a new enum for uCP exception pkt status.
Handle the case where this pkt status exception is received.

Change-Id: Ib69e307548efed3482d4636db9161f423c051570
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
2020-07-08 14:57:41 -07:00
Akshay Pandit
313724d952 ipa3: Support wdi3 over gsi on msmnile APQ target
Define producer & consumer pipe configuration for wlan on APQ
platform with 4_1 IPA HW. Cleanup uc load notification 
handler during disconnect.

Change-Id: I6c394d81787d77f3c9869c55cce926573d7e27f0
Signed-off-by: Akshay Pandit <pandit@codeaurora.org>
2020-07-08 18:16:38 +05:30
qctecmdr
73edb29aec Merge "msm: ipa: Fix updating the doobell for WDI3" 2020-07-07 19:20:56 -07:00
Chaitanya Pratapa
7b304439c6 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-07-02 13:10:06 -07:00
qctecmdr
ebe1dd8f32 Merge "msm: ipa3: Fix to map the npn phy address only once" 2020-07-01 18:50:08 -07:00
qctecmdr
2e942526aa Merge "msm: ipa: Support hardware accelerated DIAG over qdss" 2020-06-30 02:25:01 -07:00
qctecmdr
51e46f463c Merge "msm: ipa3: Send actual DL flt rule to Q6" 2020-06-29 06:52:36 -07:00
Michael Adisumarta
ea1c45f40e msm: ipa: Support hardware accelerated DIAG over qdss
Add support to accelarate QDSS diag traffic over IPA
to the PCIe host.

Change-Id: Ia1f534b249e5581ebec4bf7deac073de50a252fe
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
2020-06-23 10:20:41 -07:00
Ashok Vuyyuru
465494eea8 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-06-21 23:56:03 -07:00
Ashok Vuyyuru
75148ccdc2 msm: ipa3: Add support to fastmap/geometry for each CB
Adding changes to support enable/disable fastmap
for each CB and setting geometry range for AP SMMU
node.

Change-Id: I4286561536cd8e41f68b91ce45913337c8ad279f
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2020-06-21 23:53:14 -07:00
qctecmdr
2dbdde89fc Merge "ipa3: Wait for IPA post init for 1000 msec before return" 2020-06-20 09:06:14 -07:00
Pooja Kumari
98ddb935ea msm: ipa3: Send actual DL flt rule to Q6
Currently max length size of DL flt rule is
sent to Q6. But 64K memory allocation is always
not guranteed. Send actual size of DL flt rule
to Q6 to avoid memory error and install flt rule.

Change-Id: Id5f7bbb616c23feb6efbacd288f790432156630b
Signed-off-by: Pooja Kumari <kumarip@codeaurora.org>
2020-06-19 04:07:05 -07:00
qctecmdr
fe8cd3d20c Merge "msm: ipa: update MHI event id logic" 2020-06-17 20:19:02 -07:00
Akshay Pandit
a2fda05a29 ipa3: Wait for IPA post init for 1000 msec before return
If ipa receives ioctl and post init is not completed, wait for 1000
msec before timing out and returning error. The changes are made
specific to msmnile gvm target.

Change-Id: Icc63939840af469d1a79960927e6d343a336dcc9
Signed-off-by: Akshay Pandit <pandit@codeaurora.org>
2020-06-16 11:39:30 -07:00
Pooja Kumari
36fa513315 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-06-10 03:26:23 -07:00
qctecmdr
68a5ef27c2 Merge "msm: ipa: eth: Provide exception stats in lan_rx_skb trace" 2020-06-09 18:53:40 -07:00