Lines Matching refs:scn

155 void hif_ce_desc_record_rx_paddr(struct hif_softc *scn,  in hif_ce_desc_record_rx_paddr()  argument
162 scn->qdf_dev, in hif_ce_desc_record_rx_paddr()
173 struct hif_softc *scn = HIF_GET_SOFTC(hif_ctx); in hif_display_latest_desc_hist() local
178 if (!scn) in hif_display_latest_desc_hist()
181 ce_hist = &scn->hif_ce_desc_hist; in hif_display_latest_desc_hist()
261 void hif_record_ce_desc_event(struct hif_softc *scn, int ce_id, in hif_record_ce_desc_event() argument
270 struct ce_desc_hist *ce_hist = &scn->hif_ce_desc_hist; in hif_record_ce_desc_event()
307 hif_ce_desc_record_rx_paddr(scn, event, memory); in hif_record_ce_desc_event()
324 void ce_init_ce_desc_event_log(struct hif_softc *scn, int ce_id, int size) in ce_init_ce_desc_event_log() argument
326 struct ce_desc_hist *ce_hist = &scn->hif_ce_desc_hist; in ce_init_ce_desc_event_log()
337 inline void ce_deinit_ce_desc_event_log(struct hif_softc *scn, int ce_id) in ce_deinit_ce_desc_event_log() argument
339 struct ce_desc_hist *ce_hist = &scn->hif_ce_desc_hist; in ce_deinit_ce_desc_event_log()
345 void hif_record_ce_desc_event(struct hif_softc *scn, in hif_record_ce_desc_event() argument
353 inline void ce_init_ce_desc_event_log(struct hif_softc *scn, int ce_id, in ce_init_ce_desc_event_log() argument
358 void ce_deinit_ce_desc_event_log(struct hif_softc *scn, int ce_id) in ce_deinit_ce_desc_event_log() argument
364 bool hif_ce_service_should_yield(struct hif_softc *scn, in hif_ce_service_should_yield() argument
367 bool yield = hif_max_num_receives_reached(scn, ce_state->receive_count); in hif_ce_service_should_yield()
387 bool hif_ce_service_should_yield(struct hif_softc *scn, in hif_ce_service_should_yield() argument
397 (scn, ce_state->receive_count); in hif_ce_service_should_yield()
411 hif_napi_enabled(GET_HIF_OPAQUE_HDL(scn), ce_state->id)) { in hif_ce_service_should_yield()
426 struct hif_softc *scn = ce_state->scn; in ce_flush_tx_ring_write_idx() local
433 CE_SRC_RING_WRITE_IDX_SET(scn, ce_state->ctrl_addr, in ce_flush_tx_ring_write_idx()
448 struct hif_softc *scn = ce_state->scn; in ce_tx_ring_write_idx_update_wrapper() local
451 CE_SRC_RING_WRITE_IDX_SET(scn, ce_state->ctrl_addr, in ce_tx_ring_write_idx_update_wrapper()
460 void war_ce_src_ring_write_idx_set(struct hif_softc *scn, in war_ce_src_ring_write_idx_set() argument
466 indicator_addr = scn->mem + ctrl_addr + DST_WATERMARK_ADDRESS; in war_ce_src_ring_write_idx_set()
470 hif_write32_mb(scn, indicator_addr, in war_ce_src_ring_write_idx_set()
476 hif_write32_mb(scn, indicator_addr, 1); in war_ce_src_ring_write_idx_set()
482 (void)hif_read32_mb(scn, indicator_addr); in war_ce_src_ring_write_idx_set()
484 (void)hif_read32_mb(scn, indicator_addr); in war_ce_src_ring_write_idx_set()
486 CE_SRC_RING_WRITE_IDX_SET(scn, in war_ce_src_ring_write_idx_set()
489 hif_write32_mb(scn, indicator_addr, 0); in war_ce_src_ring_write_idx_set()
493 CE_SRC_RING_WRITE_IDX_SET(scn, ctrl_addr, write_index); in war_ce_src_ring_write_idx_set()
510 struct HIF_CE_state *hif_state = HIF_GET_CE_STATE(CE_state->scn); in ce_send()
566 struct HIF_CE_state *hif_state = HIF_GET_CE_STATE(CE_state->scn); in ce_sendlist_send()
596 struct hif_softc *scn = ce_state->scn; in ce_batch_send() local
612 DATA_CE_UPDATE_SWINDEX(src_ring->sw_index, scn, ctrl_addr); in ce_batch_send()
626 war_ce_src_ring_write_idx_set(scn, ctrl_addr, in ce_batch_send()
674 war_ce_src_ring_write_idx_set(scn, ctrl_addr, write_index); in ce_batch_send()
727 struct hif_softc *scn = ce_state->scn; in ce_send_single() local
742 DATA_CE_UPDATE_SWINDEX(src_ring->sw_index, scn, ctrl_addr); in ce_send_single()
775 hif_record_ce_desc_event(scn, ce_state->id, event_type, in ce_send_single()
783 war_ce_src_ring_write_idx_set(scn, ctrl_addr, write_index); in ce_send_single()
801 struct HIF_CE_state *hif_state = HIF_GET_CE_STATE(CE_state->scn); in ce_recv_buf_enqueue()
815 struct hif_softc *scn = CE_state->scn; in ce_send_watermarks_set() local
817 CE_SRC_RING_LOWMARK_SET(scn, ctrl_addr, low_alert_nentries); in ce_send_watermarks_set()
818 CE_SRC_RING_HIGHMARK_SET(scn, ctrl_addr, high_alert_nentries); in ce_send_watermarks_set()
828 struct hif_softc *scn = CE_state->scn; in ce_recv_watermarks_set() local
830 CE_DEST_RING_LOWMARK_SET(scn, ctrl_addr, in ce_recv_watermarks_set()
832 CE_DEST_RING_HIGHMARK_SET(scn, ctrl_addr, in ce_recv_watermarks_set()
882 struct hif_softc *scn = CE_state->scn; in ce_completed_recv_next() local
883 struct HIF_CE_state *hif_state = HIF_GET_CE_STATE(scn); in ce_completed_recv_next()
903 struct HIF_CE_state *hif_state = HIF_GET_CE_STATE(CE_state->scn); in ce_revoke_recv_next()
919 struct HIF_CE_state *hif_state = HIF_GET_CE_STATE(CE_state->scn); in ce_cancel_send_next()
939 struct hif_softc *scn = CE_state->scn; in ce_completed_send_next() local
940 struct HIF_CE_state *hif_state = HIF_GET_CE_STATE(scn); in ce_completed_send_next()
966 void ce_per_engine_servicereap(struct hif_softc *scn, unsigned int ce_id) in ce_per_engine_servicereap() argument
975 struct CE_state *CE_state = scn->ce_id_to_state[ce_id]; in ce_per_engine_servicereap()
976 struct HIF_CE_state *hif_state = HIF_GET_CE_STATE(scn); in ce_per_engine_servicereap()
978 if (Q_TARGET_ACCESS_BEGIN(scn) < 0) in ce_per_engine_servicereap()
981 hif_record_ce_desc_event(scn, ce_id, HIF_CE_REAP_ENTRY, in ce_per_engine_servicereap()
1039 hif_record_ce_desc_event(scn, ce_id, HIF_CE_REAP_EXIT, in ce_per_engine_servicereap()
1041 Q_TARGET_ACCESS_END(scn); in ce_per_engine_servicereap()
1075 void ce_engine_service_reg(struct hif_softc *scn, int CE_id) in ce_engine_service_reg() argument
1077 struct CE_state *CE_state = scn->ce_id_to_state[CE_id]; in ce_engine_service_reg()
1079 struct HIF_CE_state *hif_state = HIF_GET_CE_STATE(scn); in ce_engine_service_reg()
1090 uint32_t mode = hif_get_conparam(scn); in ce_engine_service_reg()
1204 if (!ce_srng_based(scn) && !CE_state->msi_supported) { in ce_engine_service_reg()
1205 if (TARGET_REGISTER_ACCESS_ALLOWED(scn)) { in ce_engine_service_reg()
1206 CE_ENGINE_INT_STATUS_CLEAR(scn, ctrl_addr, in ce_engine_service_reg()
1225 hif_state->ce_services->ce_recv_entries_done_nolock(scn, in ce_engine_service_reg()
1231 if (!ce_srng_based(scn) && in ce_engine_service_reg()
1238 CE_DEST_RING_READ_IDX_GET(scn, in ce_engine_service_reg()
1245 hif_state->ce_services->ce_send_entries_done_nolock(scn, in ce_engine_service_reg()
1251 if (!ce_srng_based(scn) && in ce_engine_service_reg()
1260 CE_SRC_RING_READ_IDX_GET(scn, in ce_engine_service_reg()
1304 int ce_per_engine_service(struct hif_softc *scn, unsigned int CE_id) in ce_per_engine_service() argument
1306 struct CE_state *CE_state = scn->ce_id_to_state[CE_id]; in ce_per_engine_service()
1308 if (hif_is_nss_wifi_enabled(scn) && (CE_state->htt_rx_data)) in ce_per_engine_service()
1311 if (Q_TARGET_ACCESS_BEGIN(scn) < 0) { in ce_per_engine_service()
1323 (struct hif_opaque_softc *)scn); in ce_per_engine_service()
1329 CE_state->service(scn, CE_id); in ce_per_engine_service()
1333 if (Q_TARGET_ACCESS_END(scn) < 0) in ce_per_engine_service()
1345 void ce_per_engine_service_any(int irq, struct hif_softc *scn) in ce_per_engine_service_any() argument
1350 if (Q_TARGET_ACCESS_BEGIN(scn) < 0) in ce_per_engine_service_any()
1353 if (!qdf_atomic_read(&scn->tasklet_from_intr)) { in ce_per_engine_service_any()
1354 for (CE_id = 0; CE_id < scn->ce_count; CE_id++) { in ce_per_engine_service_any()
1355 struct CE_state *CE_state = scn->ce_id_to_state[CE_id]; in ce_per_engine_service_any()
1359 ce_per_engine_service(scn, CE_id); in ce_per_engine_service_any()
1363 Q_TARGET_ACCESS_END(scn); in ce_per_engine_service_any()
1367 intr_summary = CE_INTERRUPT_SUMMARY(scn); in ce_per_engine_service_any()
1369 for (CE_id = 0; intr_summary && (CE_id < scn->ce_count); CE_id++) { in ce_per_engine_service_any()
1375 ce_per_engine_service(scn, CE_id); in ce_per_engine_service_any()
1378 Q_TARGET_ACCESS_END(scn); in ce_per_engine_service_any()
1384 void ce_disable_any_copy_compl_intr_nolock(struct hif_softc *scn) in ce_disable_any_copy_compl_intr_nolock() argument
1388 if (Q_TARGET_ACCESS_BEGIN(scn) < 0) in ce_disable_any_copy_compl_intr_nolock()
1391 for (CE_id = 0; CE_id < scn->ce_count; CE_id++) { in ce_disable_any_copy_compl_intr_nolock()
1392 struct CE_state *CE_state = scn->ce_id_to_state[CE_id]; in ce_disable_any_copy_compl_intr_nolock()
1398 CE_COPY_COMPLETE_INTR_DISABLE(scn, ctrl_addr); in ce_disable_any_copy_compl_intr_nolock()
1401 CE_WATERMARK_INTR_DISABLE(scn, ctrl_addr); in ce_disable_any_copy_compl_intr_nolock()
1403 Q_TARGET_ACCESS_END(scn); in ce_disable_any_copy_compl_intr_nolock()
1406 void ce_enable_any_copy_compl_intr_nolock(struct hif_softc *scn) in ce_enable_any_copy_compl_intr_nolock() argument
1410 if (Q_TARGET_ACCESS_BEGIN(scn) < 0) in ce_enable_any_copy_compl_intr_nolock()
1413 for (CE_id = 0; CE_id < scn->ce_count; CE_id++) { in ce_enable_any_copy_compl_intr_nolock()
1414 struct CE_state *CE_state = scn->ce_id_to_state[CE_id]; in ce_enable_any_copy_compl_intr_nolock()
1424 CE_COPY_COMPLETE_INTR_ENABLE(scn, ctrl_addr); in ce_enable_any_copy_compl_intr_nolock()
1427 CE_WATERMARK_INTR_ENABLE(scn, ctrl_addr); in ce_enable_any_copy_compl_intr_nolock()
1429 Q_TARGET_ACCESS_END(scn); in ce_enable_any_copy_compl_intr_nolock()
1453 struct hif_softc *scn; in ce_send_cb_register() local
1460 scn = CE_state->scn; in ce_send_cb_register()
1461 hif_state = HIF_GET_CE_STATE(scn); in ce_send_cb_register()
1492 struct hif_softc *scn; in ce_recv_cb_register() local
1499 scn = CE_state->scn; in ce_recv_cb_register()
1500 hif_state = HIF_GET_CE_STATE(scn); in ce_recv_cb_register()
1526 struct hif_softc *scn = CE_state->scn; in ce_watermark_cb_register() local
1527 struct HIF_CE_state *hif_state = HIF_GET_CE_STATE(scn); in ce_watermark_cb_register()
1584 bool ce_get_rx_pending(struct hif_softc *scn) in ce_get_rx_pending() argument
1588 for (CE_id = 0; CE_id < scn->ce_count; CE_id++) { in ce_get_rx_pending()
1589 struct CE_state *CE_state = scn->ce_id_to_state[CE_id]; in ce_get_rx_pending()
1619 struct hif_softc *scn = CE_state->scn; in ce_ipa_get_wr_index_addr() local
1622 wr_index_addr = shadow_sr_wr_ind_addr(scn, ctrl_addr); in ce_ipa_get_wr_index_addr()
1628 struct hif_softc *scn = CE_state->scn; in ce_ipa_get_wr_index_addr() local
1661 struct hif_softc *scn = CE_state->scn; in ce_ipa_get_resource() local
1664 *qdf_mem_get_dma_addr_ptr(scn->qdf_dev, in ce_ipa_get_resource()
1665 &CE_state->scn->ipa_ce_ring->mem_info) = 0; in ce_ipa_get_resource()
1680 hif_read_phy_mem_base(CE_state->scn, &phy_mem_base); in ce_ipa_get_resource()
1682 *ce_sr = CE_state->scn->ipa_ce_ring; in ce_ipa_get_resource()
1804 ssize_t hif_dump_desc_event(struct hif_softc *scn, char *buf) in hif_dump_desc_event() argument
1812 if (!scn) in hif_dump_desc_event()
1815 ce_hist = &scn->hif_ce_desc_hist; in hif_dump_desc_event()
1877 ssize_t hif_input_desc_trace_buf_index(struct hif_softc *scn, in hif_input_desc_trace_buf_index() argument
1882 if (!scn) in hif_input_desc_trace_buf_index()
1885 ce_hist = &scn->hif_ce_desc_hist; in hif_input_desc_trace_buf_index()
1921 ssize_t hif_ce_en_desc_hist(struct hif_softc *scn, const char *buf, size_t size) in hif_ce_en_desc_hist() argument
1927 if (!scn) in hif_ce_en_desc_hist()
1930 ce_hist = &scn->hif_ce_desc_hist; in hif_ce_en_desc_hist()
1961 if (alloc_mem_ce_debug_hist_data(scn, ce_id) in hif_ce_en_desc_hist()
1973 free_mem_ce_debug_hist_data(scn, ce_id); in hif_ce_en_desc_hist()
1991 ssize_t hif_disp_ce_enable_desc_data_hist(struct hif_softc *scn, char *buf) in hif_disp_ce_enable_desc_data_hist() argument
1997 if (!scn) in hif_disp_ce_enable_desc_data_hist()
2000 ce_hist = &scn->hif_ce_desc_hist; in hif_disp_ce_enable_desc_data_hist()
2180 uint8_t *hif_log_dump_ce(struct hif_softc *scn, uint8_t *buf_cur, in hif_log_dump_ce() argument
2188 ce_state = scn->ce_id_to_state[ce]; in hif_log_dump_ce()