Home
last modified time | relevance | path

Searched refs:wr_idx (Results 1 – 17 of 17) sorted by relevance

/linux/drivers/misc/mei/
A Ddma-ring.c216 u32 wr_idx, rd_idx, hbuf_depth, empty; in mei_dma_ring_empty_slots() local
227 wr_idx = READ_ONCE(ctrl->hbuf_wr_idx); in mei_dma_ring_empty_slots()
229 if (rd_idx > wr_idx) in mei_dma_ring_empty_slots()
230 empty = rd_idx - wr_idx; in mei_dma_ring_empty_slots()
232 empty = hbuf_depth - (wr_idx - rd_idx); in mei_dma_ring_empty_slots()
248 u32 wr_idx, rem, slots; in mei_dma_ring_write() local
258 if (wr_idx + slots > hbuf_depth) { in mei_dma_ring_write()
259 buf += mei_dma_copy_to(dev, buf, wr_idx, hbuf_depth - wr_idx); in mei_dma_ring_write()
260 rem = slots - (hbuf_depth - wr_idx); in mei_dma_ring_write()
261 wr_idx = 0; in mei_dma_ring_write()
[all …]
/linux/drivers/scsi/fnic/
A Dfnic_trace.c72 fnic_trace_entries.wr_idx++; in fnic_trace_get_buf()
110 int wr_idx; in fnic_get_trace_data() local
119 wr_idx = fnic_trace_entries.wr_idx; in fnic_get_trace_data()
120 if (wr_idx < rd_idx) { in fnic_get_trace_data()
159 if (rd_idx == wr_idx) in fnic_get_trace_data()
162 } else if (wr_idx > rd_idx) { in fnic_get_trace_data()
195 if (rd_idx == wr_idx) in fnic_get_trace_data()
672 fc_trace_entries.wr_idx++; in fnic_fc_trace_set_data()
730 int rd_idx, wr_idx; in fnic_fc_trace_get_data() local
743 wr_idx = fc_trace_entries.wr_idx; in fnic_fc_trace_get_data()
[all …]
A Dfnic_trace.h49 int wr_idx; member
/linux/drivers/scsi/snic/
A Dsnic_trc.c37 td = &trc->buf[trc->wr_idx]; in snic_get_trc_buf()
38 trc->wr_idx++; in snic_get_trc_buf()
40 if (trc->wr_idx == trc->max_idx) in snic_get_trc_buf()
41 trc->wr_idx = 0; in snic_get_trc_buf()
43 if (trc->wr_idx != trc->rd_idx) { in snic_get_trc_buf()
96 if (trc->rd_idx == trc->wr_idx) { in snic_get_trc_data()
144 trc->rd_idx = trc->wr_idx = 0; in snic_trc_init()
A Dsnic_trc.h47 u32 wr_idx; member
/linux/drivers/misc/bcm-vk/
A Dbcm_vk_msg.c90 u32 wr_idx, rd_idx; in msgq_occupied() local
92 wr_idx = readl_relaxed(&msgq->wr_idx); in msgq_occupied()
642 wr_idx = readl_relaxed(&msgq->wr_idx); in bcm_to_v_msg_enqueue()
646 wr_idx, qinfo->q_size); in bcm_to_v_msg_enqueue()
657 wr_idx = msgq_inc(qinfo, wr_idx, 1); in bcm_to_v_msg_enqueue()
662 writel(wr_idx, &msgq->wr_idx); in bcm_to_v_msg_enqueue()
669 wr_idx, in bcm_to_v_msg_enqueue()
786 u32 rd_idx, wr_idx; in bcm_to_h_msg_dequeue() local
809 wr_idx = readl_relaxed(&msgq->wr_idx); in bcm_to_h_msg_dequeue()
868 wr_idx, in bcm_to_h_msg_dequeue()
[all …]
A Dbcm_vk_dev.c254 log.buf_size, log.mask, log.rd_idx, log.wr_idx); in bcm_vk_dump_peer_log()
263 (log.wr_idx > log_info->mask) || in bcm_vk_dump_peer_log()
270 log.rd_idx, log.wr_idx); in bcm_vk_dump_peer_log()
277 while (log.rd_idx != log.wr_idx) { in bcm_vk_dump_peer_log()
421 (vk->peerlog_info.wr_idx > vk->peerlog_info.mask)) { in bcm_vk_get_card_info()
426 vk->peerlog_info.wr_idx); in bcm_vk_get_card_info()
433 vk->peerlog_info.wr_idx); in bcm_vk_get_card_info()
A Dbcm_vk_msg.h19 u32 wr_idx; /* write idx */ member
A Dbcm_vk.h311 u32 wr_idx; member
/linux/drivers/net/ethernet/cavium/liquidio/
A Docteon_console.c738 u32 wr_idx, in octeon_console_free_bytes() argument
741 if (rd_idx >= buffer_size || wr_idx >= buffer_size) in octeon_console_free_bytes()
744 return ((buffer_size - 1) - (wr_idx - rd_idx)) % buffer_size; in octeon_console_free_bytes()
748 u32 wr_idx, in octeon_console_avail_bytes() argument
751 if (rd_idx >= buffer_size || wr_idx >= buffer_size) in octeon_console_avail_bytes()
755 octeon_console_free_bytes(buffer_size, wr_idx, rd_idx); in octeon_console_avail_bytes()
762 u32 rd_idx, wr_idx; in octeon_console_read() local
778 wr_idx = octeon_read_device_mem32(oct, console->addr + in octeon_console_read()
782 wr_idx, rd_idx); in octeon_console_read()
/linux/drivers/net/ethernet/netronome/nfp/
A Dnfp_net_common.c1045 txd = &tx_ring->txds[wr_idx]; in nfp_net_tx()
1079 wr_idx = D_IDX(tx_ring, wr_idx + 1); in nfp_net_tx()
1119 wr_idx = wr_idx - 1; in nfp_net_tx()
1120 if (wr_idx < 0) in nfp_net_tx()
1121 wr_idx += tx_ring->cnt; in nfp_net_tx()
1442 unsigned int wr_idx; in nfp_net_rx_give_one() local
1476 unsigned int wr_idx, last_idx; in nfp_net_rx_ring_reset() local
1753 int wr_idx; in nfp_net_tx_xdp_buf() local
1789 txd = &tx_ring->txds[wr_idx]; in nfp_net_tx_xdp_buf()
2116 int wr_idx; in nfp_ctrl_tx_one() local
[all …]
/linux/drivers/media/platform/qcom/venus/
A Dhfi_venus.c169 u32 empty_space, rd_idx, wr_idx, qsize; in venus_write_queue() local
186 wr_idx = qhdr->write_idx; in venus_write_queue()
191 if (wr_idx >= rd_idx) in venus_write_queue()
192 empty_space = qsize - (wr_idx - rd_idx); in venus_write_queue()
194 empty_space = rd_idx - wr_idx; in venus_write_queue()
207 new_wr_idx = wr_idx + dwords; in venus_write_queue()
237 u32 rd_idx, wr_idx, type, qsize; in venus_read_queue() local
251 wr_idx = qhdr->write_idx; in venus_read_queue()
267 if (rd_idx == wr_idx) { in venus_read_queue()
306 wr_idx = qhdr->write_idx; in venus_read_queue()
[all …]
/linux/drivers/media/radio/wl128x/
A Dfmdrv_common.c794 memcpy(&rds->buff[rds->wr_idx], &tmpbuf, FM_RDS_BLK_SIZE); in fm_irq_handle_rdsdata_getcmd_resp()
795 rds->wr_idx = (rds->wr_idx + FM_RDS_BLK_SIZE) % rds->buf_size; in fm_irq_handle_rdsdata_getcmd_resp()
798 if (rds->wr_idx == rds->rd_idx) { in fm_irq_handle_rdsdata_getcmd_resp()
800 rds->wr_idx = 0; in fm_irq_handle_rdsdata_getcmd_resp()
810 if (rds->wr_idx != rds->rd_idx) in fm_irq_handle_rdsdata_getcmd_resp()
1053 if (fmdev->rx.rds.rd_idx != fmdev->rx.rds.wr_idx) in fmc_is_rds_data_available()
1068 if (fmdev->rx.rds.wr_idx == fmdev->rx.rds.rd_idx) { in fmc_transfer_rds_from_internal_buff()
1073 (fmdev->rx.rds.wr_idx != fmdev->rx.rds.rd_idx)); in fmc_transfer_rds_from_internal_buff()
1086 if (fmdev->rx.rds.wr_idx == fmdev->rx.rds.rd_idx) { in fmc_transfer_rds_from_internal_buff()
A Dfmdrv.h117 u32 wr_idx; member
A Dfmdrv_rx.c19 fmdev->rx.rds.wr_idx = 0; in fm_rx_reset_rds_cache()
722 fmdev->rx.rds.wr_idx = 0; in fm_rx_set_rds_mode()
/linux/drivers/net/ethernet/marvell/prestera/
A Dprestera_pci.c99 u32 wr_idx; member
177 #define PRESTERA_EVTQ_WR_IDX_REG(q) PRESTERA_EVTQ_REG_OFFSET(q, wr_idx)
238 u32 wr_idx = prestera_fw_read(fw, PRESTERA_EVTQ_WR_IDX_REG(qid)); in prestera_fw_evtq_avail() local
241 return CIRC_CNT(wr_idx, rd_idx, prestera_fw_evtq_len(fw, qid)); in prestera_fw_evtq_avail()
538 u32 wr_idx = fw->ldr_wr_idx; in prestera_ldr_wait_buf() local
542 CIRC_SPACE(wr_idx, rd_idx, buf_len) >= len, in prestera_ldr_wait_buf()
/linux/drivers/media/pci/ivtv/
A Divtv-fileops.c163 u32 wr_idx = (read_enc(itv->pgm_info_offset) - itv->pgm_info_offset - 4) / 24; in ivtv_update_pgm_info() local
167 if (wr_idx >= itv->pgm_info_num) { in ivtv_update_pgm_info()
168 IVTV_DEBUG_WARN("Invalid PGM index %d (>= %d)\n", wr_idx, itv->pgm_info_num); in ivtv_update_pgm_info()
171 cnt = (wr_idx + itv->pgm_info_num - itv->pgm_info_write_idx) % itv->pgm_info_num; in ivtv_update_pgm_info()

Completed in 41 milliseconds