Commit Graph

388 Commits

Author SHA1 Message Date
Armaan Siddiqui
2cdeb1993e msm: ipa: fix potential race condition ioctls
There are potential race condition ioctls in
the IPA driver when it copies the actual
arguments from the user-space memory to the
IPA-driver. The fix is to add check on the
2nd copy to make sure the same payload size
is copied to the pre-allocated kernel memory
as during the 1st copy.

Change-Id: I3d31cb11a24e969db4fd1728cf6ab1ce983a75e9
Signed-off-by: Armaan Siddiqui <asiddiqu@codeaurora.org>
2021-08-04 00:10:44 +05:30
Piyush Dhyani
b6e679fd85 msm: ipa3: Fix to prevent Integer Overflow
The value of `req->filter_spec_ex2_list_len`
is user input via ioctl and it's type is uint32,
so an integer overflow may occur. Which can result
in out of bound access in the following loop. Now
add changes to prevent Integer overflow.

Change-Id: Ia29b9ddc674e5dd3d5baf6623cf0a464c156d8f7
Signed-off-by: Piyush Dhyani <pdhyani@codeaurora.org>
2021-07-16 02:40:06 -07:00
qctecmdr
39c0e50d30 Merge "msm: ipa3: ignore multiple crash" 2021-07-13 14:37:07 -07:00
qctecmdr
fa0195fc76 Merge "msm: ipa: fix IPA_COALESCE_DISABLE handling" 2021-07-13 07:21:13 -07:00
Pooja Kumari
842d33d296 msm: ipa3: ignore multiple crash
Ignore recursive panic and multiple crash instances.

Change-Id: If76d8bb095fa68979bf6a98929fd4629cc3a9c75
Signed-off-by: Pooja Kumari <kumarip@codeaurora.org>
2021-07-13 04:35:49 -07:00
Chaitanya Pratapa
76d313e0f7 msm: ipa: fix IPA_COALESCE_DISABLE handling
Make changes to populate qmap_id when disabling coalescing.

Change-Id: Iaf0981bd22948b87bb8f9c548fe74e789eaf689c
Signed-off-by: Chaitanya Pratapa <cpratapa@codeaurora.org>
2021-07-12 23:07:22 -07:00
qctecmdr
c9428af37c Merge "msm: ipa3: Add change to retry memory allocation on failure" 2021-07-08 02:52:11 -07:00
Praveen Kurapati
579642679d msm: ipa3: Add change to retry memory allocation on failure
Adding changes to retry with GFP_KENREL flag when memory allocation
fails with GFP_ATOMIC flag. Panic the device if after max retries
also memory allocation fails.

Change-Id: Ic9ad827757de92715be5acc5645b7e860b4bd0e4
Signed-off-by: Praveen Kurapati <pkurapat@codeaurora.org>
2021-07-07 18:00:39 +05:30
Ashok Vuyyuru
6a1c52956f msm: ipa3: Enable hardbyte limit for WAN consumer pipe
Enable hardbyte limit WAN consumer pipe.

Change-Id: I27c5af71aeadfb40e6870da24c0b69f1cd60d806
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2021-07-05 21:47:48 +05:30
qctecmdr
21cd955642 Merge "msm: ipa3: Add proper check for FNR stats query" 2021-06-30 18:33:21 -07:00
qctecmdr
7eee966ca0 Merge "msm: ipa3: Add proper check for incoming skb" 2021-06-28 08:00:07 -07:00
qctecmdr
61e1e42e6b Merge "msm: ipa3: Adding changes to read the return code if IRQ not received" 2021-06-25 04:40:41 -07:00
Praveen Kurapati
73e7ec7292 msm: ipa3: Add proper check for incoming skb
There is a chance that incoming skb can is NULL in TX direction.
Add proper check to avoid any NULL ptr access issue.

Change-Id: I8bd4524e20ddefb4bd30a3ca4a09b65370b9b4ae
Signed-off-by: Praveen Kurapati <pkurapat@codeaurora.org>
2021-06-24 21:59:18 +05:30
Praveen Kurapati
de4c6e68ce msm: ipa3: Add proper check for FNR stats query
In some targets, FnR tethering stats query support
is not present. Add changes to check for support
present or not before query.

Change-Id: I415e019ff0cb01cf09c8ba6cd9fef44ae815c11b
Signed-off-by: Praveen Kurapati <pkurapat@codeaurora.org>
2021-06-24 10:23:21 +05:30
qctecmdr
3cb33329d4 Merge "msm: ipa3: add rmnet_ctl enablement check" 2021-06-13 15:43:06 -07:00
Praveen Kurapati
b3f4d167be msm: ipa3: add rmnet_ctl enablement check
Add changes to check if rmnet_ctl support present
or not.

Change-Id: Ic99811ffcedbe474eeb80637e61901b55e448372
Signed-off-by: Praveen Kurapati <pkurapat@codeaurora.org>
2021-06-12 21:19:19 +05:30
qctecmdr
65331c0b33 Merge "msm: ipa3: Add check to avoid Quota indication for WLAN" 2021-06-08 10:38:38 -07:00
Praveen Kurapati
b946aea8f0 msm: ipa3: Add check to avoid Quota indication for WLAN
Quota indication is not yet supported on WLAN Iface.
Add check to return if the request comes for WLAN Iface.

Change-Id: Ib183d0ed21a87f6f759af8d4e5bc4093dffd9374
Signed-off-by: Praveen Kurapati <pkurapat@codeaurora.org>
2021-06-08 11:05:04 +05:30
qctecmdr
3f28e535f6 Merge "msm: ipa3: Fix to changes the ring variable type" 2021-06-07 04:32:18 -07:00
Ashok Vuyyuru
e15d5ede0b msm: ipa3: Adding changes to read the return code if IRQ not received
In some cases GP_INT1 interrupt not receiving even GSI FW send the
interrupt. In those cases cases reading the flow control command return
code to check completion.

Change-Id: I329550ab94af9caac870c6050761d3701f0517cd
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2021-06-05 16:25:56 +05:30
Ashok Vuyyuru
a890ae3b7b msm: ipa3: Fix to use right casting to avoid the compilation issue
Caller function passing the constant value converting to int
pointer will cause the problem. Adding changes to use right casting
to avoid compilation issue.

Change-Id: I8440f16e4e53e0788c2d1eae35f4b6ebf3178ead
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2021-06-05 00:46:16 +05:30
Raghavendar rao l
92fa5bc4f6 msm: ipa: Issue with Pointer type conversion.
Updated the pointer type cast with valid data type.

Change-Id: Ibd1f87eab0aac78551f307534508cfa84eae988a
Signed-off-by: Raghavendar rao l <rlomte@codeaurora.org>
2021-06-02 15:24:10 +05:30
Ashok Vuyyuru
e16fcc6ee1 msm: ipa3: Fix to changes the ring variable type
With u16 variable not fitting the higher ring size. So
adding changes to change ring type to u32.

Change-Id: I8443508fee8eb5180d5300611bc01bc4df68bcbd
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2021-06-01 22:00:10 +05:30
qctecmdr
04a5cec7b7 Merge "msm: ipa3: Fix to changes the ring variable type" 2021-05-27 15:57:22 -07:00
Ashok Vuyyuru
9eea30c773 msm: ipa3: Fix to changes the ring variable type
With u16 variable not fitting the higher ring size. So
adding changes to chnage ring type to u32.

Change-Id: Ib16e2426071c642f7e25beb022661dfa914cd0c4
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2021-05-27 13:39:00 +05:30
Praveen Kurapati
94386db8e6 msm: ipa3: Add proper checks for low lat pipe and 32-bit specific
For some targets lowlat support is not present.
Add changes to check if low lat support is present
or not. Also for 32-bit targets observed count shift error.
Added proper checks to overcome the issue.

Change-Id: Iab3b7d460b48ce8ff4e98da297eb2e7b69e3db13
Signed-off-by: Praveen Kurapati <pkurapat@codeaurora.org>
2021-05-26 17:04:44 +05:30
qctecmdr
68c091ef5e Merge "msm: ipa3: Adding trace in lan path" 2021-05-25 03:31:33 -07:00
qctecmdr
570b553426 Merge "msm: ipa3: Changes to call uC setup event ring in connect WDI pipes" 2021-05-24 16:25:55 -07:00
qctecmdr
6d4627dfdc Merge "msm: ipa: Add MONACO to dataipa MAKEFILE" 2021-05-24 14:59:23 -07:00
qctecmdr
d99ca844e1 Merge "msm: ipa: Clear IEOB for stopped channels with MSI IRQ" 2021-05-24 13:33:16 -07:00
Praveen Kurapati
b24af4da49 msm: ipa: Add MONACO to dataipa MAKEFILE
Add monaco target related chagnes to makefile.

Change-Id: Ia7de369bbbd2ba1875f310e2cbe6849da66b3109
Signed-off-by: Praveen Kurapati <pkurapat@codeaurora.org>
2021-05-24 09:47:33 +05:30
Ashok Vuyyuru
5b98186065 msm: ipa3: Changes to call uC setup event ring in connect WDI pipes
In some scenario before enabling the WDI pipe setup QUOTA monitor
command sending to uC which leading to NULL pointer access.
So adding changes to setup uC event from connect wdi API and sending
set QUOTA monitor and BW monitor commands to if uC setup event
ring completed.

Change-Id: I82e27d58b0ba153e5139cf9b4d849edafd979bc4
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2021-05-21 15:13:45 +05:30
Sivakanth Vaka
9a4b400adb ipa3: Changes to keep IPA clock voted in shutdown notifier
Adding changes to avoid unclocked access in shutdown notifier.
Increasing the IPA clock vote before saving the IPA registers.

Signed-off-by: Sivakanth vaka<svaka@codeaurora.org>
2021-05-17 23:16:28 +05:30
Sivan Reinstein
16e70b68ee msm: ipa: Clear IEOB for stopped channels with MSI IRQ
Clear IEOBs as part of CH stop for channels with MSI IRQ type

Change-Id: I7b9af7f385b0876fc2f43314bd3588110911a021
Acked-by: Nadav Levintov <nadav@qti.qualcomm.com>
Signed-off-by: Sivan Reinstein <sivanr@codeaurora.org>
2021-05-12 09:03:45 +03:00
qctecmdr
09db99a158 Merge "msm: ipa3: Changes to keep IPA clock voted in panic notifier" 2021-05-10 15:09:24 -07:00
Ashok Vuyyuru
5a14f85c0f msm: ipa3: Changes to keep IPA clock voted in panic notifier
Adding changes to avoid unclocked access in panic notifier.
Increasing the IPA clock vote before saving the IPA registers.

Change-Id: Ie055ffa844df45b8a65603190495bc2d1cc3f84a
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2021-05-10 13:02:24 +05:30
qctecmdr
64b8aeed58 Merge "msm: ipa3: Adding chnages to update event RP from DDR" 2021-05-05 06:28:09 -07:00
qctecmdr
806108499c Merge "msm: ipa3: Changes to check disconnect in progress while sending data" 2021-05-05 05:00:58 -07:00
Sivan Reinstein
e2030525a3 msm: gsi: add gsi profiling stats registers
Add GSI profiling stats register addresses

Change-Id: I38f5a27e97430e7597ab1bdc2141303add59dbb0
Acked-by: Nadav Levintov <nadavl@qti.qualcomm.com>
Signed-off-by: Sivan Reinstein <sivanr@codeaurora.org>
2021-05-05 08:04:45 +03:00
Ashok Vuyyuru
b1e7c45a8c msm: ipa3: Changes to check disconnect in progress while sending data
In SSR scenario while teardown the pipe there could be possibility to
receive the UL data to avoid queuing the data checking for disconnect
InProgress flag.

Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
Change-Id: I73397e51e6e7affae71313d08356f809788db484
2021-05-04 16:42:26 +05:30
Ashok Vuyyuru
613398d2ae msm: ipa3: Changes to read the halt command return code after some delay
In some cases for updating the return code in SCRATCH register taking
time after raising the global interrupt. Adding changes to wait for
some time read the SCRATCH register again and also printing the
test bus registers and Q6 channel state in failed scenario.

Change-Id: I4112a2290739daa79629f718d9725258518aba4c
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2021-05-03 22:54:26 +05:30
Ashok Vuyyuru
9d8b6ff21b msm: ipa3: Adding chnages to update event RP from DDR
In suspend scenario while checking channel empty scenario
updating the event ring RP pointer from direct register, it
may cause mismatch in reading in polling context. To avoid
discrepancy  reading RP pointer DDR location.

Change-Id: Ie198ea9ace033e31463acd974f10dccdcac45c55
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org>
2021-05-03 17:59:58 +05:30
qctecmdr
e74ef50626 Merge "techpack: dataipa: Enable Regdump for msmnile" 2021-04-30 08:30:12 -07:00
Praveen Kurapati
0393a19b6d msm: ipa3: Add smp2p changes for modem load FW
Add changes wrt SMP2P for modem loading the IPA FW.

Change-Id: I41d42b044d7f9020c4ff9932406bf8fb6f55db6b
Signed-off-by: Praveen Kurapati <pkurapat@codeaurora.org>
2021-04-28 19:52:18 +05:30
qctecmdr
d1423053e4 Merge "msm: gsi: add gsi profiling stats and fw version to debugfs" 2021-04-27 05:09:14 -07:00
qctecmdr
de476aa837 Merge "ipa: save registers on graceful shutdown" 2021-04-26 22:59:16 -07:00
Akshay Pandit
1c9ee39e90 techpack: dataipa: Enable Regdump for msmnile
Enable support to save regump for msmnile target.
Change-Id: I47add92e8eb82a546d4217815699fccd52b7b5b8
2021-04-27 10:38:02 +05:30
qctecmdr
c3b5765c0c Merge "msm: ipa3: Adding BW monitor and QUOTA support for yupik target" 2021-04-26 21:31:48 -07:00
Sivan Reinstein
7117d2256a msm: gsi: add gsi profiling stats and fw version to debugfs
Add GSI profiling stats data and the GSI FW version to debug fs.

Change-Id: I5749339f5ec9656e636a512668025bb09a97a3ec
Acked-by: Nadav Levintov <nadavl@qti.qualcomm.com>
Signed-off-by: Sivan Reinstein <sivanr@codeaurora.org>
2021-04-26 16:26:45 +03:00
Armaan Siddiqui
1d895c493c ipa: save registers on graceful shutdown
Save registers
- when gsi channel setup fails in post init
- on graceful shutdown
Handle printing registers when ipahal is not intialized.
2021-04-20 06:46:02 -07:00