Gráfico de commits

1045 Commits

Autor SHA1 Mensagem Data
Debasis Das
aebe51208d qcacmn: Update HIF to use non-inline OS abstraction
Use non-inline OS-abstraction APIs to avoid direct usage
of kernel API's.

Change-Id: I873f8eac38f11cdd2264db16b2dff0757186eb7a
2021-01-22 12:07:45 -08:00
Ananya Gupta
a3152f3104 qcacmn: Add DP event history in non debug mode
Enable DP event history for perf mode.

Change-Id: I1b8863928f956aa39488ea357d56e182613aad8d
CRs-Fixed: 2846844
2021-01-19 19:02:49 -08:00
Pavankumar Nandeshwar
1adba0a413 qcacmn: change qcn9100 to qcn6122 in hif and umac
Change the name of target type qcn9100
to qcn6122 in hif and umac.

Change-Id: Ia473c531a0903fd514dacf645d23bec3886fd719
CRs-Fixed: 2849577
2021-01-18 21:45:34 -08:00
Jianmin Zhu
6ef2047d56 qcacmn: Fix long ping delay after enable RTPM
Issue1: Driver RTPM state is ON/NONE, Kernel state is RESUMING.
cdp_runtime_resume is already complete,
hif_pm_runtime_get return -E_INPROGRESS,
dp_tx_hw_enqueue will set the flush event,
but cdp_runtime_resume is already done,
this flush event will be handled only on next pkt tx.

Issue2: Driver RTPM state: Resuming
hif_pm_runtime_get returns -EBUSY,
dp_tx_hw_enqueue is interrupted by any IRQ,
cdp_runtime_resume is completed,
dp_tx_hw_enqueue will set the flush event,
This flush event will be handled only on next pkt tx.

Fix:
Introduce a link_state_up atomic variable in hif to track the link state
change by pld_cb.
Set atomic variable link_state_up=1 in pmo_core_psoc_bus_runtime_resume
just after pld_cb. pld_cb brings the PCIe bus out of suspend state.
Set atomic variable link_state_up=0 in pmo_core_psoc_bus_runtime_suspend
just before pld_cb. pld_cb puts the PCIe bus into suspend state.

Introduce dp_runtime_get and dp_runtime_put.
dp_runtime_get get refcount with increment of an atomic variable.
dp_runtime_put return refcount with decrement of  this atomic variable.

If hif_pm_runtime_get returns -EBUSY or -EINPROGRESS,
take the dp runtime refcount using dp_runtime_get,
check if the link state is up, write TX ring HP,
return the dp runtime refcount using dp_runtime_put.

cdp_runtime_suspend should reject the suspend, if dp_runtime_get is non
zero.
cdp_runtime_resume should wait until dp_runtime_get becomes zero or time
out, then flush pending tx for runtime suspend.

Change-Id: I5b97d50cba710082f117f3845f7830712b86cda7
CRs-Fixed: 2844888
2021-01-14 07:46:48 -08:00
Kiran Venkatappa
2b51bdca43 qcacmn: Update Documentation for CE7 usage for QCN9000
CE7 is used for CV prefetch on QCN9000. Update documentation to reflect
the same.

Change-Id: I2da515ad3d88f07bbb69976e06d16f69cc443704
CRs-Fixed: 2853602
2021-01-13 10:17:30 -08:00
Rakesh Pillai
6ee7aeb0bd qcacmn: Avoid logging in packet transmission path
Currently if the driver is in runtime suspend/suspending
state, any packet transmission will request for resume
via hif_pm_runtime_get.

Unfortunately there is a logging in the above API which
will lead to more time consumption in the NET_TX softirq
context. This can lead to other delay in processing other
softirqs in the system.

Fix this by skipping the logging in the packet transmission
path.

Change-Id: Icc9f5b67794f7666243eb059f2e07a06a987002e
CRs-Fixed: 2844126
2021-01-12 14:34:40 -08:00
Jinwei Chen
7475f6c62c qcacmn: remove CONFIG_PCI_MSM compilation flag for link vote
CONFIG_PCI_MSM will not be defined if MSM PCI driver is compiled
as a module, so if wlan driver invoke hif_pci_prevent_linkdown to
prevent linkdown, pld_wlan_pm_control() actually is not invoked,
result in Noc error due to inactive PCIe link.

PLD driver already abstract MSM specific feature, remove CONFIG_PCI_MSM
complilation flag in wlan driver.

Change-Id: Iaaf929a74b44ac94370f1d98b7aef7aaec308e0f
CRs-Fixed: 2850839
2021-01-11 10:43:36 -08:00
Vevek Venkatesan
bae1042f1c qcacmn: add wake_irq_type in HIF for power management
Add wake_irq_type in HIF layer for power management,
this helps in deciding to enable sync-up between
runtime suspend and wow resume in case of moselle.

Change-Id: I23a4d02d3ae7ec543a28174461996b84b18fd95d
CRs-Fixed: 2851265
2021-01-09 09:43:52 -08:00
Jingxiang Ge
aad342aeb5 qcacmn: Cancel runtime suspend if acquired wakelock
Issue happens when
step 1: kernel pm core start to runtime suspend
step 2: host get wma_acquire_wakelock & send PDEV_SET_HW_MODE.
step 3: host send wow_enable cmd
step 4: wow suspend finished and wow resume happens as step2
	send pm_runtime_get
step 5: fw dop PDEV_SET_HW_MODE as enter wow mode

so host can't get PDEV_SET_HW_MODE_RESP from fw.

Fix is:
   Don't allow suspend if sending PDEV_SET_HW_MODE.

After change logical will be:
   1 if PDEV_SET_HW_MODE before send hif_pre_runtime_suspend->
   hif_runtime_pm_set_state_suspending, then wow suspend
   will return failure.
   2 if PDEV_SET_HW_MODE send after hif_pre_runtime_suspend->
   hif_runtime_pm_set_state_suspending, it will request resume
   and send after wow resume.

Change-Id: I91eea70f841cf9e5d6767f6005eb9662515657a6
CRs-Fixed: 2850561
2021-01-08 16:37:33 -08:00
Vevek Venkatesan
86f4aa6017 qcacmn: add sync between suspend and wow resume in runtime pm
In moselle, once wow enabled there is a possibility that wow wake
interrupt can be fired from FW during runtime suspend in-progress
in host, this will introduce a race between runtime suspend and
resume, so adding a synchronization between runtime suspend and
wow triggered runtime resume.

Change-Id: I38d6a24e4421697cc2d0090ba8d19884885596cb
CRs-Fixed: 2845672
2021-01-04 05:08:47 -08:00
Rakesh Pillai
4138c9b7d8 qcacmn: Add API to set dma mask for device
Currently DMA mask for the device is set during hif_enable_bus.
If the datapath memory prealloc feature is enabled, there are
a few dma memory allocation which is done before the DMA mask
is set for the device. This leads to the aforementioned dma
memory pre-allocation to be attempted at the default DMA mask.
Due to this the entire device capability of dma address might
not be used.

Add hif api to set dma mask before hif is initialized. This
is needed to set dma mask in case of datapath memory pre allocation.

Change-Id: I6fd25d9cb6ab3aaacd6f959abe4e060e23f37095
CRs-Fixed: 2845020
2020-12-29 11:05:45 -08:00
Alan Chen
13a96842f7 qcacmn: Clear PCIe link suspended state
RTPM wow resume gets triggered from ongoing WMI cmds related to SAP
getting started on the 5 GHz DFS channel. Even though PCIe link resume
is successful, there is a link up vote from UMAC and scn link suspended
state is not getting clear. Thus, clear the scn->link_suspended state
at the end of hif_pci_bus_resume_noirq() because before HIF PCIe bus resume
noirq phase is complete, PCIe link is already resumed.

Change-Id: If05593c95d2d63d271fed4abcf84b43e96cc070e
CRs-Fixed: 2833831
2020-12-09 17:39:23 -08:00
Arun Kumar Khandavalli
3c61a1d942 qcacmn: get the data during the issue with the bus
Whenever there is a recovery triggered, if there is a
failure in reading the bus id collect the bus specific
registers to understand the reason for the failures.

Change-Id: I7387d63d9205d24fd881824b9a9fac48a7816c73
CRs-Fixed: 2833331
2020-12-09 15:29:20 -08:00
Tiger Yu
34746552e9 qcacmn: Enhance athdiag to support 32bits reg address & live dump mode
Enhance athdiag to support 32bits HAL register address access. And support
the live dump mode to access the HAL registers directly using PCIE
interface.

Change-Id: I2322059e68b30ae47228e06dca01537b23ac2074
CRs-Fixed: 2831283
2020-12-09 10:55:27 -08:00
Ananya Gupta
a550225eb1 qcacmn: Rate limit logs when wake request fails
Excessive logging is detected when force wake request
command fails.
Rate limit the logs in hif_force_wake_request and
hal_write32_mb.

Change-Id: I9b1166074dfdb2d58d811571c802a75a6dbc03c5
CRs-Fixed: 2823961
2020-11-23 21:57:39 -08:00
Yeshwanth Sriram Guntuka
ca3d4fecef qcacmn: Add PCIe link status sanity before enabling CE IRQ
Check for PCIe link status and enable the CE IRQ only
if link is active.

Change-Id: I767a467a4b70435037f5ccce9e740f95f8b6112a
CRs-Fixed: 2821406
2020-11-19 18:23:25 -08:00
Xueqiang Gong
f8ab86bb69 qcacmn: support GENOA PCIE Global Reset
Correct the address of ADRASTEA_PCIE_LOCAL_REG_BASE_ADDRESS
to support PCIE Global Reset for Genoa Chip.
This feature is only used at 3rd party platform which
do not support reset WLAN chip by toggle WLAN_EN pin.
To use this feature, please add
"CONFIG_QCN7605_PCIE_GOLBAL_RESET_SUPPORT" in makefile.

Change-Id: Ia75b567bd305d73d17a7cec3a39cbc36b1ae737d
2020-11-11 02:50:35 -08:00
Balamurugan Mahalingam
d0b7b07b98 qcacmn: reduce the pktlog dest ce ring size to 128 in lowmem platform
Reducing the PKTLOG ring size to 128 as only USR_COMPLTN_FLUSH_TLV
alone is intended to be processed in this ring on a lowmem platform.
This is done only for IPQ5018 and QCN9000 to reduce the buffer
consumption

Change-Id: I82d3dd0286c97ea672b47613008c97dc6d5dce5c
2020-11-05 03:26:05 -08:00
Kai Liu
4be28ba641 qcacmn: Enhance hang info feature
Add bus related info in hif layer in order to get bus status
when hang issue happened.

Change-Id: If922e0892e0f65de778b9696bbc56fc63c25c169
CRs-Fixed: 2801350
2020-10-30 13:03:35 -07:00
Nisha Menon
a377301c78 qcacmn: Add support to map generic shadow regs
Add apis to map generic registers to shadow region. Existing
logic includes mapping only srng based regs to the shadow
region.
Add support to map REO control regs and WBM2SW2 rel
ring HP reg address to the shadow region in case the direct
reg writes in IPA enable/disable autonomy fail due to UMAC
block being in a power collapsed state.
Shadow reg mapping for these regs is provided to FW during
init. Add stat shadow_reg_write_fail to track shadow reg
write failure and shadow_reg_write_succ to track successful
shadow writes.

Change-Id: I04790765a3de80047689657e2cad0b73123440b9
CRs-Fixed: 2790321
2020-10-20 15:05:51 -07:00
Govind Singh
183dd69628 qcacmn: Free mem leak in qmi bypass mode
QMI bypass mode uses 2mb of of mem region for
fw uses. Current implementation does not free this
memory region when qmi bypass mode in enabled.
Free mem leak in qmi bypass mode.

Change-Id: Ie11aa9f20f93183e0b999cd6578aea4b231f8d8b
2020-10-19 05:09:32 -07:00
Govind Singh
b481b85018 qcacmn: Fix pktlog pipe callbacks assignment for Adrastea
PKTLOG callback is not updated for Adrastea target as
htt_htc_soc_attach does not get called during initialization.
Fix pktlog pipe callbacks assignment for Adrastea target by
checking only CE_ATTR_INIT_ON_DEMAND attribute.

Change-Id: I16f2d2e493440315343087417a8d4c341065ae9a
2020-10-15 16:46:18 -07:00
Uraj Sasan
96654fada3 qcacmn: Disable CE_ATTR_INIT_ON_DEMAND for CE5
Disable CE_ATTR_INIT_ON_DEMAND for CE5.
Currenly CE5 is used for other stats apart from pktlog.
When CE5 is configured as on demand its not initialised until pkltog
is enabled, but we still send stats to CE5 causing issue.

Change-Id: I286fcaf5c908028f5f42a0f4f91c810660ee6d11
2020-10-14 05:48:42 -07:00
Uraj Sasan
0d5e9734be qcacmn: Adds dummy API's
Adds dummy API's for hif_config_irq_by_ceid.

Change-Id: I7bbb0ece4ab5f8bf648bc0e945c5a28de2a49feb
2020-10-12 02:32:11 -07:00
Uraj Sasan
180f7b20d9 qcacmn: Pktlog dynamic CE config support
Add support to dynamically initialize the CE for PKTLOG
and post buffers on demand.

This helps avoid unnecessary initialization of PKTLOG
ring and save the memory in lowmem platforms

Change-Id: Ib02153b3e7205be30b07e4a4763edf3374827328
2020-10-08 10:19:22 -07:00
Srinivas Girigowda
998df7c913 qcacmn: Remove obsolete HIF_{ERROR/DBG/WARN/INFO/INFO_HIGH/MED/LO} macros
Remove obsolete HIF_{ERROR/DBG/WARN/INFO/INFO_HIGH/MED/LO} macros.

Change-Id: If0f726aea32eef09cbd5d9e66383a3f6cd633c7d
CRs-Fixed: 2791256
2020-10-06 01:28:19 -07:00
Sridhar Selvaraj
bf0668f3c0 qcacmn: Reinitialize pci irq ops for qcn9100
QCN9100 pci radio is connected to the IPQ5018 through PCI slots
and enumerated by the Q6 radio. From the host driver perspective,
QCN9100 is treated as an AHB device, however the QCN9100 uses
MSI interrupts to notify events
-Reinitialize pci irq ops for hybrid bus type device qcn9100
-Update CE flags of qcn9100 to interrupt mode
-Set disable_wake_irq flag for qcn9100 as wake irq is not used

Change-Id: I8da7f0b48923b9d70e62f4ff181bd47865ea2fe8
2020-10-01 19:09:03 -07:00
Yeshwanth Sriram Guntuka
7d4b38f4ad qcacmn: Set the CE2 buffer size to 3200 bytes
Buffers attached to CE2 destination ring are of 4k bytes.
skb allocation for these buffers exceed 1-page allocation
due to addition bytes reserved for alignment, padding and
skb shared info.

Set the CE2 buffer size to 3200 bytes so that the skb memory
fits into a single page.

Change-Id: I97b3fc140376bb107ba23ab581a2dd5aeb833948
CRs-Fixed: 2785267
2020-10-01 16:58:12 -07:00
Srinivas Girigowda
80c1b5a6c3 qcacmn: Replace obsolete HIF_DBG() with hif_debug()
Replace obsolete HIF_DBG() with hif_debug().

Change-Id: I462d75617359fd13eafa497045ddfb70c2025595
CRs-Fixed: 2779720
2020-10-01 14:41:39 -07:00
Srinivas Girigowda
d89e043589 qcacmn: Replace obsolete HIF_TRACE() with hif_info()
Replace obsolete HIF_TRACE() with hif_info().

Change-Id: I315d86b886ce0bc28c8c967c986095fe2ee46bec
CRs-Fixed: 2779720
2020-10-01 14:41:34 -07:00
Srinivas Girigowda
d79f50ca9c qcacmn: Replace obsolete HIF_INFO_MED() with hif_debug()
Replace obsolete HIF_INFO_MED() with hif_debug().

Change-Id: Iec7a1a5332293bc5cc3a826a1223fa74e1fa3955
CRs-Fixed: 2779720
2020-10-01 14:41:28 -07:00
Srinivas Girigowda
832f4f7018 qcacmn: Replace obsolete HIF_INFO_LO() with hif_debug()
Replace obsolete HIF_INFO_LO() with hif_debug().

Change-Id: I3794e381c0810c08b37670d6dec8eace78eb3fb7
CRs-Fixed: 2779720
2020-10-01 14:41:15 -07:00
Srinivas Girigowda
15d2d83bd1 qcacmn: Replace obsolete HIF_INFO_HI() with hif_debug()
Replace obsolete HIF_INFO_HI() with hif_debug().

Change-Id: I85178f5e690030208f65d4375247383a62c12f76
CRs-Fixed: 2779720
2020-10-01 14:41:10 -07:00
Srinivas Girigowda
f327fcd404 qcacmn: Replace obsolete HIF_INFO() with hif_info()
Replace obsolete HIF_INFO() with hif_info().

Change-Id: I7fcf079551db5a69bd45b96b2126d1521c3e3e4c
CRs-Fixed: 2779720
2020-10-01 14:41:06 -07:00
Srinivas Girigowda
94ea515d92 qcacmn: Replace obsolete HIF_WARN() with hif_warn()
Replace obsolete HIF_WARN() with hif_warn().

Change-Id: Idb72d684b9d05aab6cf55ee2608f47c04077d8f7
CRs-Fixed: 2779720
2020-10-01 14:41:01 -07:00
Srinivas Girigowda
9667b145c6 qcacmn: Replace obsolete HIF_ERROR() with hif_err()
Replace obsolete HIF_ERROR() with hif_err().

Change-Id: I9260b47d11c1820bb05d9a7e2bf50d5257ba85ae
CRs-Fixed: 2779720
2020-10-01 14:40:57 -07:00
Karthik Kantamneni
268ab400cd qcacmn: Add support for WMI DIAG events over CE7
Add support for handling firmware WMI DIAG events over CE7.

Change-Id: I3d6c0b08313e816809a65eb77d9728fc4b4488f3
CRs-Fixed: 2787010
2020-09-30 11:10:33 -07:00
Jinwei Chen
652bd3a42b qcacmn: Support unaligned consistent memory prealloc
Support unaligned consistent memory prealloc for CE srng
memory.

Change-Id: I7c014e4c13602de89d03e2f7c5efb39b5b376226
CRs-Fixed: 2761282
2020-09-25 20:20:40 -07:00
Nirav Shah
a24f3db18e qcacmn: Increase CE2 host ring size to 512 for QCN7605
Increase CE2 host ring size to 512 for QCN7605 to avoid
ring full condition in FW in debug build.

Change-Id: I900611487696e3e83cd7adc72f10cd2cdcb15ead
CRs-Fixed: 2778941
2020-09-17 18:34:16 -07:00
Nisha Menon
095453ad08 qcacmn: Increase num of entries in CE2 dest and status rings
Increase the num of entries in host side from 32 to 64
so FW can post more descriptors to host src ring
without hitting ring full condition. This is to avoid
back pressure issues in FW. The memory increase is
by 32*4K allocations.
This change is applicable to all HSP targets.

Change-Id: Ia973e13b9d9b2b682957ae19fc3f23dd49bef401
CRs-Fixed: 2761953
2020-09-16 02:33:21 -07:00
Mohit Khanna
8e57f126b5 qcacmn: Use zero timeout in non interrupt mode during force wake
Currently we use a single timeout value of FORCE_WAKE_DELAY_TIMEOUT_MS
during hif_force_wake_request. A 50ms value is not enough in some cases
to bring MHI to M0 from M2/M3_fast states. This can result in a write
failure.

In certain cases, when not in an interrupt context, it should be okay
to wait slightly longer for MHI to transition into M0.
Hence, pass 0 as the timeout value to pld_force_wake_request_sync.
This API calls CNSS API which uses a blocking call -  mhi_device_get_sync,
to transition MHI to M0, when a value of zero is passed.

Change-Id: I738bf9c4a9a83c943186445cba0174df18a45c74
CRs-Fixed: 2766674
2020-09-16 02:33:14 -07:00
Yeshwanth Sriram Guntuka
4aa291d159 qcacmn: Do explicit system wakeup for group intr in D0-WoW
In P2P GO mode, on system suspend to s2idle state, bus
is suspended and D0-WoW is enabled. Ping requests from
P2P client cause the REO interrupt to fire but since
system is in s2idle state, system is not woken-up. This
results in destination unreachability or large rtt for
ping on P2P client.

Fix is to do explicit system wakeup when group interrupts
fire after system is in suspend state.

Change-Id: Ic6f51c3fc8bad6da29adf58972890677a81f2064
CRs-Fixed: 2765037
2020-09-13 12:53:07 -07:00
Pavankumar Nandeshwar
864714139c qcacmn: Use right register name
Use correct register name WFSS_CE_COMMON_REG_REG_BASE
for qcn9100

Change-Id: Ie7bc5bf66d9cda2b1a5603a5fc5b4a032efe29ce
2020-09-01 01:50:04 -07:00
Pavankumar Nandeshwar
9e00273fe7 qcacmn: HIF layer changes for QCN9100 bringup
Initial changes made for bring up of
QCN9100 in HIF layer

Change-Id: I60c5f7e8d5456e6f2bfda8f99d873a30ca979ada
2020-09-01 01:49:57 -07:00
Arun Kumar Khandavalli
211a0c13bc qcacmn: Return error incase of hif bus runtime resume
For hif_bus_resume till now driver does panic whenever there is
failure. This is now handled in the cnss driver which will collect
the required dump to debug the link down.

Remove the bug_on, just log and return the status.

Change-Id: Ief4d86dd76c0bbde361b69b38894a944eec05aae
CRs-Fixed: 2765117
2020-08-31 20:02:17 -07:00
Surya Prakash Raajen
ca1a15192f qcacmn: Update format and index for CE latency buffer
Update formate and index to traverse CE Latency stats circular buffer
and print them in more user readable format.

CRs-Fixed: 2676241
Change-Id: I7b3464cd00227dfcf98bbfa63a407055dd7cbf57
2020-08-31 03:32:35 -07:00
Jia Ding
e26d537266 qcacmn: Properly remove affinity hint for CE irqs
IRQ affinity for CE IRQs has been set to gold cores.
But affinity hint is not removed when freeing CE irqs.

Therefore remove affinity hint for CE irqs before freeing
them.

Change-Id: I7385a90955bc7e357badcd784e40d89022542d1a
CRs-Fixed: 2765373
2020-08-29 07:07:34 -07:00
Yeshwanth Sriram Guntuka
32a9cc93a8 qcacmn: Avoid logging few hif events in case of IRQ storm
In IRQ storm scenario, the events are logged to hif
event desc history even though the SRNG is empty
resulting in overwriting of older entries useful for
debugging.

Fix is to avoid recording hif events if the SRNG is
empty in IRQ storm scenario.

Change-Id: Id4161198c60f5fae31123c936f0f4acc1082a78b
CRs-Fixed: 2753675
2020-08-28 23:31:16 -07:00
Rajeev Kumar
bd9610f11b qcacmn: Remove obsolete HIF runtime pm prevent timeout API
hif_pm_runtime_prevent_suspend_timeout is no longer supported
and hence delete this obsolete API.

Change-Id: I2c01105219adb198bbf27aee5f2d5c7e357c1e34
CRs-Fixed: 2761022
2020-08-25 20:26:08 -07:00
Jinwei Chen
d5a6680a6f qcacmn: Reduce CE4 source ring entries number
For lithium based HST/HSP, CE4 is no longer used for data TX,
just few HTT msg for ring configuration, 2048 entries requires
16 * 2048 = 32K ring consistent memory which looks is not necessary,
reduce CE4 ring entries number to 256.

Change-Id: I117ec81cbee3642d640457c37a7ab900ddcae3f5
CRs-Fixed: 2757925
2020-08-21 16:59:05 -07:00