Lines Matching refs:oct
36 struct octep_device *oct = iq->octep_dev; in octep_iq_process_completions() local
46 iq->octep_read_index = oct->hw_ops.update_iq_read_idx(iq); in octep_iq_process_completions()
160 void octep_clean_iqs(struct octep_device *oct) in octep_clean_iqs() argument
164 for (i = 0; i < oct->num_iqs; i++) { in octep_clean_iqs()
165 octep_iq_free_pending(oct->iq[i]); in octep_clean_iqs()
166 octep_iq_reset_indices(oct->iq[i]); in octep_clean_iqs()
178 static int octep_setup_iq(struct octep_device *oct, int q_no) in octep_setup_iq() argument
187 oct->iq[q_no] = iq; in octep_setup_iq()
189 iq->octep_dev = oct; in octep_setup_iq()
190 iq->netdev = oct->netdev; in octep_setup_iq()
191 iq->dev = &oct->pdev->dev; in octep_setup_iq()
193 iq->max_count = CFG_GET_IQ_NUM_DESC(oct->conf); in octep_setup_iq()
195 iq->fill_threshold = CFG_GET_IQ_DB_MIN(oct->conf); in octep_setup_iq()
199 desc_ring_size = OCTEP_IQ_DESC_SIZE * CFG_GET_IQ_NUM_DESC(oct->conf); in octep_setup_iq()
210 CFG_GET_IQ_NUM_DESC(oct->conf); in octep_setup_iq()
230 for (i = 0; i < CFG_GET_IQ_NUM_DESC(oct->conf); i++) { in octep_setup_iq()
241 oct->hw_ops.setup_iq_regs(oct, q_no); in octep_setup_iq()
243 oct->num_iqs++; in octep_setup_iq()
253 oct->iq[q_no] = NULL; in octep_setup_iq()
267 struct octep_device *oct = iq->octep_dev; in octep_free_iq() local
271 desc_ring_size = OCTEP_IQ_DESC_SIZE * CFG_GET_IQ_NUM_DESC(oct->conf); in octep_free_iq()
280 CFG_GET_IQ_NUM_DESC(oct->conf); in octep_free_iq()
286 oct->iq[q_no] = NULL; in octep_free_iq()
287 oct->num_iqs--; in octep_free_iq()
295 int octep_setup_iqs(struct octep_device *oct) in octep_setup_iqs() argument
299 oct->num_iqs = 0; in octep_setup_iqs()
300 for (i = 0; i < CFG_GET_PORTS_ACTIVE_IO_RINGS(oct->conf); i++) { in octep_setup_iqs()
301 if (octep_setup_iq(oct, i)) { in octep_setup_iqs()
302 dev_err(&oct->pdev->dev, in octep_setup_iqs()
306 dev_dbg(&oct->pdev->dev, "Successfully setup IQ(TxQ)-%d.\n", i); in octep_setup_iqs()
314 octep_free_iq(oct->iq[i]); in octep_setup_iqs()
324 void octep_free_iqs(struct octep_device *oct) in octep_free_iqs() argument
328 for (i = 0; i < CFG_GET_PORTS_ACTIVE_IO_RINGS(oct->conf); i++) { in octep_free_iqs()
329 octep_free_iq(oct->iq[i]); in octep_free_iqs()
330 dev_dbg(&oct->pdev->dev, in octep_free_iqs()
333 oct->num_iqs = 0; in octep_free_iqs()