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