/linux-6.3-rc2/drivers/misc/mei/ |
A D | dma-ring.c | 216 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-6.3-rc2/drivers/scsi/fnic/ |
A D | fnic_trace.c | 58 fnic_trace_entries.wr_idx++; in fnic_trace_get_buf() 96 int wr_idx; in fnic_get_trace_data() local 105 wr_idx = fnic_trace_entries.wr_idx; in fnic_get_trace_data() 106 if (wr_idx < rd_idx) { in fnic_get_trace_data() 145 if (rd_idx == wr_idx) in fnic_get_trace_data() 148 } else if (wr_idx > rd_idx) { in fnic_get_trace_data() 181 if (rd_idx == wr_idx) in fnic_get_trace_data() 658 fc_trace_entries.wr_idx++; in fnic_fc_trace_set_data() 716 int rd_idx, wr_idx; in fnic_fc_trace_get_data() local 729 wr_idx = fc_trace_entries.wr_idx; in fnic_fc_trace_get_data() [all …]
|
A D | fnic_trace.h | 35 int wr_idx; member
|
/linux-6.3-rc2/drivers/scsi/snic/ |
A D | snic_trc.c | 23 td = &trc->buf[trc->wr_idx]; in snic_get_trc_buf() 24 trc->wr_idx++; in snic_get_trc_buf() 26 if (trc->wr_idx == trc->max_idx) in snic_get_trc_buf() 27 trc->wr_idx = 0; in snic_get_trc_buf() 29 if (trc->wr_idx != trc->rd_idx) { in snic_get_trc_buf() 82 if (trc->rd_idx == trc->wr_idx) { in snic_get_trc_data() 130 trc->rd_idx = trc->wr_idx = 0; in snic_trc_init()
|
A D | snic_trc.h | 33 u32 wr_idx; member
|
/linux-6.3-rc2/drivers/net/ethernet/netronome/nfp/nfd3/ |
A D | dp.c | 315 txd = &tx_ring->txds[wr_idx]; in nfp_nfd3_tx() 352 wr_idx = D_IDX(tx_ring, wr_idx + 1); in nfp_nfd3_tx() 357 txd = &tx_ring->txds[wr_idx]; in nfp_nfd3_tx() 392 wr_idx = wr_idx - 1; in nfp_nfd3_tx() 393 if (wr_idx < 0) in nfp_nfd3_tx() 394 wr_idx += tx_ring->cnt; in nfp_nfd3_tx() 588 unsigned int wr_idx; in nfp_nfd3_rx_give_one() local 841 int wr_idx; in nfp_nfd3_tx_xdp_buf() local 877 txd = &tx_ring->txds[wr_idx]; in nfp_nfd3_tx_xdp_buf() 1213 int wr_idx; in nfp_nfd3_ctrl_tx_one() local [all …]
|
A D | xsk.c | 24 unsigned int wr_idx; in nfp_nfd3_xsk_tx_xdp() local 32 wr_idx = D_IDX(tx_ring, tx_ring->wr_p); in nfp_nfd3_xsk_tx_xdp() 34 txbuf = &tx_ring->txbufs[wr_idx]; in nfp_nfd3_xsk_tx_xdp() 40 txd = &tx_ring->txds[wr_idx]; in nfp_nfd3_xsk_tx_xdp() 339 u32 pkts = 0, wr_idx; in nfp_nfd3_xsk_tx() local 352 wr_idx = D_IDX(tx_ring, tx_ring->wr_p + i); in nfp_nfd3_xsk_tx() 353 prefetchw(&tx_ring->txds[wr_idx]); in nfp_nfd3_xsk_tx() 360 wr_idx = D_IDX(tx_ring, tx_ring->wr_p + i); in nfp_nfd3_xsk_tx() 362 tx_ring->txbufs[wr_idx].real_len = desc[i].len; in nfp_nfd3_xsk_tx() 363 tx_ring->txbufs[wr_idx].is_xsk_tx = false; in nfp_nfd3_xsk_tx() [all …]
|
/linux-6.3-rc2/drivers/net/ethernet/netronome/nfp/nfdk/ |
A D | dp.c | 123 unsigned int wr_idx; in nfp_nfdk_tx_maybe_close_block() local 161 wr_idx = D_IDX(tx_ring, wr_p); in nfp_nfdk_tx_maybe_close_block() 163 txd = &tx_ring->ktxds[wr_idx]; in nfp_nfdk_tx_maybe_close_block() 263 int nr_frags, wr_idx; in nfp_nfdk_tx() local 299 txd = &tx_ring->ktxds[wr_idx]; in nfp_nfdk_tx() 608 unsigned int wr_idx; in nfp_nfdk_rx_give_one() local 907 int wr_idx; in nfp_nfdk_tx_xdp_buf() local 939 txd = &tx_ring->ktxds[wr_idx]; in nfp_nfdk_tx_xdp_buf() 960 txd = &tx_ring->ktxds[wr_idx]; in nfp_nfdk_tx_xdp_buf() 1325 int wr_idx; in nfp_nfdk_ctrl_tx_one() local [all …]
|
/linux-6.3-rc2/drivers/net/ethernet/netronome/nfp/ |
A D | nfp_net_xsk.c | 61 unsigned int wr_idx, wr_ptr_add = 0; in nfp_net_xsk_rx_ring_fill_freelist() local 65 wr_idx = D_IDX(rx_ring, rx_ring->wr_p); in nfp_net_xsk_rx_ring_fill_freelist() 71 nfp_net_xsk_rx_bufs_stash(rx_ring, wr_idx, xdp); in nfp_net_xsk_rx_ring_fill_freelist() 77 nfp_desc_set_dma_addr_48b(&rx_ring->rxds[wr_idx].fld, in nfp_net_xsk_rx_ring_fill_freelist() 78 rx_ring->xsk_rxbufs[wr_idx].dma_addr); in nfp_net_xsk_rx_ring_fill_freelist()
|
A D | nfp_net_dp.c | 97 unsigned int wr_idx, last_idx; in nfp_net_rx_ring_reset() local 106 wr_idx = D_IDX(rx_ring, rx_ring->wr_p); in nfp_net_rx_ring_reset() 109 rx_ring->xsk_rxbufs[wr_idx] = rx_ring->xsk_rxbufs[last_idx]; in nfp_net_rx_ring_reset() 113 rx_ring->rxbufs[wr_idx] = rx_ring->rxbufs[last_idx]; in nfp_net_rx_ring_reset()
|
/linux-6.3-rc2/drivers/misc/bcm-vk/ |
A D | bcm_vk_msg.c | 90 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() 785 u32 rd_idx, wr_idx; in bcm_to_h_msg_dequeue() local 808 wr_idx = readl_relaxed(&msgq->wr_idx); in bcm_to_h_msg_dequeue() 867 wr_idx, in bcm_to_h_msg_dequeue() [all …]
|
A D | bcm_vk_msg.h | 19 u32 wr_idx; /* write idx */ member
|
A D | bcm_vk_dev.c | 254 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 D | bcm_vk.h | 311 u32 wr_idx; member
|
/linux-6.3-rc2/drivers/net/ethernet/cavium/liquidio/ |
A D | octeon_console.c | 737 u32 wr_idx, in octeon_console_free_bytes() argument 740 if (rd_idx >= buffer_size || wr_idx >= buffer_size) in octeon_console_free_bytes() 743 return ((buffer_size - 1) - (wr_idx - rd_idx)) % buffer_size; in octeon_console_free_bytes() 747 u32 wr_idx, in octeon_console_avail_bytes() argument 750 if (rd_idx >= buffer_size || wr_idx >= buffer_size) in octeon_console_avail_bytes() 754 octeon_console_free_bytes(buffer_size, wr_idx, rd_idx); in octeon_console_avail_bytes() 761 u32 rd_idx, wr_idx; in octeon_console_read() local 777 wr_idx = octeon_read_device_mem32(oct, console->addr + in octeon_console_read() 781 wr_idx, rd_idx); in octeon_console_read()
|
/linux-6.3-rc2/drivers/media/platform/qcom/venus/ |
A D | hfi_venus.c | 169 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-6.3-rc2/drivers/media/radio/wl128x/ |
A D | fmdrv_common.c | 795 memcpy(&rds->buff[rds->wr_idx], &tmpbuf, FM_RDS_BLK_SIZE); in fm_irq_handle_rdsdata_getcmd_resp() 796 rds->wr_idx = (rds->wr_idx + FM_RDS_BLK_SIZE) % rds->buf_size; in fm_irq_handle_rdsdata_getcmd_resp() 799 if (rds->wr_idx == rds->rd_idx) { in fm_irq_handle_rdsdata_getcmd_resp() 801 rds->wr_idx = 0; in fm_irq_handle_rdsdata_getcmd_resp() 811 if (rds->wr_idx != rds->rd_idx) in fm_irq_handle_rdsdata_getcmd_resp() 1054 if (fmdev->rx.rds.rd_idx != fmdev->rx.rds.wr_idx) in fmc_is_rds_data_available() 1069 if (fmdev->rx.rds.wr_idx == fmdev->rx.rds.rd_idx) { in fmc_transfer_rds_from_internal_buff() 1074 (fmdev->rx.rds.wr_idx != fmdev->rx.rds.rd_idx)); in fmc_transfer_rds_from_internal_buff() 1087 if (fmdev->rx.rds.wr_idx == fmdev->rx.rds.rd_idx) { in fmc_transfer_rds_from_internal_buff()
|
A D | fmdrv.h | 117 u32 wr_idx; member
|
A D | fmdrv_rx.c | 19 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-6.3-rc2/drivers/net/ethernet/marvell/prestera/ |
A D | prestera_pci.c | 100 u32 wr_idx; member 178 #define PRESTERA_EVTQ_WR_IDX_REG(q) PRESTERA_EVTQ_REG_OFFSET(q, wr_idx) 249 u32 wr_idx = prestera_fw_read(fw, PRESTERA_EVTQ_WR_IDX_REG(qid)); in prestera_fw_evtq_avail() local 252 return CIRC_CNT(wr_idx, rd_idx, prestera_fw_evtq_len(fw, qid)); in prestera_fw_evtq_avail() 549 u32 wr_idx = fw->ldr_wr_idx; in prestera_ldr_wait_buf() local 553 CIRC_SPACE(wr_idx, rd_idx, buf_len) >= len, in prestera_ldr_wait_buf()
|
/linux-6.3-rc2/drivers/net/wwan/t7xx/ |
A D | t7xx_hif_dpmaif.c | 43 unsigned int wr_idx, enum dpmaif_rdwr rd_wr) in t7xx_ring_buf_rd_wr_count() argument 48 pkt_cnt = wr_idx - rd_idx; in t7xx_ring_buf_rd_wr_count() 50 pkt_cnt = rd_idx - wr_idx - 1; in t7xx_ring_buf_rd_wr_count()
|
A D | t7xx_hif_dpmaif.h | 200 unsigned int wr_idx, enum dpmaif_rdwr);
|
A D | t7xx_dpmaif.c | 1189 unsigned int wr_idx, rd_idx; in t7xx_dpmaif_hw_stop_all_rxq() local 1204 wr_idx = ioread32(hw_info->pcie_base + DPMAIF_AO_DL_PIT_WR_IDX); in t7xx_dpmaif_hw_stop_all_rxq() 1205 wr_idx &= DPMAIF_DL_RD_WR_IDX_MSK; in t7xx_dpmaif_hw_stop_all_rxq() 1209 if (wr_idx == rd_idx) in t7xx_dpmaif_hw_stop_all_rxq()
|
/linux-6.3-rc2/drivers/media/pci/ivtv/ |
A D | ivtv-fileops.c | 163 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()
|