Lines Matching refs:cpr
783 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_reuse_rx_agg_bufs() local
797 &cpr->cp_desc_ring[CP_RING(cp_cons)][CP_IDX(cp_cons)]; in bnxt_reuse_rx_agg_bufs()
911 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_rx_pages() local
924 &cpr->cp_desc_ring[CP_RING(cp_cons)][CP_IDX(cp_cons)]; in bnxt_rx_pages()
977 static int bnxt_agg_bufs_valid(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, in bnxt_agg_bufs_valid() argument
986 &cpr->cp_desc_ring[CP_RING(last)][CP_IDX(last)]; in bnxt_agg_bufs_valid()
1018 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_discard_rx() local
1038 if (!bnxt_agg_bufs_valid(bp, cpr, agg_bufs, &tmp_raw_cons)) in bnxt_discard_rx()
1348 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_tpa_end() local
1378 if (!bnxt_agg_bufs_valid(bp, cpr, agg_bufs, raw_cons)) in bnxt_tpa_end()
1485 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_rx_pkt() local
1502 &cpr->cp_desc_ring[CP_RING(cp_cons)][CP_IDX(cp_cons)]; in bnxt_rx_pkt()
1507 &cpr->cp_desc_ring[CP_RING(cp_cons)][CP_IDX(cp_cons)]; in bnxt_rx_pkt()
1556 if (!bnxt_agg_bufs_valid(bp, cpr, agg_bufs, &tmp_raw_cons)) in bnxt_rx_pkt()
1644 cpr->rx_l4_csum_errors++; in bnxt_rx_pkt()
1655 cpr->rx_packets += 1; in bnxt_rx_pkt()
1656 cpr->rx_bytes += len; in bnxt_rx_pkt()
1670 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_force_rx_discard() local
1679 &cpr->cp_desc_ring[CP_RING(cp_cons)][CP_IDX(cp_cons)]; in bnxt_force_rx_discard()
1684 &cpr->cp_desc_ring[CP_RING(cp_cons)][CP_IDX(cp_cons)]; in bnxt_force_rx_discard()
1813 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_msix() local
1814 u32 cons = RING_CMP(cpr->cp_raw_cons); in bnxt_msix()
1816 cpr->event_ctr++; in bnxt_msix()
1817 prefetch(&cpr->cp_desc_ring[CP_RING(cons)][CP_IDX(cons)]); in bnxt_msix()
1822 static inline int bnxt_has_work(struct bnxt *bp, struct bnxt_cp_ring_info *cpr) in bnxt_has_work() argument
1824 u32 raw_cons = cpr->cp_raw_cons; in bnxt_has_work()
1828 txcmp = &cpr->cp_desc_ring[CP_RING(cons)][CP_IDX(cons)]; in bnxt_has_work()
1837 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_inta() local
1838 u32 cons = RING_CMP(cpr->cp_raw_cons); in bnxt_inta()
1841 prefetch(&cpr->cp_desc_ring[CP_RING(cons)][CP_IDX(cons)]); in bnxt_inta()
1843 if (!bnxt_has_work(bp, cpr)) { in bnxt_inta()
1846 if (!(int_status & (0x10000 << cpr->cp_ring_struct.fw_ring_id))) in bnxt_inta()
1851 BNXT_CP_DB_IRQ_DIS(cpr->cp_doorbell); in bnxt_inta()
1863 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_poll_work() local
1864 u32 raw_cons = cpr->cp_raw_cons; in bnxt_poll_work()
1875 txcmp = &cpr->cp_desc_ring[CP_RING(cons)][CP_IDX(cons)]; in bnxt_poll_work()
1934 cpr->cp_raw_cons = raw_cons; in bnxt_poll_work()
1939 BNXT_CP_DB(cpr->cp_doorbell, cpr->cp_raw_cons); in bnxt_poll_work()
1959 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_poll_nitroa0() local
1964 u32 raw_cons = cpr->cp_raw_cons; in bnxt_poll_nitroa0()
1972 txcmp = &cpr->cp_desc_ring[CP_RING(cp_cons)][CP_IDX(cp_cons)]; in bnxt_poll_nitroa0()
1981 &cpr->cp_desc_ring[CP_RING(cp_cons)][CP_IDX(cp_cons)]; in bnxt_poll_nitroa0()
2008 cpr->cp_raw_cons = raw_cons; in bnxt_poll_nitroa0()
2009 BNXT_CP_DB(cpr->cp_doorbell, cpr->cp_raw_cons); in bnxt_poll_nitroa0()
2016 if (!bnxt_has_work(bp, cpr) && rx_pkts < budget) { in bnxt_poll_nitroa0()
2018 BNXT_CP_DB_REARM(cpr->cp_doorbell, cpr->cp_raw_cons); in bnxt_poll_nitroa0()
2027 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_poll() local
2035 BNXT_CP_DB_REARM(cpr->cp_doorbell, in bnxt_poll()
2036 cpr->cp_raw_cons); in bnxt_poll()
2040 if (!bnxt_has_work(bp, cpr)) { in bnxt_poll()
2042 BNXT_CP_DB_REARM(cpr->cp_doorbell, in bnxt_poll()
2043 cpr->cp_raw_cons); in bnxt_poll()
2050 net_dim_sample(cpr->event_ctr, in bnxt_poll()
2051 cpr->rx_packets, in bnxt_poll()
2052 cpr->rx_bytes, in bnxt_poll()
2054 net_dim(&cpr->dim, dim_sample); in bnxt_poll()
2444 struct bnxt_cp_ring_info *cpr; in bnxt_free_cp_rings() local
2450 cpr = &bnapi->cp_ring; in bnxt_free_cp_rings()
2451 ring = &cpr->cp_ring_struct; in bnxt_free_cp_rings()
2465 struct bnxt_cp_ring_info *cpr; in bnxt_alloc_cp_rings() local
2471 cpr = &bnapi->cp_ring; in bnxt_alloc_cp_rings()
2472 ring = &cpr->cp_ring_struct; in bnxt_alloc_cp_rings()
2492 struct bnxt_cp_ring_info *cpr; in bnxt_init_ring_struct() local
2500 cpr = &bnapi->cp_ring; in bnxt_init_ring_struct()
2501 ring = &cpr->cp_ring_struct; in bnxt_init_ring_struct()
2504 ring->pg_arr = (void **)cpr->cp_desc_ring; in bnxt_init_ring_struct()
2505 ring->dma_arr = cpr->cp_desc_mapping; in bnxt_init_ring_struct()
2655 struct bnxt_cp_ring_info *cpr = &bp->bnapi[i]->cp_ring; in bnxt_init_cp_rings() local
2656 struct bnxt_ring_struct *ring = &cpr->cp_ring_struct; in bnxt_init_cp_rings()
2659 cpr->rx_ring_coal.coal_ticks = bp->rx_coal.coal_ticks; in bnxt_init_cp_rings()
2660 cpr->rx_ring_coal.coal_bufs = bp->rx_coal.coal_bufs; in bnxt_init_cp_rings()
3095 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_free_stats() local
3097 if (cpr->hw_stats) { in bnxt_free_stats()
3098 dma_free_coherent(&pdev->dev, size, cpr->hw_stats, in bnxt_free_stats()
3099 cpr->hw_stats_map); in bnxt_free_stats()
3100 cpr->hw_stats = NULL; in bnxt_free_stats()
3114 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_alloc_stats() local
3116 cpr->hw_stats = dma_alloc_coherent(&pdev->dev, size, in bnxt_alloc_stats()
3117 &cpr->hw_stats_map, in bnxt_alloc_stats()
3119 if (!cpr->hw_stats) in bnxt_alloc_stats()
3122 cpr->hw_stats_ctx_id = INVALID_STATS_CTX_ID; in bnxt_alloc_stats()
3169 struct bnxt_cp_ring_info *cpr; in bnxt_clear_ring_indices() local
3176 cpr = &bnapi->cp_ring; in bnxt_clear_ring_indices()
3177 cpr->cp_raw_cons = 0; in bnxt_clear_ring_indices()
3385 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_disable_int() local
3386 struct bnxt_ring_struct *ring = &cpr->cp_ring_struct; in bnxt_disable_int()
3389 BNXT_CP_DB(cpr->cp_doorbell, cpr->cp_raw_cons); in bnxt_disable_int()
3396 struct bnxt_cp_ring_info *cpr; in bnxt_cp_num_to_irq_num() local
3398 cpr = &bnapi->cp_ring; in bnxt_cp_num_to_irq_num()
3399 return cpr->cp_ring_struct.map_idx; in bnxt_cp_num_to_irq_num()
3423 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_enable_int() local
3425 BNXT_CP_DB_REARM(cpr->cp_doorbell, cpr->cp_raw_cons); in bnxt_enable_int()
4410 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_hwrm_ring_alloc() local
4411 struct bnxt_ring_struct *ring = &cpr->cp_ring_struct; in bnxt_hwrm_ring_alloc()
4414 cpr->cp_doorbell = bp->bar1 + map_idx * 0x80; in bnxt_hwrm_ring_alloc()
4419 BNXT_CP_DB(cpr->cp_doorbell, cpr->cp_raw_cons); in bnxt_hwrm_ring_alloc()
4569 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_hwrm_ring_free() local
4570 struct bnxt_ring_struct *ring = &cpr->cp_ring_struct; in bnxt_hwrm_ring_free()
4963 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_hwrm_set_ring_coal() local
4972 coal.coal_ticks = cpr->rx_ring_coal.coal_ticks; in bnxt_hwrm_set_ring_coal()
4973 coal.coal_bufs = cpr->rx_ring_coal.coal_bufs; in bnxt_hwrm_set_ring_coal()
5038 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_hwrm_stat_ctx_free() local
5040 if (cpr->hw_stats_ctx_id != INVALID_STATS_CTX_ID) { in bnxt_hwrm_stat_ctx_free()
5041 req.stat_ctx_id = cpu_to_le32(cpr->hw_stats_ctx_id); in bnxt_hwrm_stat_ctx_free()
5048 cpr->hw_stats_ctx_id = INVALID_STATS_CTX_ID; in bnxt_hwrm_stat_ctx_free()
5071 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_hwrm_stat_ctx_alloc() local
5073 req.stats_dma_addr = cpu_to_le64(cpr->hw_stats_map); in bnxt_hwrm_stat_ctx_alloc()
5080 cpr->hw_stats_ctx_id = le32_to_cpu(resp->stat_ctx_id); in bnxt_hwrm_stat_ctx_alloc()
5082 bp->grp_info[i].fw_stats_ctx = cpr->hw_stats_ctx_id; in bnxt_hwrm_stat_ctx_alloc()
6243 struct bnxt_cp_ring_info *cpr = &bp->bnapi[i]->cp_ring; in bnxt_disable_napi() local
6246 cancel_work_sync(&cpr->dim.work); in bnxt_disable_napi()
6257 struct bnxt_cp_ring_info *cpr = &bp->bnapi[i]->cp_ring; in bnxt_enable_napi() local
6261 INIT_WORK(&cpr->dim.work, bnxt_dim_work); in bnxt_enable_napi()
6262 cpr->dim.mode = NET_DIM_CQ_PERIOD_MODE_START_FROM_EQE; in bnxt_enable_napi()
7234 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_get_stats64() local
7235 struct ctx_hw_stats *hw_stats = cpr->hw_stats; in bnxt_get_stats64()
7636 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_dump_cp_sw_state() local
7640 i, cpr->cp_ring_struct.fw_ring_id, cpr->cp_raw_cons); in bnxt_dump_cp_sw_state()