Lines Matching refs:txq_info
446 free_sge_txq_uld(struct adapter *adap, struct sge_uld_txq_info *txq_info) in free_sge_txq_uld() argument
448 int nq = txq_info->ntxq; in free_sge_txq_uld()
452 struct sge_uld_txq *txq = &txq_info->uldtxq[i]; in free_sge_txq_uld()
467 alloc_sge_txq_uld(struct adapter *adap, struct sge_uld_txq_info *txq_info, in alloc_sge_txq_uld() argument
471 int nq = txq_info->ntxq; in alloc_sge_txq_uld()
476 struct sge_uld_txq *txq = &txq_info->uldtxq[i]; in alloc_sge_txq_uld()
486 free_sge_txq_uld(adap, txq_info); in alloc_sge_txq_uld()
493 struct sge_uld_txq_info *txq_info = NULL; in release_sge_txq_uld() local
496 txq_info = adap->sge.uld_txq_info[tx_uld_type]; in release_sge_txq_uld()
498 if (txq_info && atomic_dec_and_test(&txq_info->users)) { in release_sge_txq_uld()
499 free_sge_txq_uld(adap, txq_info); in release_sge_txq_uld()
500 kfree(txq_info->uldtxq); in release_sge_txq_uld()
501 kfree(txq_info); in release_sge_txq_uld()
510 struct sge_uld_txq_info *txq_info = NULL; in setup_sge_txq_uld() local
514 txq_info = adap->sge.uld_txq_info[tx_uld_type]; in setup_sge_txq_uld()
516 if ((tx_uld_type == CXGB4_TX_OFLD) && txq_info && in setup_sge_txq_uld()
517 (atomic_inc_return(&txq_info->users) > 1)) in setup_sge_txq_uld()
520 txq_info = kzalloc(sizeof(*txq_info), GFP_KERNEL); in setup_sge_txq_uld()
521 if (!txq_info) in setup_sge_txq_uld()
525 txq_info->ntxq = roundup(i, adap->params.nports); in setup_sge_txq_uld()
527 txq_info->uldtxq = kcalloc(txq_info->ntxq, sizeof(struct sge_uld_txq), in setup_sge_txq_uld()
529 if (!txq_info->uldtxq) { in setup_sge_txq_uld()
530 kfree(txq_info); in setup_sge_txq_uld()
534 if (alloc_sge_txq_uld(adap, txq_info, tx_uld_type)) { in setup_sge_txq_uld()
535 kfree(txq_info->uldtxq); in setup_sge_txq_uld()
536 kfree(txq_info); in setup_sge_txq_uld()
540 atomic_inc(&txq_info->users); in setup_sge_txq_uld()
541 adap->sge.uld_txq_info[tx_uld_type] = txq_info; in setup_sge_txq_uld()