Lines Matching refs:cpr

598 	struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring;  in bnxt_reuse_rx_agg_bufs()  local
612 &cpr->cp_desc_ring[CP_RING(cp_cons)][CP_IDX(cp_cons)]; in bnxt_reuse_rx_agg_bufs()
677 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_rx_pages() local
690 &cpr->cp_desc_ring[CP_RING(cp_cons)][CP_IDX(cp_cons)]; in bnxt_rx_pages()
741 static int bnxt_agg_bufs_valid(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, in bnxt_agg_bufs_valid() argument
750 &cpr->cp_desc_ring[CP_RING(last)][CP_IDX(last)]; in bnxt_agg_bufs_valid()
931 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_tpa_end() local
951 if (!bnxt_agg_bufs_valid(bp, cpr, agg_bufs, raw_cons)) in bnxt_tpa_end()
1047 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_rx_pkt() local
1062 &cpr->cp_desc_ring[CP_RING(cp_cons)][CP_IDX(cp_cons)]; in bnxt_rx_pkt()
1067 &cpr->cp_desc_ring[CP_RING(cp_cons)][CP_IDX(cp_cons)]; in bnxt_rx_pkt()
1113 if (!bnxt_agg_bufs_valid(bp, cpr, agg_bufs, &tmp_raw_cons)) in bnxt_rx_pkt()
1191 cpr->rx_l4_csum_errors++; in bnxt_rx_pkt()
1276 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_msix() local
1277 u32 cons = RING_CMP(cpr->cp_raw_cons); in bnxt_msix()
1279 prefetch(&cpr->cp_desc_ring[CP_RING(cons)][CP_IDX(cons)]); in bnxt_msix()
1284 static inline int bnxt_has_work(struct bnxt *bp, struct bnxt_cp_ring_info *cpr) in bnxt_has_work() argument
1286 u32 raw_cons = cpr->cp_raw_cons; in bnxt_has_work()
1290 txcmp = &cpr->cp_desc_ring[CP_RING(cons)][CP_IDX(cons)]; in bnxt_has_work()
1299 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_inta() local
1300 u32 cons = RING_CMP(cpr->cp_raw_cons); in bnxt_inta()
1303 prefetch(&cpr->cp_desc_ring[CP_RING(cons)][CP_IDX(cons)]); in bnxt_inta()
1305 if (!bnxt_has_work(bp, cpr)) { in bnxt_inta()
1308 if (!(int_status & (0x10000 << cpr->cp_ring_struct.fw_ring_id))) in bnxt_inta()
1313 BNXT_CP_DB_IRQ_DIS(cpr->cp_doorbell); in bnxt_inta()
1325 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_poll_work() local
1326 u32 raw_cons = cpr->cp_raw_cons; in bnxt_poll_work()
1338 txcmp = &cpr->cp_desc_ring[CP_RING(cons)][CP_IDX(cons)]; in bnxt_poll_work()
1369 cpr->cp_raw_cons = raw_cons; in bnxt_poll_work()
1374 BNXT_CP_DB(cpr->cp_doorbell, cpr->cp_raw_cons); in bnxt_poll_work()
1398 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_poll() local
1410 if (!bnxt_has_work(bp, cpr)) { in bnxt_poll()
1412 BNXT_CP_DB_REARM(cpr->cp_doorbell, cpr->cp_raw_cons); in bnxt_poll()
1426 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_busy_poll() local
1437 BNXT_CP_DB_REARM(cpr->cp_doorbell, cpr->cp_raw_cons); in bnxt_busy_poll()
1831 struct bnxt_cp_ring_info *cpr; in bnxt_free_cp_rings() local
1837 cpr = &bnapi->cp_ring; in bnxt_free_cp_rings()
1838 ring = &cpr->cp_ring_struct; in bnxt_free_cp_rings()
1850 struct bnxt_cp_ring_info *cpr; in bnxt_alloc_cp_rings() local
1856 cpr = &bnapi->cp_ring; in bnxt_alloc_cp_rings()
1857 ring = &cpr->cp_ring_struct; in bnxt_alloc_cp_rings()
1872 struct bnxt_cp_ring_info *cpr; in bnxt_init_ring_struct() local
1880 cpr = &bnapi->cp_ring; in bnxt_init_ring_struct()
1881 ring = &cpr->cp_ring_struct; in bnxt_init_ring_struct()
1884 ring->pg_arr = (void **)cpr->cp_desc_ring; in bnxt_init_ring_struct()
1885 ring->dma_arr = cpr->cp_desc_mapping; in bnxt_init_ring_struct()
2375 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_free_stats() local
2377 if (cpr->hw_stats) { in bnxt_free_stats()
2378 dma_free_coherent(&pdev->dev, size, cpr->hw_stats, in bnxt_free_stats()
2379 cpr->hw_stats_map); in bnxt_free_stats()
2380 cpr->hw_stats = NULL; in bnxt_free_stats()
2394 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_alloc_stats() local
2396 cpr->hw_stats = dma_alloc_coherent(&pdev->dev, size, in bnxt_alloc_stats()
2397 &cpr->hw_stats_map, in bnxt_alloc_stats()
2399 if (!cpr->hw_stats) in bnxt_alloc_stats()
2402 cpr->hw_stats_ctx_id = INVALID_STATS_CTX_ID; in bnxt_alloc_stats()
2416 struct bnxt_cp_ring_info *cpr; in bnxt_clear_ring_indices() local
2423 cpr = &bnapi->cp_ring; in bnxt_clear_ring_indices()
2424 cpr->cp_raw_cons = 0; in bnxt_clear_ring_indices()
3299 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_hwrm_ring_alloc() local
3300 struct bnxt_ring_struct *ring = &cpr->cp_ring_struct; in bnxt_hwrm_ring_alloc()
3307 cpr->cp_doorbell = bp->bar1 + i * 0x80; in bnxt_hwrm_ring_alloc()
3308 BNXT_CP_DB(cpr->cp_doorbell, cpr->cp_raw_cons); in bnxt_hwrm_ring_alloc()
3480 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_hwrm_ring_free() local
3481 struct bnxt_ring_struct *ring = &cpr->cp_ring_struct; in bnxt_hwrm_ring_free()
3560 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_hwrm_stat_ctx_free() local
3562 if (cpr->hw_stats_ctx_id != INVALID_STATS_CTX_ID) { in bnxt_hwrm_stat_ctx_free()
3563 req.stat_ctx_id = cpu_to_le32(cpr->hw_stats_ctx_id); in bnxt_hwrm_stat_ctx_free()
3570 cpr->hw_stats_ctx_id = INVALID_STATS_CTX_ID; in bnxt_hwrm_stat_ctx_free()
3590 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_hwrm_stat_ctx_alloc() local
3592 req.stats_dma_addr = cpu_to_le64(cpr->hw_stats_map); in bnxt_hwrm_stat_ctx_alloc()
3599 cpr->hw_stats_ctx_id = le32_to_cpu(resp->stat_ctx_id); in bnxt_hwrm_stat_ctx_alloc()
3601 bp->grp_info[i].fw_stats_ctx = cpr->hw_stats_ctx_id; in bnxt_hwrm_stat_ctx_alloc()
3996 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_disable_int() local
3998 BNXT_CP_DB(cpr->cp_doorbell, cpr->cp_raw_cons); in bnxt_disable_int()
4009 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_enable_int() local
4011 BNXT_CP_DB_REARM(cpr->cp_doorbell, cpr->cp_raw_cons); in bnxt_enable_int()
4752 struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring; in bnxt_get_stats64() local
4753 struct ctx_hw_stats *hw_stats = cpr->hw_stats; in bnxt_get_stats64()
5008 struct bnxt_cp_ring_info *cpr; in bnxt_dbg_dump_states() local
5014 cpr = &bnapi->cp_ring; in bnxt_dbg_dump_states()
5025 i, cpr->cp_ring_struct.fw_ring_id, in bnxt_dbg_dump_states()
5026 cpr->cp_raw_cons); in bnxt_dbg_dump_states()