Lines Matching refs:eqo

1658 	struct be_eq_obj *eqo;  in be_eqd_update()  local
1665 for_all_evt_queues(adapter, eqo, i) { in be_eqd_update()
1666 aic = &adapter->aic_obj[eqo->idx]; in be_eqd_update()
1674 rxo = &adapter->rx_obj[eqo->idx]; in be_eqd_update()
1680 txo = &adapter->tx_obj[eqo->idx]; in be_eqd_update()
1709 set_eqd[num].eq_id = eqo->q.id; in be_eqd_update()
2191 static inline int events_get(struct be_eq_obj *eqo) in events_get() argument
2197 eqe = queue_tail_node(&eqo->q); in events_get()
2204 queue_tail_inc(&eqo->q); in events_get()
2211 static void be_eq_clean(struct be_eq_obj *eqo) in be_eq_clean() argument
2213 int num = events_get(eqo); in be_eq_clean()
2215 be_eq_notify(eqo->adapter, eqo->q.id, false, true, num); in be_eq_clean()
2335 struct be_eq_obj *eqo; in be_evt_queues_destroy() local
2338 for_all_evt_queues(adapter, eqo, i) { in be_evt_queues_destroy()
2339 if (eqo->q.created) { in be_evt_queues_destroy()
2340 be_eq_clean(eqo); in be_evt_queues_destroy()
2341 be_cmd_q_destroy(adapter, &eqo->q, QTYPE_EQ); in be_evt_queues_destroy()
2342 napi_hash_del(&eqo->napi); in be_evt_queues_destroy()
2343 netif_napi_del(&eqo->napi); in be_evt_queues_destroy()
2345 free_cpumask_var(eqo->affinity_mask); in be_evt_queues_destroy()
2346 be_queue_free(adapter, &eqo->q); in be_evt_queues_destroy()
2353 struct be_eq_obj *eqo; in be_evt_queues_create() local
2360 for_all_evt_queues(adapter, eqo, i) { in be_evt_queues_create()
2362 if (!zalloc_cpumask_var(&eqo->affinity_mask, GFP_KERNEL)) in be_evt_queues_create()
2365 eqo->affinity_mask); in be_evt_queues_create()
2366 netif_napi_add(adapter->netdev, &eqo->napi, be_poll, in be_evt_queues_create()
2368 napi_hash_add(&eqo->napi); in be_evt_queues_create()
2370 eqo->adapter = adapter; in be_evt_queues_create()
2371 eqo->idx = i; in be_evt_queues_create()
2375 eq = &eqo->q; in be_evt_queues_create()
2381 rc = be_cmd_eq_create(adapter, eqo); in be_evt_queues_create()
2459 struct be_eq_obj *eqo; in be_tx_qs_create() local
2477 eqo = &adapter->eq_obj[i % adapter->num_evt_qs]; in be_tx_qs_create()
2478 status = be_cmd_cq_create(adapter, cq, &eqo->q, false, 3); in be_tx_qs_create()
2491 netif_set_xps_queue(adapter->netdev, eqo->affinity_mask, in be_tx_qs_create()
2492 eqo->idx); in be_tx_qs_create()
2558 struct be_eq_obj *eqo = dev; in be_intx() local
2559 struct be_adapter *adapter = eqo->adapter; in be_intx()
2570 if (napi_schedule_prep(&eqo->napi)) { in be_intx()
2571 num_evts = events_get(eqo); in be_intx()
2572 __napi_schedule(&eqo->napi); in be_intx()
2574 eqo->spurious_intr = 0; in be_intx()
2576 be_eq_notify(adapter, eqo->q.id, false, true, num_evts); in be_intx()
2582 if (num_evts || eqo->spurious_intr++ == 0) in be_intx()
2590 struct be_eq_obj *eqo = dev; in be_msix() local
2592 be_eq_notify(eqo->adapter, eqo->q.id, false, true, 0); in be_msix()
2593 napi_schedule(&eqo->napi); in be_msix()
2735 static inline bool be_lock_napi(struct be_eq_obj *eqo) in be_lock_napi() argument
2739 spin_lock(&eqo->lock); /* BH is already disabled */ in be_lock_napi()
2740 if (eqo->state & BE_EQ_LOCKED) { in be_lock_napi()
2741 WARN_ON(eqo->state & BE_EQ_NAPI); in be_lock_napi()
2742 eqo->state |= BE_EQ_NAPI_YIELD; in be_lock_napi()
2745 eqo->state = BE_EQ_NAPI; in be_lock_napi()
2747 spin_unlock(&eqo->lock); in be_lock_napi()
2751 static inline void be_unlock_napi(struct be_eq_obj *eqo) in be_unlock_napi() argument
2753 spin_lock(&eqo->lock); /* BH is already disabled */ in be_unlock_napi()
2755 WARN_ON(eqo->state & (BE_EQ_POLL | BE_EQ_NAPI_YIELD)); in be_unlock_napi()
2756 eqo->state = BE_EQ_IDLE; in be_unlock_napi()
2758 spin_unlock(&eqo->lock); in be_unlock_napi()
2761 static inline bool be_lock_busy_poll(struct be_eq_obj *eqo) in be_lock_busy_poll() argument
2765 spin_lock_bh(&eqo->lock); in be_lock_busy_poll()
2766 if (eqo->state & BE_EQ_LOCKED) { in be_lock_busy_poll()
2767 eqo->state |= BE_EQ_POLL_YIELD; in be_lock_busy_poll()
2770 eqo->state |= BE_EQ_POLL; in be_lock_busy_poll()
2772 spin_unlock_bh(&eqo->lock); in be_lock_busy_poll()
2776 static inline void be_unlock_busy_poll(struct be_eq_obj *eqo) in be_unlock_busy_poll() argument
2778 spin_lock_bh(&eqo->lock); in be_unlock_busy_poll()
2780 WARN_ON(eqo->state & (BE_EQ_NAPI)); in be_unlock_busy_poll()
2781 eqo->state = BE_EQ_IDLE; in be_unlock_busy_poll()
2783 spin_unlock_bh(&eqo->lock); in be_unlock_busy_poll()
2786 static inline void be_enable_busy_poll(struct be_eq_obj *eqo) in be_enable_busy_poll() argument
2788 spin_lock_init(&eqo->lock); in be_enable_busy_poll()
2789 eqo->state = BE_EQ_IDLE; in be_enable_busy_poll()
2792 static inline void be_disable_busy_poll(struct be_eq_obj *eqo) in be_disable_busy_poll() argument
2799 while (!be_lock_napi(eqo)) in be_disable_busy_poll()
2807 static inline bool be_lock_napi(struct be_eq_obj *eqo) in be_lock_napi() argument
2812 static inline void be_unlock_napi(struct be_eq_obj *eqo) in be_unlock_napi() argument
2816 static inline bool be_lock_busy_poll(struct be_eq_obj *eqo) in be_lock_busy_poll() argument
2821 static inline void be_unlock_busy_poll(struct be_eq_obj *eqo) in be_unlock_busy_poll() argument
2825 static inline void be_enable_busy_poll(struct be_eq_obj *eqo) in be_enable_busy_poll() argument
2829 static inline void be_disable_busy_poll(struct be_eq_obj *eqo) in be_disable_busy_poll() argument
2836 struct be_eq_obj *eqo = container_of(napi, struct be_eq_obj, napi); in be_poll() local
2837 struct be_adapter *adapter = eqo->adapter; in be_poll()
2842 num_evts = events_get(eqo); in be_poll()
2844 for_all_tx_queues_on_eq(adapter, eqo, txo, i) in be_poll()
2847 if (be_lock_napi(eqo)) { in be_poll()
2852 for_all_rx_queues_on_eq(adapter, eqo, rxo, i) { in be_poll()
2856 be_unlock_napi(eqo); in be_poll()
2861 if (is_mcc_eqo(eqo)) in be_poll()
2866 be_eq_notify(adapter, eqo->q.id, true, false, num_evts); in be_poll()
2869 be_eq_notify(adapter, eqo->q.id, false, false, num_evts); in be_poll()
2877 struct be_eq_obj *eqo = container_of(napi, struct be_eq_obj, napi); in be_busy_poll() local
2878 struct be_adapter *adapter = eqo->adapter; in be_busy_poll()
2882 if (!be_lock_busy_poll(eqo)) in be_busy_poll()
2885 for_all_rx_queues_on_eq(adapter, eqo, rxo, i) { in be_busy_poll()
2891 be_unlock_busy_poll(eqo); in be_busy_poll()
3024 struct be_eq_obj *eqo) in be_msix_vec_get() argument
3026 return adapter->msix_entries[eqo->msix_idx].vector; in be_msix_vec_get()
3032 struct be_eq_obj *eqo; in be_msix_register() local
3035 for_all_evt_queues(adapter, eqo, i) { in be_msix_register()
3036 sprintf(eqo->desc, "%s-q%d", netdev->name, i); in be_msix_register()
3037 vec = be_msix_vec_get(adapter, eqo); in be_msix_register()
3038 status = request_irq(vec, be_msix, 0, eqo->desc, eqo); in be_msix_register()
3042 irq_set_affinity_hint(vec, eqo->affinity_mask); in be_msix_register()
3047 for (i--, eqo = &adapter->eq_obj[i]; i >= 0; i--, eqo--) in be_msix_register()
3048 free_irq(be_msix_vec_get(adapter, eqo), eqo); in be_msix_register()
3086 struct be_eq_obj *eqo; in be_irq_unregister() local
3099 for_all_evt_queues(adapter, eqo, i) { in be_irq_unregister()
3100 vec = be_msix_vec_get(adapter, eqo); in be_irq_unregister()
3102 free_irq(vec, eqo); in be_irq_unregister()
3128 struct be_eq_obj *eqo; in be_close() local
3140 for_all_evt_queues(adapter, eqo, i) { in be_close()
3141 napi_disable(&eqo->napi); in be_close()
3142 be_disable_busy_poll(eqo); in be_close()
3158 for_all_evt_queues(adapter, eqo, i) { in be_close()
3160 synchronize_irq(be_msix_vec_get(adapter, eqo)); in be_close()
3163 be_eq_clean(eqo); in be_close()
3241 struct be_eq_obj *eqo; in be_open() local
3263 for_all_evt_queues(adapter, eqo, i) { in be_open()
3264 napi_enable(&eqo->napi); in be_open()
3265 be_enable_busy_poll(eqo); in be_open()
3266 be_eq_notify(adapter, eqo->q.id, true, true, 0); in be_open()
4181 struct be_eq_obj *eqo; in be_netpoll() local
4184 for_all_evt_queues(adapter, eqo, i) { in be_netpoll()
4185 be_eq_notify(eqo->adapter, eqo->q.id, false, true, 0); in be_netpoll()
4186 napi_schedule(&eqo->napi); in be_netpoll()