In epping mode, the host ce count is not set correctly. And
then host will receive interrupt with incorrect ce id which
will trigger watchdog bite. Set the correct host ce count
and this issue can be fixed.
Change-Id: Ia91534fcfd1265e96f39ffd961ad794db3a4748a
CRs-Fixed: 2901231
When sending BE stream in epping mode, it fails when writing
registers of CE3 because the addr is not defined. Add this addr
to support epping mode data transfer.
Change-Id: I0d01cbee889c272b35a02bd1aca47f341f1edd2e
CRs-Fixed: 2901231
This feature is used to detect CE tasklet scheduling delay
and credit response delay issues.
Change-Id: I9a8fcb425edd5cf96fae5f6cd3bfc7f51172c814
CRs-Fixed: 2874874
Any update to the SRNG TP/HP when the device is in low power
state would result in system errors. It is recommended to disable
EXT grp irqs and drain TXRX before sending power save enter command
to the FW. This will ensure that no interrupts are received while
in power save mode and as a result there wont be any HP/TP updates.
Change-Id: Ibf952bbc2c6d13fb3e4ca6b4845bc9cc887fa694
CRs-Fixed: 2883135
In Moselle, currently CE interrupts are not disabled from apps
side during ipci bus suspend, so adding changes to disable all
the CE interrupts except wake_irq during bus suspend and do the
symmetric inverse operation during bus resume, also drain all
the pending FW diag logs from copy engine.
Change-Id: Ib54fc6660fd81aff18787b0b699f3a6cd2d7803d
CRs-Fixed: 2879752
Need to protect prevent_suspend_list by runtime_lock.
Issue happens when
1 printing lock0 of prevent_suspend_list in thread0
2 thread0 scheduled out and lock0 is released.
3 return back to thread0, it will using lock0 pointer
to check next lock, then issue happens.
Fix is adding runtime_lock to protect.
Change-Id: I7182651e445cf5008dba73e15b2c261cc125577f
CRs-Fixed: 2883052
Enable force wake recipe feature DEVICE_FORCE_WAKE_ENABLE
and disable the generic shadow register write feature
GENERIC_SHADOW_REGISTER_ACCESS_ENABLE.
Force wake recipe will be used to write to the REO remap
control registers by waking up the UMAC instead of using
shadow register writes.
Assert soc wake reg and poll on the scratch reg to check
if UMAC is awake.
Enable HIF_REG_WINDOW_SUPPORT to enable windowed reg
read/write in HIF layer.
Change-Id: Ib696e27e19a07c0084c097b95b7780b56e643c8b
CRs-Fixed: 2850590
When hif_force_wake_request is called from non interrupt context
use msleep to avoid mdelay since it is busy wait function.
Change-Id: Icda50e9d18b64369128a4f669ca1259931e5194a
CRs-Fixed: 2883178
Add delayed SRNG register writes support for Tx Ring, also add
dedicated workqueue to do the delayed Tx SRNG register writes.
Change-Id: I8dd157d341f3035e988804eab50d1ca681ab789b
CRs-Fixed: 2868989
On one-msi platform, when some ce tasklet execute, other srng such
as reo generate the interrupt, the ce interrupt handler can also be
called and then schedule the ce tasklet, if the running ce tasklet
intend to re-schedule itself due to the rx pending, obviously will
fail, then ce active tasklet count leaked.
Decrease the ce active tasklet count if failed to re-schedule when ce
rx pending.
Change-Id: I36c1c6c007735e192bee5af12aab674ee8324ca9
CRs-Fixed: 2830443
Set proper error code when ce_state creation fails. Sending success from
here results in inconsistent state of CE data structures resulting in
invalid access. Send failure as return so that proper handling is done
by the caller.
CRs-Fixed: 2855116
Change-Id: I9c063760656a8125e627aaa62b309a2bb4c0ac6f
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
CE7 is used for CV prefetch on QCN9000. Update documentation to reflect
the same.
Change-Id: I2da515ad3d88f07bbb69976e06d16f69cc443704
CRs-Fixed: 2853602
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
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
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
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
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
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
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
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
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
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
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
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
Add bus related info in hif layer in order to get bus status
when hang issue happened.
Change-Id: If922e0892e0f65de778b9696bbc56fc63c25c169
CRs-Fixed: 2801350
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
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
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
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
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
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
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