Async task thread will claim sdio bus, this claim action will
keep sdio clock on.
During system suspend, after mmc controller suspended, wlan
claim sdio, then it will cause mmc exit suspend as it found clock is on.
Move this claim action before bus transaction to avoid rebundant claim.
Change-Id: I3bab449d0a93c9107c455ee7dbcc6df99ca28636
CRs-Fixed: 2299526
Current wifi driver breaks tasklet storm by scheduling a work
whenever wifi driver tasklet reschedules itself to avoid excessive
tasklet storm and wd barks as a side effect. Remove work scheduling
from tasklet reschedule such that tasklets can be rescheduled as
fast as possible and reap CE rings as fast as possible and let linux
kernel handle the tasklet storm by bringing in ksoftirqd as needed.
Change-Id: I985369f534c09903b2d269f858adb88640e4fd2f
Crs-Fixed: 2325935
In ce_alloc_ring_state(), in case of DMA coherent failure driver
trying to free wrong pointer, instead of allocated pointer which
leads to qdf_mem_header_assert_valid check failure.
Free the actual allocated pointer in case of DMA coherent failure
Change-Id: I227c8240ca37a138335bb0766445564a10493c56
CRs-Fixed: 2320196
HKV2 has support for three radios. Update Target service map
for HKV2 to map third endpoint for WMI commands corresponding to
third radio.
Change-Id: I9b84dedf1fcddf5c6d43e12c6688d8f9ee7db886
CRs-Fixed: 2313124
CE service file includes APIs for both legacy and lithium
architecture.
These are getting compiled for both targets today. Separate the CE
services into legacy and srng and selectively compile based on
targets present in the SoC.
Note: Generic APIs implemented for both legacy and SRNG services
are separated out through this change. Fast path implementation
will be de-coupled from common service and moved to legacy source
in a follow-up change.
CRs-Fixed: 2258640
Change-Id: If86c21c0bf560a360474c9efcdbcd4841a09828d
Take care of corner case when normlized value is just
one more than QCA_NAPI_BUDGET and add normlized to debug prints.
Change-Id: Ife2010b0ada534a487639dbb780e24445d98c045
CRs-Fixed: 2286601
Avoid deadlocking by disabling bh while holding completion_freeq_lock
operating in process context.
Change-Id: I16b105f68e07939d340ccccfd96f81a37959d5bc
CRs-Fixed: 2308549
Current driver calls ce_tasklet_kill API which does
tasklet_disable() first and then does tasklet_kill which invites
race condition as follows.
1) Lets say CPU-0 is executing ce_tasklet_kill() API
for CE1 (in process ctx) to kill any tasklets associated with CE1-IRQ
2) t1 time- CPU-1 has scheduled the tasklet as part of rescheduled API
ce_schedule_tasklet(), so this tasklet goes to be scheduled list of
kernel.
3) t2 time- CPU-0 executes tasklet_disable() and about to execute
tasklet_kill()
4) t3 time - kernel got a chance and wants to run the tasklet which was
scheduled at t1 time but it can't because t2 time, tasklet has been
disable.
5) t5 time- CPU-0 now executes tasklet_kill which checks if any
tasklet which is in "SCHEDULE" state to go to "RUNNING" state and
finish and tasklet on CPU-1 can't go to "RUNNING" state due to
tasklet_disable(), driver is stuck waiting for it to finish.
Fix the situation by removing tasklet_disable()
Change-Id: I3ac56975dc1f6538962060dd20e881c43e7516ca
CRs-Fixed: 2301368
Some of the macro names defined in qca8074v1, are defined with
a slightly different name in qca8074v2, and few macros have the
same name in both headers but are defined with different values.
Fixed the same.
Change-Id: I5e948baf5326d1d8fdfa2bd7ee8aa072c710d17c
Tasklet get stuck when cds_is_driver_recovering and the driver
state is unloading. It happens due to race between schedule of
tasklet and tasklet_kill. Here one thread is trying to disable &
kill the tasklet while another thread is trying to concurrently
schedule it.
Cancel the tasklet work and make tasklets[i].inited = false before
disabling the tasklet in ce_tasklet_kill() and validate if tasket is
inited before rescheduling the tasklet.
Change-Id: Ib6f4013a73bca8558da097b73535bb8a8f80354d
CRs-Fixed: 2290951
alloc_mem_ce_debug_history() is currently stubbed out when
HIF_CONFIG_SLUB_DEBUG_ON is defined, leading to silent CE history
collection failure on MCL devices. Fix the #define to include the full
definition of this function when HIF_CONFIG_SLUB_DEBUG_ON is enabled.
Change-Id: I8cd4c81e21a3874d717e361751372912ce38d560
CRs-Fixed: 2299012
Add per module logging macros without function/line info
to avoid adding function/line info where it is not required.
Change-Id: Id36cbf9e3848a7ea0095c111319bfa5d46cab5af
CRs-Fixed: 2278876
During freeing up of hif_config_de resources, the ce tasklet workers
are deinitialized after the ce cleanup is done. This causes a race
condition between shutdown and ce tasklet in case rescheduling of ce
taslket is done.
Deinitialize the taslket workers before ce structures are deinitialized.
Change-Id: I708711174cf818c0d15ef92c881c8d8aee49e9f1
CRs-Fixed: 2283272
Fix race condition on setting irq_requested to true by releasing
spin lock irq_save and taking it again. This will update the irq
flags to the irqs enabled after taking the lock.
Change-Id: Ic68847994fd053b8061d35a346ee65a495c7b725
CRs-Fixed: 2293004
Clean up hif and htc component prints by correcting trace levels
for regularly occurring prints and removing newlines from converged
print APIs since qdf_trace_msg appends them by default.
Change-Id: I45b1bbe7b16ab7fb8e229b59a094c7382561d658
CRs-Fixed: 2243843
Add new target type for qca8074v2 and extend target
type checks of QCA8074 for QCA8074V2.
Change-Id: Ib3ff4505e2057fc843b492b9720004dcac042a65
CRs-Fixed: 2292271
1. Allocate and Initialize host and target copy engine configuration
for QCA6390 based products.
2. Setup Copy engine service map for QCA6390.
3. Add conditional compilation flag QCA_WIFI_QCA6390 to support
QCA6390 based products.
Change-Id: Ia4dd4d436b8ecae0e9f91faa0c1fe7dbd14f001f
CRs-Fixed: 2259312
We are taking spinlock irqsave before requesting group irqs. But some
times interrupt is coming immediately for the iqr we reuested even before
releasing spinlock irqlock. Since We are trying to take same spin lock
again for disabling interruts in irq handler dead lock is happening.
Fixing the issue by not handling irqs coming during request irq time.
Change-Id: I31484ab64942cc9e318139c522aac3d7cef9b109
CRs-Fixed: 2286715
When new napi is added unique napi_id is assigned and an entry
is allocated in kernel napi hash table of size 256, vice versa
napi del will remove the entry from hash table. Currently during
driver unload dummy rx napi's(added for GRO case) are not deleted
which causes resource leakage in kernel napi hash table.
While adding new napi if napi_id exceeds hash table size,
then entry from zero index is accessed to find unclaimed
hash entry which trigger invalid entry access since previous
driver unload did not delete napis properly.
In use case where multiple wlan driver instances are used this issue
can be quickly reproducible since it triggers napi_id to exceed
hash table size within less number of driver load/unload.
Fix is to delete rx dummy napi's during driver unload
Change-Id: Idfb24c5c09ebc131c2b19d894d08a8ea34675ed6
CRs-Fixed: 2288118
When the number of bytes to be transmitted in HTC is greater than
allocate buffer length, dump_stack messages are seen on console.
For further debugging on the difference in the length of the buffer
this debug log is added.
Change-Id: I63f105b1f2251726fdd31efbabb14c985525b879
CRs-Fixed: 2274020
Change CE poll timer to wake up CPU so that timer kicks in even though
CPU is in idle state. This is needed so that poll happens in regular
10ms intervals. Also made ce_inited false during wifi down path to
prevent polling during wifi down.
Also made some cleanup in polling implementation to remove global scn
flag to enable polled mode and use attr flag to enable per CE polling.
Change-Id: I1d894c99193cc9902fcf4d6cbfd179c557ec6219
CRs-fixed: 2269599
Root Cause : We are observing BMI transaction issue beacuase the
Fw signal is getting timed out as FW independent bit
is not getting set.
Solution : Read the register value for flushing the PCIe write
Change-Id: I1c877449104dc9e23eaaa18ef848730c81dd5c02
CRs-Fixed: 2266242
Description:
Scheduling ce_tasklet after tasklet_kill call creating kernel
panic during dma operations in ce_per_engine_service.
So added changes to avoid scheduling ce_tasklet after
tasklet_kill call.
IR-228333
Change-Id: Ic8758e22c040aae2a007c0ebe8a613caa9263b15
Removed qdf exports on functions defined in target specific
header files and defined those functions as static. Revert
changes on hal_rx_msdu_end_sa_idx_get and make
hal_rx_msdu_end_da_idx_get target specific
Change-Id: I2858b1d77118f0a26b54bf983bd342c7a4fe757d
This change will help to have pld and non-based based chipset
to work on the same WIN AP platform.
Change-Id: I778cf0d548f5a8575cd6a4fcc76afd0043e5942b
During device reset, wifi_core_id will not be initialized if the
target is not in ready state. Hence assigning default value to it.
Change-Id: I91f3f640ed9252351cb82fbde2515c9308992635
CRs-Fixed: 2180836
Issue can be reproduced when test D0WOW ROME PCIE.
Multi interrupts may only trigger tasklet one time,
which will cause active_tasklet_cnt mismatch.
Check tasklet/napi scheduled state
Change-Id: I66b5544c4d57fe91eae75d4cf8578e30b498e1fd
CRs-Fixed: 2070872
Enable CE schedulign logging feature such that each CE
activity can be recorded for debug purpose. Previous commit
I68a765c6219a2ff2a6a7adc7e8ed031f8957d243 has broken this
debug feature. Fix the CE scheduling logging feature properly
such that its available in SLUB debug enabled builds.
Change-Id: I24ca711378ecda8a8563fe3899fae16ca032f29d
CRs-Fixed: 2272459
1. Modifications for SDIO HIF interface with stack.
Mailbox based devices do not use the SDIO abstraction layer.
So, devices like QCA6174, QCA9379 etc are to interface with
the SDIO stack directly, even if the CNSS wrappers are used.
ADMA based devices use the SDIO abstraction layer. So, devices
like QCN7605 do not interface with the SDIO stack directly.
2. Remove redundant osdrv layer and refactor the functions
3. Propagate hif context to all the interface functions in hif
4. Remove duplicate hif object allocation (scn) in SDIO hif
Change-Id: I75cfe97b1ef913d1a3e6e556ec5eff796eb9f1d9
CRs-Fixed: 2271110
Issue:
Customer sees a lot of NOC errors after wifi comes up as
FW resets the interrupt bits that host configured and
then checks whether interrupt bits are enabled. FW then enters
into MSI mode without filling the necessary MSI address and MSI
data registers with proper values and this leads to lot
of NOC errors on the platform.
Fix description:
Configure the interrupt bits one more time after FW
resets the registers and then mark the host ready bit
in FW indicator address
CRs-Fixed: 2056198
Change-Id: I7a8871a9878b415ec90c4938df669c6225e79586
1) Setup target_type for QCN7605(Genoa) USB.
2) Do not reset soc in hif_usb_diag_write_cold_reset() for QCN7605
3) Skip USB_REQ_SET_CONFIGURATION and usb_set_interface() for QCN7605
4) Return false in hif_needs_bmi() for QCN7605
Change-Id: I159b7043d55c5a1a341defde89cd8ccc760bb830
CRs-Fixed: 2266915