Lines Matching refs:oct
79 static int octep_oq_refill(struct octep_device *oct, struct octep_oq *oq) in octep_oq_refill() argument
123 static int octep_setup_oq(struct octep_device *oct, int q_no) in octep_setup_oq() argument
131 oct->oq[q_no] = oq; in octep_setup_oq()
133 oq->octep_dev = oct; in octep_setup_oq()
134 oq->netdev = oct->netdev; in octep_setup_oq()
135 oq->dev = &oct->pdev->dev; in octep_setup_oq()
137 oq->max_count = CFG_GET_OQ_NUM_DESC(oct->conf); in octep_setup_oq()
139 oq->buffer_size = CFG_GET_OQ_BUF_SIZE(oct->conf); in octep_setup_oq()
146 if (oct->caps_enabled) in octep_setup_oq()
149 oq->refill_threshold = CFG_GET_OQ_REFILL_THRESHOLD(oct->conf); in octep_setup_oq()
163 dev_err(&oct->pdev->dev, in octep_setup_oq()
172 oct->hw_ops.setup_oq_regs(oct, q_no); in octep_setup_oq()
173 oct->num_oqs++; in octep_setup_oq()
186 oct->oq[q_no] = NULL; in octep_setup_oq()
227 struct octep_device *oct = oq->octep_dev; in octep_free_oq() local
240 oct->oq[q_no] = NULL; in octep_free_oq()
241 oct->num_oqs--; in octep_free_oq()
250 int octep_setup_oqs(struct octep_device *oct) in octep_setup_oqs() argument
254 oct->num_oqs = 0; in octep_setup_oqs()
255 for (i = 0; i < CFG_GET_PORTS_ACTIVE_IO_RINGS(oct->conf); i++) { in octep_setup_oqs()
256 retval = octep_setup_oq(oct, i); in octep_setup_oqs()
258 dev_err(&oct->pdev->dev, in octep_setup_oqs()
262 dev_dbg(&oct->pdev->dev, "Successfully setup OQ(RxQ)-%d.\n", i); in octep_setup_oqs()
270 octep_free_oq(oct->oq[i]); in octep_setup_oqs()
282 void octep_oq_dbell_init(struct octep_device *oct) in octep_oq_dbell_init() argument
286 for (i = 0; i < oct->num_oqs; i++) in octep_oq_dbell_init()
287 writel(oct->oq[i]->max_count, oct->oq[i]->pkts_credit_reg); in octep_oq_dbell_init()
295 void octep_free_oqs(struct octep_device *oct) in octep_free_oqs() argument
299 for (i = 0; i < CFG_GET_PORTS_ACTIVE_IO_RINGS(oct->conf); i++) { in octep_free_oqs()
300 if (!oct->oq[i]) in octep_free_oqs()
302 octep_free_oq(oct->oq[i]); in octep_free_oqs()
303 dev_dbg(&oct->pdev->dev, in octep_free_oqs()
316 static int octep_oq_check_hw_for_pkts(struct octep_device *oct, in octep_oq_check_hw_for_pkts() argument
352 static int __octep_oq_process_rx(struct octep_device *oct, in __octep_oq_process_rx() argument
375 if (oct->caps_enabled & OCTEP_CAP_RX_CHECKSUM) { in __octep_oq_process_rx()
477 struct octep_device *oct = oq->octep_dev; in octep_oq_process_rx() local
485 octep_oq_check_hw_for_pkts(oct, oq); in octep_oq_process_rx()
491 pkts_processed = __octep_oq_process_rx(oct, oq, in octep_oq_process_rx()
498 u32 desc_refilled = octep_oq_refill(oct, oq); in octep_oq_process_rx()