Lines Matching refs:scn
79 struct hif_softc *scn = ce_work->data; in reschedule_ce_tasklet_work_handler() local
82 if (!scn) { in reschedule_ce_tasklet_work_handler()
87 hif_ce_state = HIF_GET_CE_STATE(scn); in reschedule_ce_tasklet_work_handler()
89 if (scn->hif_init_done == false) { in reschedule_ce_tasklet_work_handler()
119 void init_tasklet_worker_by_ceid(struct hif_opaque_softc *scn, int ce_id) in init_tasklet_worker_by_ceid() argument
123 tasklet_workers[ce_id].data = scn; in init_tasklet_worker_by_ceid()
134 void deinit_tasklet_workers(struct hif_opaque_softc *scn) in deinit_tasklet_workers() argument
152 hif_record_tasklet_exec_entry_ts(struct hif_softc *scn, uint8_t ce_id) in hif_record_tasklet_exec_entry_ts() argument
154 struct HIF_CE_state *hif_ce_state = HIF_GET_CE_STATE(scn); in hif_record_tasklet_exec_entry_ts()
169 hif_record_tasklet_sched_entry_ts(struct hif_softc *scn, uint8_t ce_id) in hif_record_tasklet_sched_entry_ts() argument
171 struct HIF_CE_state *hif_ce_state = HIF_GET_CE_STATE(scn); in hif_record_tasklet_sched_entry_ts()
323 hif_record_tasklet_exec_entry_ts(struct hif_softc *scn, uint8_t ce_id) in hif_record_tasklet_exec_entry_ts() argument
333 hif_record_tasklet_sched_entry_ts(struct hif_softc *scn, uint8_t ce_id) in hif_record_tasklet_sched_entry_ts() argument
352 hif_reset_ce_full_count(struct hif_softc *scn, uint8_t ce_id) in hif_reset_ce_full_count() argument
354 struct HIF_CE_state *hif_ce_state = HIF_GET_CE_STATE(scn); in hif_reset_ce_full_count()
360 hif_reset_ce_full_count(struct hif_softc *scn, uint8_t ce_id) in hif_reset_ce_full_count() argument
416 struct hif_softc *scn = HIF_GET_SOFTC(hif_ce_state); in ce_tasklet() local
417 struct CE_state *CE_state = scn->ce_id_to_state[tasklet_entry->ce_id]; in ce_tasklet()
419 hif_record_ce_desc_event(scn, tasklet_entry->ce_id, in ce_tasklet()
422 if (scn->ce_latency_stats) in ce_tasklet()
423 hif_record_tasklet_exec_entry_ts(scn, tasklet_entry->ce_id); in ce_tasklet()
425 hif_tasklet_latency_record_exec(scn, tasklet_entry->ce_id); in ce_tasklet()
427 if (qdf_atomic_read(&scn->link_suspended)) { in ce_tasklet()
435 ce_per_engine_service(scn, tasklet_entry->ce_id); in ce_tasklet()
447 qdf_atomic_dec(&scn->active_tasklet_cnt); in ce_tasklet()
451 hif_record_ce_desc_event(scn, tasklet_entry->ce_id, in ce_tasklet()
456 hif_tasklet_latency_record_sched(scn, tasklet_entry->ce_id); in ce_tasklet()
458 hif_reset_ce_full_count(scn, tasklet_entry->ce_id); in ce_tasklet()
459 if (scn->ce_latency_stats) { in ce_tasklet()
462 hif_record_tasklet_sched_entry_ts(scn, in ce_tasklet()
468 hif_record_ce_desc_event(scn, tasklet_entry->ce_id, HIF_CE_TASKLET_EXIT, in ce_tasklet()
471 if (scn->ce_latency_stats) in ce_tasklet()
474 if ((scn->target_status != TARGET_STATUS_RESET) && in ce_tasklet()
475 !scn->free_irq_done) in ce_tasklet()
476 hif_irq_enable(scn, tasklet_entry->ce_id); in ce_tasklet()
478 qdf_atomic_dec(&scn->active_tasklet_cnt); in ce_tasklet()
518 void ce_tasklet_kill(struct hif_softc *scn) in ce_tasklet_kill() argument
521 struct HIF_CE_state *hif_ce_state = HIF_GET_CE_STATE(scn); in ce_tasklet_kill()
538 qdf_atomic_set(&scn->active_tasklet_cnt, 0); in ce_tasklet_kill()
578 int hif_drain_tasklets(struct hif_softc *scn) in hif_drain_tasklets() argument
583 while ((tasklet_cnt = qdf_atomic_read(&scn->active_tasklet_cnt))) { in hif_drain_tasklets()
605 static bool hif_interrupt_is_ut_resume(struct hif_softc *scn, int ce_id) in hif_interrupt_is_ut_resume() argument
610 if (!hif_is_ut_suspended(scn)) in hif_interrupt_is_ut_resume()
614 errno = hif_get_wake_ce_id(scn, &wake_ce_id); in hif_interrupt_is_ut_resume()
624 hif_interrupt_is_ut_resume(struct hif_softc *scn, int ce_id) in hif_interrupt_is_ut_resume() argument
640 struct hif_softc *scn = HIF_GET_SOFTC(tasklet_entry->hif_ce_state); in hif_snoc_interrupt_handler() local
642 return ce_dispatch_interrupt(pld_get_ce_id(scn->qdf_dev->dev, irq), in hif_snoc_interrupt_handler()
716 void hif_set_ce_tasklet_sched_time(struct hif_softc *scn, uint8_t ce_id) in hif_set_ce_tasklet_sched_time() argument
718 struct CE_state *ce_state = scn->ce_id_to_state[ce_id]; in hif_set_ce_tasklet_sched_time()
724 void hif_set_ce_tasklet_sched_time(struct hif_softc *scn, uint8_t ce_id) in hif_set_ce_tasklet_sched_time() argument
739 struct hif_softc *scn = HIF_GET_SOFTC(hif_ctx); in hif_tasklet_schedule() local
743 qdf_atomic_dec(&scn->active_tasklet_cnt); in hif_tasklet_schedule()
747 hif_set_ce_tasklet_sched_time(scn, tasklet_entry->ce_id); in hif_tasklet_schedule()
751 hif_tasklet_latency_record_sched(scn, tasklet_entry->ce_id); in hif_tasklet_schedule()
754 hif_reset_ce_full_count(scn, tasklet_entry->ce_id); in hif_tasklet_schedule()
755 if (scn->ce_latency_stats) in hif_tasklet_schedule()
756 hif_record_tasklet_sched_entry_ts(scn, tasklet_entry->ce_id); in hif_tasklet_schedule()
773 static int ce_poll_reap_by_id(struct hif_softc *scn, enum ce_id_type ce_id) in ce_poll_reap_by_id() argument
775 struct HIF_CE_state *hif_ce_state = (struct HIF_CE_state *)scn; in ce_poll_reap_by_id()
776 struct CE_state *CE_state = scn->ce_id_to_state[ce_id]; in ce_poll_reap_by_id()
779 if (scn->ce_latency_stats) in ce_poll_reap_by_id()
780 hif_record_tasklet_exec_entry_ts(scn, ce_id); in ce_poll_reap_by_id()
782 hif_record_ce_desc_event(scn, ce_id, HIF_CE_REAP_ENTRY, in ce_poll_reap_by_id()
786 ce_per_engine_service(scn, ce_id); in ce_poll_reap_by_id()
789 hif_record_ce_desc_event(scn, ce_id, in ce_poll_reap_by_id()
804 hif_record_ce_desc_event(scn, ce_id, HIF_CE_REAP_EXIT, in ce_poll_reap_by_id()
807 if (scn->ce_latency_stats) in ce_poll_reap_by_id()
822 int hif_drain_fw_diag_ce(struct hif_softc *scn) in hif_drain_fw_diag_ce() argument
825 struct HIF_CE_state *hif_ce_state = (struct HIF_CE_state *)scn; in hif_drain_fw_diag_ce()
828 if (hif_get_fw_diag_ce_id(scn, &ce_id)) in hif_drain_fw_diag_ce()
840 return ce_poll_reap_by_id(scn, ce_id); in hif_drain_fw_diag_ce()
849 struct hif_softc *scn = HIF_GET_SOFTC(hif_ce_state); in ce_check_tasklet_status() local
850 struct hif_opaque_softc *hif_hdl = GET_HIF_OPAQUE_HDL(scn); in ce_check_tasklet_status()
855 napi = scn->napi_data.napis[ce_id]; in ce_check_tasklet_status()
902 struct hif_softc *scn = HIF_GET_SOFTC(hif_ce_state); in ce_dispatch_interrupt() local
903 struct hif_opaque_softc *hif_hdl = GET_HIF_OPAQUE_HDL(scn); in ce_dispatch_interrupt()
912 scn->ce_count); in ce_dispatch_interrupt()
925 ce_state = scn->ce_id_to_state[ce_id]; in ce_dispatch_interrupt()
933 if (!TARGET_REGISTER_ACCESS_ALLOWED(scn)) { in ce_dispatch_interrupt()
938 hif_irq_disable(scn, ce_id); in ce_dispatch_interrupt()
940 hif_record_ce_desc_event(scn, ce_id, HIF_IRQ_EVENT, in ce_dispatch_interrupt()
944 if (unlikely(hif_interrupt_is_ut_resume(scn, ce_id))) { in ce_dispatch_interrupt()
945 hif_ut_fw_resume(scn); in ce_dispatch_interrupt()
946 hif_irq_enable(scn, ce_id); in ce_dispatch_interrupt()
951 qdf_atomic_inc(&scn->active_tasklet_cnt); in ce_dispatch_interrupt()
998 struct hif_softc *scn; in ce_unregister_irq() local
1005 scn = HIF_GET_SOFTC(hif_ce_state); in ce_unregister_irq()
1006 ce_count = scn->ce_count; in ce_unregister_irq()
1008 ret = hif_napi_event(GET_HIF_OPAQUE_HDL(scn), in ce_unregister_irq()
1018 ret = pld_ce_free_irq(scn->qdf_dev->dev, id, in ce_unregister_irq()
1025 ce_disable_polling(scn->ce_id_to_state[id]); in ce_unregister_irq()
1048 struct hif_softc *scn = HIF_GET_SOFTC(hif_ce_state); in ce_register_irq() local
1050 ce_count = scn->ce_count; in ce_register_irq()
1054 ret = pld_ce_request_irq(scn->qdf_dev->dev, id, in ce_register_irq()