Commit Graph

1045 Commits

Author SHA1 Message Date
Jingxiang Ge
bfca76d3b6 qcacmn: Revise LF copyright back
There is no need to update LF date if using QuIC account.

Revise I29b998939cfa25f0547a9871721c6daeb0fdd961.

Change-Id: Id27e90487df4023e45482792e726ba82c59f0b84
CRs-Fixed: 3119512
2022-02-07 16:41:45 -08:00
Kiran Venkatappa
6cd22afb21 qcacmn: Add hif API to get WMI ep count from svc map
Different targets can have different WMI endpoint count. Add an API to
get this count from the target service map. This API can be used to get
max WMI ep count for a target to perform endpoint connect request only
till possible count.

Change-Id: Id90bcadfb23fbff12d10bf8b6ca825142d3f1bdc
CRs-Fixed: 3121598
2022-02-02 03:16:19 -08:00
Neha Bisht
5f8681ff1e qcacmn: Enable the 4th Tx. completion ring
Enable the 4th Tx. completion ring to save CPU load
Initialization and interrupt handling for 4th completion ring
is done here.

Change-Id: I2db27218a3c3e14d719d012f03454a6a7aa647fe
2022-02-01 21:04:30 -08:00
Amit Mehta
edda98bdea qcacmn: Increase WMI CE buffer size to 3520 Bytes
As part of new change  to support large management frame
the buffer size of CE2 has been increased to 3520 Bytes.

Since CE2 & CE3 shares common EP in Fw because of which any changes
in buffer size in CE2 need to have similar changes on CE3 as well.
So to accommodate change increase CE3 buffer size.

Change-Id: I8e558f11b1c44934cf6d64d1f3027f016d34f526
CRs-Fixed: 3118928
2022-02-01 00:30:07 -08:00
Karthik Kantamneni
1a06546636 qcacmn: Check for EP vote access during prevent l1 state
By the time driver reaches prevent l1 call there is chance
of EP vote access getting disabled in-flight, to handle
this skip vote request if EP vote access disabled in-flight.

Change-Id: I91e1cdfc08492188ad8614339d5918c294bf10e4
CRs-Fixed: 3113786
2022-01-28 05:20:54 -08:00
Jinwei Chen
77530eea0b qcacmn: support PLD lock for window register accessing
Currently window register accessing with PLD lock is not enabled for
HIF path of KIWI, enable it so there is no race condition with HAL
register accessing path.

Change-Id: Iceeba36ca6febdeca0e7f7bc0dcb7d4adc17bc51
CRs-Fixed: 3110425
2022-01-27 23:00:55 -08:00
Jingxiang Ge
a1f2c00c65 qcacmn: Always enable ce debug history for ce2/ce3
Current there is no ce debug history when testing
perf build, so it is hard to debug some issue.

Here it only enable ce2/ce3 on perf build, which keep
only necessary log here.

Change-Id: I29b998939cfa25f0547a9871721c6daeb0fdd961
CRs-Fixed: 3058740
2022-01-26 01:04:24 -08:00
Rajeev Kumar
8568210a52 qcacmn: Add log message for RTPM prevent API triggered resume
Add a log message to indicate RTPM resume is requested by RTPM
prevent runtime suspend API.

Change-Id: Ifb90493d1ea48601bb40708b1a2d7a821144a9b2
CRs-Fixed: 3110580
2022-01-21 21:53:35 -08:00
Amit Mehta
a1707871a1 qcacmn: Get PCI slot from PLD API
Currently, in the case of single pdev we return the PCI slot as 0.
But in case where the device is attached to PCI slot 1, API will
still return 0.

Make changes to always get PCI slot from PLD API instead of
returning PCI slot as 0 in case of single pdev.

Change-Id: I39b55eeb3ebfbd6c08d7cc15a1ac49932af78b51
CRs-Fixed: 3103192
2022-01-19 15:30:34 -08:00
Nandha Kishore Easwaran
58351920f8 qcacmn: Disable interrupt for unused CEs
Add Disable interrupt flag for unused CEs in QCN9224.

Change-Id: I8eb175226a44f79f5e9d91ace4b0e4d32458bdc6
2022-01-19 04:30:11 -08:00
Karthik Kantamneni
8ef76b5b38 qcacmn: Fix deleting unused timer in QCA6750 target
In QCA6750 target hif sleep timer is not used but timer
delete is performed during deinit path.

Fix this so that hif sleep timer delete operation is not
performed in QCA6750 target.

Change-Id: I54790f3b20af4f4b265ab37b593d300032f00fa5
CRs-Fixed: 3108047
2022-01-17 05:43:34 -08:00
Rakesh Pillai
0972c896cb qcacmn: Enable WMI logging over CE7 for KIWI
Enable the configuration of CE7 to support
FW logging.

Change-Id: Idf103b987c0e5e2d31e7daebfb424cdd9c207610
CRs-Fixed: 3107397
2022-01-12 22:54:14 -08:00
sandhu
ad2829718c qcacmn: Remove IP from files
remove IP from code

Change-Id: If119a4af213b10aadb9f1344e50b0342e72405c2
CRs-Fixed: 3073864
2021-12-29 04:28:58 -08:00
Jinwei Chen
c9ff3a2ac9 qcacmn: Support hif window register and set init_phase for Kiwi
For Kiwi, if UMAC force wake is enabled, HIF window register
support is needed as well. currently hal_soc->init_phase just be
true for a very short periord, this lead to hif_force_wake_request
is called frequently when configure register during initialization,
this is not necessary as pld and device is not in power collapse
state during this period.

Enable HIF window register and increase init_phase true period

Change-Id: I0b5394bbc1ca73d20b2fcabbf2a261e6f8335626
CRs-Fixed: 3097991
2021-12-27 13:00:36 -08:00
Srinivas Pitla
64d845ab39 qcacmn: Increase number of PCIE groups
The current platforms support 4 pci slots, so increasing
WLAN_CFG_MAX_PCIE_GROUPS to 4 to have unique irq name

Change-Id: Ifca25ee075611c75a5fa5e56782835ad89d26f91
2021-12-15 19:03:41 -08:00
Yeshwanth Sriram Guntuka
de814c9b16 qcacmn: Trace del reg write, ce tasklet latency, tx, and rx pkts
Use the tracepoints to trace delayed register write, ce
tasklet scheduling latency, tx, and rx packets.

Change-Id: I63a89276177a9d0466dcb0c831eeb8e938a2bf79
CRs-Fixed: 3081870
2021-12-14 21:22:49 -08:00
Karthik Kantamneni
5118e6daa1 qcacmn: Increase EP wake timeout for debug build in QCA6750
Currently EP wake delay timeout is less and there is chance
of timeout to happen, so increase the timeout value.

Change-Id: I59261ade269908cd4d9c17025838807f39913999
CRs-Fixed: 3086547
2021-12-06 02:44:43 -08:00
sandhu
164ba5cc5a qcacmn: Reduce CE5 size to 0 for 6490
Reduce CE5 size to 0 for 6490 , this will save 1 mb of memory

Change-Id: Ifff574944b2dfd93ee8e056999bc8d30dd814c1a
CRs-Fixed: 3068274
2021-12-04 18:15:01 -08:00
Yeshwanth Sriram Guntuka
c8cd2eb200 qcacmn: Add support to affine individual grp irqs for ipci
Add support to affine individual grp irqs to either
perf or non-perf cluster for ipci.

Change-Id: Ifae0f2a5a77068587d99513a1902f850860f2329
CRs-Fixed: 3075398
2021-11-29 02:06:25 -08:00
Rakesh Pillai
983df61b28 qcacmn: Disable CE srng timer interrupt for WCN7850
Disable timer mode interrupt for CE dest and status
rings for WCN7850.

Change-Id: Ic3459988d7547b63b65f94a9f43defb85ee26210
CRs-Fixed: 3044130
2021-11-24 01:14:33 -08:00
Yeshwanth Sriram Guntuka
299b26a366 qcacmn: Featurize support for grp irq affinity
Add a feature flag for grp irq affinity support
changes.

Change-Id: I0a97dd85369aae66450e4869b591c7af74a66960
CRs-Fixed: 3070324
2021-11-12 22:52:21 -08:00
Yeshwanth Sriram Guntuka
d9eb751658 qcacmn: Add support to affine individual grp irqs
Add support to affine individual grp irqs to either
perf or non-perf cluster.

Change-Id: I90006645acb82b71c63d2255722e2c67bb7a2f46
CRs-Fixed: 3059676
2021-11-08 05:19:31 -08:00
Zhaoyang Liu
08e7ee70fe qcacmn: clear pcie low power interrupt register after suspend
For specific QCA6174 device, need clear LOW_POWER_INT_MASK register
bit3/4 to disable pcie low power interrupt after suspend, bit3 is for
INTR_L1SS and bit4 is for INTR_CLKPM, this is to fix issue that PMIC
VREG_L30A don't turn off when XO is in shutdown state.

Change-Id: I4833e4143c48a3bf734745a5e772a7a76a94d63c
CRs-Fixed: 3028269
2021-10-19 05:35:16 -07:00
Karthik Kantamneni
4c00b017c8 qcacmn: Add HIF events to track NAPI POLL exit time
Add HIF events to track NAPI POLL exit time, this gives
information about actual time spent by wlan host in napi softirq.

Change-Id: I7548fd05f2f7db714ac9bcf79171ffb3d478e936
CRs-Fixed: 3052902
2021-10-12 13:16:48 -07:00
Alan Chen
c180315712 qcacmn: Remove logic to enable/disable wake msi for drv systems
Remove logic to enable/disable wake msi for drv systems. Today, during
WoW suspend sequence, between hif pci bus suspend and hif pci bus
suspend no irq, wake msi is getting disable temporarily. In case
fw toggles wake msi during this period, then the wake msi is lost,
which can lead to device not waking up for fw triggered wakeup.
Add the fix to remove enable/disable wake msi from suspend/resume
path and keep wake msi always enabled.

Change-Id: Idad0805f66ead4079d67577fa1151f73567511a3
CRs-Fixed: 3042261
2021-09-30 13:01:39 -07:00
Prateek Patil
7a52367615 qcacmn: Return if pld_is_pci_ep_awake is not supported
Add check for verifying pld_is_pci_ep_awake support before waiting till
EP vote reset is done after reg completion

Change-Id: I9061c212c115d158aec63464eedcf6ca98e11a56
CRs-Fixed: 3038992
2021-09-24 20:45:08 -07:00
Amit Mehta
86c4751159 qcacmn: WMI CE buffer size update to 3520 Bytes
Update WMI CE buffer size to 3520 Bytes to support
large frame size on QCA6490 and WCN7850.

Change-Id: I1f3326f40bf18dda6010def57ea7f2e0961bc725
CRs-Fixed: 3036932
2021-09-17 08:45:26 -07:00
Kiran Venkatappa
f0c88a6cb9 qcacmn: Set QCN9224 ce attribute flags to zero for CE 12&13
CE 12 and 13 is assigned for CV prefetch. Set attribute flag for these
CE to zero as per current requrement from FW on Emulation.
This may be changed to different value based on future requirement.

Change-Id: I70073aa45b6999a42ed230835a2a7dd7b650edad
CRs-Fixed: 3025570
2021-09-01 09:03:17 -07:00
Karthik Kantamneni
8c0efa6281 qcacmn: Send force wake release if force wake request times out
Even though force wake request timed out there is possibility of
wake request got stuck and handled later at qmi level this leads
to leaving device in wake state for long time unnecessarily.

To avoid this send force wake release when wake request times out.

Change-Id: Ic0e1b3d3fe9d4b0e0f0d4b9be5804ef4f1d3e724
CRs-Fixed: 3019575
2021-08-25 05:07:14 -07:00
Uraj Sasan
03827107ac qcacmn: Update CE id enums
Update CE id enums to include CE12 to CE15 for targets that support 16 CEs

Change-Id: I3456903191e1439f6e965dc519cceb56b00d6f32
2021-08-12 05:32:57 -07:00
lihual
bde0001eed qcacmn: Fix a memory leak during soc attach
hif_ext_group and soc->intr_ctx[i].lro_ctx are allocated
but not free while fail to register parts of ext_group in
hif_register_ext_group, which cause memory leak. Fix is
to detach according resource before return.

Change-Id: I03ecc37437d09bf9275f128b1f2b320124a7df64
CRs-Fixed: 2988891
2021-08-11 15:50:50 -07:00
Jingxiang Ge
7e7d768c71 qcacmn: check linkstate_vote in hif_vote_link_down
It is not right that linkstate_vote is 0 when entering
hif_vote_link_down, this indicates there is a mismatch
for vote up/down.

Enable debug to catch such case at first time.

Change-Id: I128bc42917ca5de949ee0d0b657579c14dd96eac
CRs-Fixed: 3009469
2021-08-10 09:07:39 -07:00
Amit Mehta
5b3cc21863 qcacmn: Change logging time-stamp source
Currently there is mismatch in time-stamp source for
hif_hist_skip_event_record with respect to hif_hist_record_event

Updating time-stamp source in hif_hist_record_event to match with
hif_hist_skip_event_record time-stamp source.

Change-Id: I55680c40860eafb5c6ed6117ab7c55bb38cc24bb
CRs-Fixed: 3000319
2021-08-09 15:37:20 -07:00
Shwetha G K
13ecc7b6c9 qcacmn: WMI CE buffer size update to 3520Bytes
CE buffer size update to support 3.5k beacon template &
probe response on Pine and Spruce targets.
The support is disabled on low memory profiles including
512M as there is no skb recycler in these profiles.

Change-Id: I451f11d6a20d1246b3e16221f2fb7ebd234b284a
2021-08-06 11:33:17 -07:00
Mohit Khanna
3e89b4435a qcacmn: Remove target CE entries for CE5 in HMT
In HMT, pktlog, which uses CE5 traditionally is disabled. Hence donot
configure any entries in target_ce_config.

Change-Id: I31a075fb9c6557599688408ba9452704c7522ec0
CRs-Fixed: 2984362
2021-08-05 08:28:48 -07:00
Sumedh Baikady
18ff74028c qcacmn: Add CE ring cleanup in hal
Cleanup hal srng for CE rings upon CE ring
cleanup.

Change-Id: I6d52ee1b83c23d74d88a1aca8a7eab2c5a0d186a
2021-07-30 07:12:19 -07:00
Jingxiang Ge
0f98450843 qcacmn: Replace RET_IP with rtpm_dbgid for runtime pm api
Current it use __RET_IP to get caller in rtpm resume
function, if it print info by %ps, it will do a
symbol lookup which takes time.

Change as replacing __RET_IP with rtpm_dbgid, so it is
still able to get caller information and avoid time
cost here.

Change-Id: Ifc70c118d621bb9e6d12de87582de09316ae9cad
CRs-Fixed: 3001690
2021-07-30 04:04:50 -07:00
Aditya Kodukula
6a5a2ec74a qcacmn: Remove %ps from wakeup_irq_handler
%ps does symbol table lookup in kernel and if used in irq context,
it can lead to irq_handler running for longer time, and jank issues
as a side effect. So, remove it from wakeup_irq_handler.

Change-Id: Ifa42d9a46c838c2458d3220c6d3cb008232e3839
CRs-Fixed: 2999176
2021-07-28 19:02:33 -07:00
Abdul Muqtadeer Ahmed
f284efa6f8 qcacmn: Refactor the hif_latency detection code based on the bitmap
Based on the bitmap whether the issue is because of the
HIF_DETECT_TASKLET or HIF_DETECT_CREDIT, the hif_latency detection
code needs to be refactor to different functions so that it will
help parsing tools to find the reason of crash.

Change-Id: I2d8a83493354dfbd1c484cb7727018ddeb14c158
CRs-Fixed: 2929736
2021-07-28 06:39:06 -07:00
Karthik Kantamneni
e2c4542bac qcacmn: Optimize EP request/release vote wait logic
Currently sleep based wait is used for checking EP request/release
vote is taken effect or not. But once worker thread goes to sleep
it is taking in order of milli seconds to schedule back worker thread
this scheduling delay is causing srng HP/TP writes to be updated in
delayed manner.

To avoid this first try checking EP vote is taken affect by busy wait
then go for sleep based method.

Change-Id: I72e81941a23752a41c9b5307e82c2e971aee1ec8
CRs-Fixed: 2999541
2021-07-27 09:24:29 -07:00
Ananya Gupta
f2851b458b qcacmn: Affine rx_err srng to all CPUs except 0
IPA and rx_err ring are processed in same CPU resulting
in low Tput.
To fix this, not allow processing of rx_err ring in
CPU 0

Change-Id: Id53a03c9290607beb1a595c84bfb0fd8d9f5d105
CRs-Fixed: 2949569
2021-07-27 01:00:14 -07:00
Vevek Venkatesan
9f5cc5aae8 qcacmn: refer system time for pld_is_pci_ep_awake timeout
Currently timeout for checking pld_is_pci_ep_awake in
hif_prevent_link_low_power_states might be higher than
the defined timeout depends on how long qdf_sleep takes
to get scheduled again, so avoid this uncertain timeout
adding reference to the system time.

Change-Id: I67a28d46c996ccc56680cf8e20c09a70729a33c5
CRs-Fixed: 2994746
2021-07-26 01:39:38 -07:00
Karthik Kantamneni
7bf43ce817 qcacmn: Wait till EP vote is released after reg work completion
After reg work is complete there is possiblity EP vote reset
request still not processed by F.W. So wait till EP vote reset
is done after reg work completion.

Change-Id: I1f4e318ac96ba3a15c613c5faf5095d4be7c8e99
CRs-Fixed: 2994233
2021-07-22 12:53:20 -07:00
Karthik Kantamneni
b7e633e910 qcacmn: Add api to set intermediate EP vote access
Add api to set intermediate EP vote access state.
Make sure reg work handler is complete before setting
intermediate vote access.

Change-Id: Ib229d9af8b1e58505a9ae5fbf39aa912ca21a3c3
CRs-Fixed: 2994040
2021-07-22 12:53:16 -07:00
Amit Mehta
42c3f92bf4 qcacmn: rate limit excessive logging in case of no data to reap
Currently, excess logging is causing a crash when there is no
data to reap.

Rate limiting the log messages to avoid the crash due to excessive
logging in case of no data to reap.

Change-Id: I175f3f1b3c0b0173f171e971494f6ffda694b4a5
CRs-Fixed: 2988147
2021-07-16 17:49:16 -07:00
Vevek Venkatesan
c515aa874b qcacmn: abort system suspend_noirq if wake-IRQ received
Wake-IRQ can be received just before Kernel issuing
suspend_noirq callback, such wake-IRQ would not be
handled by Kernel. So check if any tasklet most likely
CE2 is pending and abort suspend_noirq if true.

Change-Id: Ie3d6de97179aa0d8f383a086f4f8df27d3fc5254
CRs-Fixed: 2981882
2021-07-07 00:16:32 -07:00
Sajini R
75b10f2ab7 qcacmn: Update PCI SOC revision details to wifi driver
Update PCI SOC revision details from cnss2 to wifi driver.

Change-Id: I43e5f62fc79e2fe937e31134cdcc452381d20a14
2021-07-06 04:38:49 -07:00
Amit Mehta
909feab5a8 qcacmn: Check irq free before enable
During deinit process we free the IRQs and call kill tasklet.
There is the possibility that Tasklet might be running when we
call kill tasklet and as part of tasklet exit it will try to
enable the corresponding CE IRQ which has already been freed.

Adding check for IRQ free condition to avoid any IRQ enable
calls after IRQ free is done.

Change-Id: I9d58ffbb3738251e3d8114631e2daacd07e33d7d
CRs-Fixed: 2973309
2021-07-02 09:41:38 -07:00
Manikanta Pubbisetty
88c01f6191 qcacmn: increase force wake timeout
Increase force wake timeout to 500ms for perf builds.

Change-Id: Ib665418b5de63048f02d7093d12813f4babdbf72
CRs-Fixed: 2979062
2021-07-01 11:23:26 -07:00
Karthik Kantamneni
292e767c1e qcacmn: Remove affinity hint for CE irqs in QCA6750 target
CE irqs affinity is set to gold cores, but affinity
hint is not removed while freeing irqs.

So remove CE irq affinity before freeing them.

Change-Id: If3822422f823cb3caa6e291387a2beadc62049b7
CRs-Fixed: 2975529
2021-07-01 02:04:19 -07:00