Change definitions of HOST_IE_ADDRESS and HOST_IE_ADDRESS_2 to remove
dependancy on lithium_top_reg.h, which was removed from latest fwcommon headers.
Change-Id: I7dada478ffd58bcf15b8336d7388f98f6522231b
when allocation for destination ring fails in ce_init function,
Clean up the complete datapath tx ring.
Change-Id: I7e46396f7a1903207768c79cd07e2dbda1e5a7d2
CRs-Fixed: 2028641
Use length of service_to_pipe array to loop through services instead of
array size.
Change-Id: I107203861501ed5ac348979868ac981b5a6cd1ae
CRs-Fixed: 2033254
Fix CE full error when only legacy hif_send_head api is used on a ce configured
to use the fastpath logic.
Change-Id: I59530a0e5ff8b62a1b97007dcd959daa03025785
CRs-Fixed: 2018893
move ce_id_to_state assignment to the end where ce_init
is guaranteed to succeed.
Change-Id: I5172eb1136dde2aad915c2497ece94150c95630f
CRs-Fixed: 2020794
Copy pasted logic was not maintained, leading to different
maps being used in different code sections. Also fixes
fw assert where multiple wmi services are not available on
the fw for napier.
Change-Id: Iff3ec8938cc16afe0ebae54244060afb0a7d0b2e
CRs-Fixed: 2030840
Implement hif_dummy_map_ce_to_irq to prevent runtime errors on new
platforms that do not use hif_map_ce_to_irq.
Change-Id: I9e3da22e237c351ecc9919e69d8d68a656ef7cc9
CRs-Fixed: 2028145
In hif_napi.c, we are calling this kernel API core_ctl_set_boost. This
API is only present in the kernel if the feature CONFIG_SCHED_CORE_CTL
is present. In case the feature is not present in the kernel, it will
result in a compilation error.
Create a new internal API hif_napi_core_ctl_set_boost as a wrapper
around the kernel API. The new API is stubbed in case the kernel feature
is not present.
Change-Id: Ia52f1110304816670efe3480da3aa78d7b2ecb9e
CRs-Fixed: 2018089
The existing HIF NAPI blacklist feature uses irq_blacklist_on(off) APIs
which make a call to the userspace irq_balancer.
Replace these APIs with kernel API irq_modify_status to mark (or unmark) the
individual interrupts with IRQ_NO_BALANCING flag. Once marked, the
msm-irq-balancer will not be able to move the CE interrupts around.
Change-Id: I4d780fa8780b42a668006e13a49eb1299304e633
CRs-Fixed: 1114161
Interrupt blacklisting in kernel 4.4 happens through a user-space
entity. The kernel APIs irq_blacklist_on(off) essentially send
a message to the user space service(irq balancer) and
therefore are not synchronous and do not guarantee that blacklisting
has actually taken effect. It will be granted with some latency
(userspace entity's processing delay).
Make blacklisting more robust by:
a) move irq (if it has been moved around after blacklist_on call
has been made and not yet honored) to the designated CPU
on IRQ reception
b) stop cpu_isolation in blacklisting mode boost API
c) modify NAPI stats to indicate blacklisting mode
Change-Id: I13e478adbed1a6a66d320f69acdb012bee3dc1e8
CRs-Fixed: 1093770
NAPI bucket calculation was resulting in bucket number which was out of
bounds for the number of buckets.
Calculate bucket index correctly and check for out of bound
condition.
CRs-Fixed: 1091483
Change-Id: Ieb81b2eeec546a6128c6b878db4c65ccb8b62bda
The current implementation uses jiffies to calculate the yield time and
yields after 2 jiffies. The problem with this is that we end up yielding
anywhere between 1 - 2 jiffies as each jiffies are incremented by 10 ms
intervals. Sometimes we are taking more than 2 jiffies to yield. This
prevents the update of deferrable_timer if its being done at the same
CPU where hif_napi_poll is executing. This may result in the CPU
frequencies not being updated resulting in some fluctuations.
Use sched_clock kernel API to calculate the precise yield time.
Reduce the yield time to 10ms.
Some stats here
- How many times did we have to yield because of time
(%)0.670391061
Total Number of completes 1790
Total Number of complete 0 12
- When we yielded, how much did we exceed the time limit(10ms) by (ms)
Average 1.327444
Max 3.381667
Min 0.037709
- How many HTT Messages did we process when we had to yield
Average 22.41667
Max 33
Min 18
- How much time did we take when we had to yield 10ms + delta above
- How much time did we take when we did not yield (ms)
Average 0.907641
Max 8.649
Min 0
- How many HTT Messages did we process when we did not have to yield
Average 2.193476
Max 24
Min 1
Change-Id: I0d42c716ab8941b1de22a456447797c9ba5475c8
CRs-Fixed: 1089902
Currently NAPI stats are retrieved as a part of iwpriv getStats command.
The buffer available for this command is limited and NAPI stats get
trucncated.
Add a new dumpStats parameter (9) to dump NAPI stats.
Change-Id: Iaf52a3dcecac2f7b24fde2f8220fbfddc767965b
CRs-Fixed: 1076563
There should be no PCIe link access from DP fastpath when device has
runtime PM suspended. Runtime PM resume needs to be requested before
such access happens.
Change-Id: I924ea3e3d5b7d823efd3bd10e2be9b36a5998e24
CRs-fixed: 2023358
Fastpath DP should be resumed after WOW is disabled from FW. Move
it to correct place.
Change-Id: I9108ee4393cc4ee5f8a232c3de14d68b47aa760e
CRs-fixed: 2023358
Fix several small issues preventing the Runtime PM feature flag from
being enabled by default.
Change-Id: I783a7955c061f40fe4f4342717893cebd32c672b
CRs-Fixed: 2026865
When bufs needed to post in a CE ring reaches (max no. of entries - 1),
assert happens to print the dumpstack in kmsg. Once this condition is
reached, a work is scheduled to recover CE from this OOM condition which
tries to post buffers in CE. If buf posting fails again, assert will happen
and work will be scheduled again. So, if system is in low memory situation,
then buf allocation and posting will fail leading to assert and work
scheduling again and again in a cycle. Due to these continuous dumpstacks
in kmsg as a result of QDF_ASSERT(), watchdog bark is happening.
Remove QDF_ASSERT from hif_post_recv_buffers_failure() as suffcient prints
and history is present to indicate the situation and so there is no need of
any kind of dumpstack in kmsg.
Change-Id: Ib8bafb9a9fe45c62a15c45fa8a610da2074e058c
CRs-Fixed: 2021793
In oom condition, when an rx ce is oom, the ce would
deadlock as the hw couldn't copy any messages (due to the oom)
and the sw wouldn't initiate a pipe refill without a new message.
When this happens submit a work to a workqueue to try and kickstart
the cycle by allocating an nbuf and posting it to the ce.
Change-Id: I047818145dbe230fefc447b6b034705f9b87ca70
CRs-Fixed: 2015778
Make it easier to identify when nbuf allocation starvation
in hif is the root cause for a crash, by adding events to
the hif_ce_desc_history buffer.
Change-Id: Id3b919f17ee79770f5fa81b389f9a28a0670cfa2
CRs-Fixed: 2011015
IPA team wants to allocate more buffers and the IPA ring
should be able to hold them all since ipa doesn't have
an error path when the copy engine is full.
Change-Id: I30b8970ce59c7eb4e6a38170a56d6e00e88737fc
CRs-Fixed: 2011766
In one log the rx ring is depleted in 2.4 seconds
durring a prolonged period of memory contention.
Double the rx ring size to allow 5 seconds before
the wmi ce is oom.
Change-Id: I2e9a6caeee10f317bd3d70b770fcae3ad2d96623
CRs-Fixed: 2015778
Upper layers are failing to block disallowed traffic durring suspend.
Hif can enqueue the messages on the ce rings without letting hardware
know they are there. When fw is ready to recieve non wmi packets,
hif can inform hw of the queued packets.
Change-Id: I32810d9548416021c1da4f48a4ac539f75f1d907
CRs-Fixed: 2003582
Use correct dev_id in free_irq and add conditional check to avoid
access to registers not present on 8074 soc emulation.
Change-Id: I60055b8426b1941fca1b2f238d4e26b47ead54f9
Include Hawkeye emulation PCI device ids in hif_pci_enable_bus to
support PCI based emulation platform to support multiple nodes.
Change-Id: Iddc4c92a39713e27386c6f9cf64b5efd34b3ba44
CRs-Fixed: 1090092
pld_disable_irq is a no-op for PCI devices, causing unit-test resume
to fail in some cases. Define new IRQ disable/enable API's in HIF for
unit-test suspend/resume to use.
Change-Id: Ib3e6007025e791c867463c7d9f64512628c4ca0b
CRs-Fixed: 2023978
Pointer is dereferenced after it was positively checked for NULL.
Since the handle should already check for null when we call
cds_get_context, when we recieve the handle as an argument, we should
know that it is not null. So remove the unnecessary null check here.
Change-Id: I9e46c8151dec3ff9d36292d7d306f8bf3ae61b7d
CRs-Fixed: 1111505
In case of IPA hw version less than 3.0, only 32 bit DMA
address can be handled as it is only 32 bit compliant.
Because of this, setting DMA coherent mask of 37 when
IPA hw version is less than 3.0, crash is happening.
Do IPA version based DMA coherent mask setting such that
when IPA hw version is less than 3.0, set DMA coherent mask
as 32 only.
Change-Id: I8dec7da47766985ab0590f885b29f345f153cd08
CRs-Fixed: 1114605
Firmware requires WMI commands to be sent on different copy engine for
each MAC. Change CE assignement to support this.
Change-Id: I91a2422a944741dc25c3bf45b18cde30e7409632
CRs-Fixed: 2005214
Analyze the critical section of the runtime PM feature
and replace the spin_lock_irqsave with spin_lock_bh.
Disabling the IRQ and usage of spinlock for runtime PM
debugging, logging and warning feature Is not required,
remove the usage of spinlock from this context.
The runtime PM APIs which is used for the prevent/allow
runtime PM suspend /resume can be use spin_lock_bh instead
of spin_lock_irqsave. For the runtime PM APIs add check point
to identify the IRQ context, If the runtime PM APIs calling
from IRQ context report WARN_ON for debugging purpose.
CRs-Fixed: 1112447
Change-Id: If06970c6ac610a0128344e8c25a9cdd57b2542a3
Failed to open sdio bus for HL target, due to
missing of 'break' in 'switch' case.
Add 'break' for QDF_BUS_TYPE_SDIO
Change-Id: I0d43a61c89828f76223c9f95f4de41a76381c7bb
CRs-Fixed: 2004349
Include Hawkeye emulation PCI device ids in probe list to enable
PCI based emulation platform to support multiple nodes.
Change-Id: I539c099912e5e7fa4865f57a139f5e75c1b06462
CRs-Fixed: 1090092
hif is not responsible for pktlog. These prototypes
do not need to be defined here
Change-Id: I9dd99b9cb7ec9aa5f0763d8f6cc0e9f95d13c016
CRs-Fixed: 2004398
For platforms that don't use QMI and have firmware
enable shadow registers, host needs to ignore the
shadow register configuration it calculated.
Change-Id: I91a3d9a0c65172afde6a2ddab61651f9f8683aee
CRs-Fixed: 2003581
ATH diag procfs read is copying read_buffer to user space
unconditionally, causing kernel heap information leak of
uninitialized read_buffer if hif diag read fails.
Do not copy buffer to user space if diag read fails to
avoid information leak to user space.
Change-Id: I5e07cad4f90e5e9b3c461268b8fa3635c3128b9f
CRs-Fixed: 1104731
Fix a crash durring hif_wlan_enable where the shadow_v2 was
dereferenced while pointing to garbage memory.
For legacy ce, uninitialized values from the stack were left
in the pld shadow_v2 config. The checks to skip printing the
shadow_v2 config were confused by uninitized stack memory and
the driver tries to dereference unitialized shadow_v2 memory.
Ensure the configuration is filled with NULL & 0 when it is
not applicable.
Change-Id: I668fcf78b1a7c8e6e235d96e428a9808a4e072c7
CRs-Fixed: 2001315
Ce recv buffers that were given to hardware and never returned
need to be freed.
Change-Id: I427ef993110e24dcbbc1891fe3eb456f688526ae
CRs-Fixed: 2000136
Adding lock stats print upon spinlock & mutex destroy.
The spinlock destroy of the lro unloading lock in the
napi context did not match the create in location.
When a station adapter goes down and is brought back up,
the mismatch appears.
Change-Id: I137e6ffce3fb23f32a085b9fa36b065449a6d8a1
CRs-Fixed: 1111956
The Common subsystem shutdown is allowed after the irq_enable
register is written. A race condition in host (multiple other
interrupts firing on the same core). Can delay the register read
and allow the common sub system to be shutdown before the read.
The read would then cause an SNOC error as the register is unclocked.
Change-Id: Icb90c185eabcbd63b28b02bdf5c1de2d06d3620e
CRs-Fixed: 1108494
Adding lock stats print upon spinlock & mutex destroy.
Without the destroy api invoked the lock stats are not printed.
Change-Id: I50b4db8412e336fcc22514be3ae4aaa2188415a8
CRs-Fixed: 1100505
Adding lock stats print upon spinlock & mutex destroy.
Without the destroy api invoked the lock stats are not printed.
Change-Id: Id3c432e1f6982ea47bdf1de5c15f1a3568df4eb9
CRs-Fixed: 1100505
Make sure that NAPI event handler would handle events only
after it has been initialized. Check init flag before procesing
the event and emit a warning and return an error to the caller.
Change-Id: I9d2b84560ee2363ecf2a570dbef0275dfb87786a
CRs-Fixed: 1091678
hif_prepare_hal_shadow_register_cfg and hif_print_hal_shadow_register_cfg
needed to be declared static after enabling "Werror=missing-prototypes"
Change-Id: I3682436edb7bcb3ee02f1c4037aefc82863c0ec5
CRs-Fixed: 1113131