Lines Matching refs:tx_mod

2771 static void bna_tx_mod_cb_tx_stopped(void *tx_mod, struct bna_tx *tx);
3197 bna_tx_get(struct bna_tx_mod *tx_mod, enum bna_tx_type type)
3201 if (list_empty(&tx_mod->tx_free_q))
3204 tx = list_first_entry(&tx_mod->tx_free_q, struct bna_tx, qe);
3206 tx = list_last_entry(&tx_mod->tx_free_q, struct bna_tx, qe);
3216 struct bna_tx_mod *tx_mod = &tx->bna->tx_mod;
3224 list_move_tail(&txq->qe, &tx_mod->txq_free_q);
3227 list_for_each(qe, &tx_mod->tx_active_q) {
3237 list_for_each_prev(qe, &tx_mod->tx_free_q)
3256 tx->stop_cbarg = &tx->bna->tx_mod;
3307 bna_bfi_bw_update_aen(struct bna_tx_mod *tx_mod)
3311 list_for_each_entry(tx, &tx_mod->tx_active_q, qe)
3369 struct bna_tx_mod *tx_mod = &bna->tx_mod;
3388 tx = bna_tx_get(tx_mod, tx_cfg->tx_type);
3398 if (list_empty(&tx_mod->txq_free_q))
3401 txq = list_first_entry(&tx_mod->txq_free_q, struct bna_txq, qe);
3419 list_add_tail(&tx->qe, &tx_mod->tx_active_q);
3424 if (tx->bna->tx_mod.flags & BNA_TX_MOD_F_ENET_STARTED) {
3427 if (!(tx->bna->tx_mod.flags &
3432 if (tx->bna->tx_mod.flags & BNA_TX_MOD_F_ENET_LOOPBACK)
3492 txq->priority = tx_mod->default_prio;
3501 tx_mod->rid_mask |= BIT(tx->rid);
3519 tx->bna->tx_mod.rid_mask &= ~BIT(tx->rid);
3561 struct bna_tx_mod *tx_mod = (struct bna_tx_mod *)arg;
3563 bfa_wc_down(&tx_mod->tx_stop_wc);
3569 struct bna_tx_mod *tx_mod = (struct bna_tx_mod *)arg;
3571 if (tx_mod->stop_cbfn)
3572 tx_mod->stop_cbfn(&tx_mod->bna->enet);
3573 tx_mod->stop_cbfn = NULL;
3577 bna_tx_mod_init(struct bna_tx_mod *tx_mod, struct bna *bna,
3582 tx_mod->bna = bna;
3583 tx_mod->flags = 0;
3585 tx_mod->tx = (struct bna_tx *)
3587 tx_mod->txq = (struct bna_txq *)
3590 INIT_LIST_HEAD(&tx_mod->tx_free_q);
3591 INIT_LIST_HEAD(&tx_mod->tx_active_q);
3593 INIT_LIST_HEAD(&tx_mod->txq_free_q);
3596 tx_mod->tx[i].rid = i;
3597 list_add_tail(&tx_mod->tx[i].qe, &tx_mod->tx_free_q);
3598 list_add_tail(&tx_mod->txq[i].qe, &tx_mod->txq_free_q);
3601 tx_mod->prio_map = BFI_TX_PRIO_MAP_ALL;
3602 tx_mod->default_prio = 0;
3603 tx_mod->iscsi_over_cee = BNA_STATUS_T_DISABLED;
3604 tx_mod->iscsi_prio = -1;
3608 bna_tx_mod_uninit(struct bna_tx_mod *tx_mod)
3610 tx_mod->bna = NULL;
3614 bna_tx_mod_start(struct bna_tx_mod *tx_mod, enum bna_tx_type type)
3618 tx_mod->flags |= BNA_TX_MOD_F_ENET_STARTED;
3620 tx_mod->flags |= BNA_TX_MOD_F_ENET_LOOPBACK;
3622 list_for_each_entry(tx, &tx_mod->tx_active_q, qe)
3628 bna_tx_mod_stop(struct bna_tx_mod *tx_mod, enum bna_tx_type type)
3632 tx_mod->flags &= ~BNA_TX_MOD_F_ENET_STARTED;
3633 tx_mod->flags &= ~BNA_TX_MOD_F_ENET_LOOPBACK;
3635 tx_mod->stop_cbfn = bna_enet_cb_tx_stopped;
3637 bfa_wc_init(&tx_mod->tx_stop_wc, bna_tx_mod_cb_tx_stopped_all, tx_mod);
3639 list_for_each_entry(tx, &tx_mod->tx_active_q, qe)
3641 bfa_wc_up(&tx_mod->tx_stop_wc);
3645 bfa_wc_wait(&tx_mod->tx_stop_wc);
3649 bna_tx_mod_fail(struct bna_tx_mod *tx_mod)
3653 tx_mod->flags &= ~BNA_TX_MOD_F_ENET_STARTED;
3654 tx_mod->flags &= ~BNA_TX_MOD_F_ENET_LOOPBACK;
3656 list_for_each_entry(tx, &tx_mod->tx_active_q, qe)