Lines Matching refs:txq_info

401 free_sge_txq_uld(struct adapter *adap, struct sge_uld_txq_info *txq_info)  in free_sge_txq_uld()  argument
403 int nq = txq_info->ntxq; in free_sge_txq_uld()
407 struct sge_uld_txq *txq = &txq_info->uldtxq[i]; in free_sge_txq_uld()
422 alloc_sge_txq_uld(struct adapter *adap, struct sge_uld_txq_info *txq_info, in alloc_sge_txq_uld() argument
426 int nq = txq_info->ntxq; in alloc_sge_txq_uld()
431 struct sge_uld_txq *txq = &txq_info->uldtxq[i]; in alloc_sge_txq_uld()
441 free_sge_txq_uld(adap, txq_info); in alloc_sge_txq_uld()
448 struct sge_uld_txq_info *txq_info = NULL; in release_sge_txq_uld() local
451 txq_info = adap->sge.uld_txq_info[tx_uld_type]; in release_sge_txq_uld()
453 if (txq_info && atomic_dec_and_test(&txq_info->users)) { in release_sge_txq_uld()
454 free_sge_txq_uld(adap, txq_info); in release_sge_txq_uld()
455 kfree(txq_info->uldtxq); in release_sge_txq_uld()
456 kfree(txq_info); in release_sge_txq_uld()
465 struct sge_uld_txq_info *txq_info = NULL; in setup_sge_txq_uld() local
469 txq_info = adap->sge.uld_txq_info[tx_uld_type]; in setup_sge_txq_uld()
471 if ((tx_uld_type == CXGB4_TX_OFLD) && txq_info && in setup_sge_txq_uld()
472 (atomic_inc_return(&txq_info->users) > 1)) in setup_sge_txq_uld()
475 txq_info = kzalloc(sizeof(*txq_info), GFP_KERNEL); in setup_sge_txq_uld()
476 if (!txq_info) in setup_sge_txq_uld()
481 txq_info->ntxq = rounddown(i, adap->params.nports); in setup_sge_txq_uld()
482 if (txq_info->ntxq <= 0) { in setup_sge_txq_uld()
484 kfree(txq_info); in setup_sge_txq_uld()
490 txq_info->ntxq = roundup(i, adap->params.nports); in setup_sge_txq_uld()
492 txq_info->uldtxq = kcalloc(txq_info->ntxq, sizeof(struct sge_uld_txq), in setup_sge_txq_uld()
494 if (!txq_info->uldtxq) { in setup_sge_txq_uld()
495 kfree(txq_info); in setup_sge_txq_uld()
499 if (alloc_sge_txq_uld(adap, txq_info, tx_uld_type)) { in setup_sge_txq_uld()
500 kfree(txq_info->uldtxq); in setup_sge_txq_uld()
501 kfree(txq_info); in setup_sge_txq_uld()
505 atomic_inc(&txq_info->users); in setup_sge_txq_uld()
506 adap->sge.uld_txq_info[tx_uld_type] = txq_info; in setup_sge_txq_uld()
515 struct sge_uld_txq_info *txq_info = adap->sge.uld_txq_info[tx_uld_type]; in uld_queue_init() local
521 lli->ntxq = txq_info->ntxq; in uld_queue_init()