Lines Matching refs:tc_mqprio
159 if (!refcount_read(&adap->tc_mqprio->refcnt)) { in cxgb4_mqprio_alloc_hw_resources()
174 refcount_set(&adap->tc_mqprio->refcnt, 1); in cxgb4_mqprio_alloc_hw_resources()
176 refcount_inc(&adap->tc_mqprio->refcnt); in cxgb4_mqprio_alloc_hw_resources()
265 if (refcount_dec_and_test(&adap->tc_mqprio->refcnt)) { in cxgb4_mqprio_alloc_hw_resources()
281 if (!refcount_read(&adap->tc_mqprio->refcnt)) in cxgb4_mqprio_free_hw_resources()
311 if (refcount_dec_and_test(&adap->tc_mqprio->refcnt)) { in cxgb4_mqprio_free_hw_resources()
337 tc_port_mqprio = &adap->tc_mqprio->port_mqprio[pi->port_id]; in cxgb4_mqprio_alloc_tc()
376 tc_port_mqprio = &adap->tc_mqprio->port_mqprio[pi->port_id]; in cxgb4_mqprio_free_tc()
443 tc_port_mqprio = &adap->tc_mqprio->port_mqprio[pi->port_id]; in cxgb4_mqprio_enable_offload()
541 tc_port_mqprio = &adap->tc_mqprio->port_mqprio[pi->port_id]; in cxgb4_mqprio_disable_offload()
584 mutex_lock(&adap->tc_mqprio->mqprio_mutex); in cxgb4_setup_tc_mqprio()
624 mutex_unlock(&adap->tc_mqprio->mqprio_mutex); in cxgb4_setup_tc_mqprio()
634 if (!adap->tc_mqprio || !adap->tc_mqprio->port_mqprio) in cxgb4_mqprio_stop_offload()
637 mutex_lock(&adap->tc_mqprio->mqprio_mutex); in cxgb4_mqprio_stop_offload()
643 tc_port_mqprio = &adap->tc_mqprio->port_mqprio[i]; in cxgb4_mqprio_stop_offload()
649 mutex_unlock(&adap->tc_mqprio->mqprio_mutex); in cxgb4_mqprio_stop_offload()
655 struct cxgb4_tc_mqprio *tc_mqprio; in cxgb4_init_tc_mqprio() local
660 tc_mqprio = kzalloc(sizeof(*tc_mqprio), GFP_KERNEL); in cxgb4_init_tc_mqprio()
661 if (!tc_mqprio) in cxgb4_init_tc_mqprio()
671 mutex_init(&tc_mqprio->mqprio_mutex); in cxgb4_init_tc_mqprio()
673 tc_mqprio->port_mqprio = tc_port_mqprio; in cxgb4_init_tc_mqprio()
675 port_mqprio = &tc_mqprio->port_mqprio[i]; in cxgb4_init_tc_mqprio()
685 adap->tc_mqprio = tc_mqprio; in cxgb4_init_tc_mqprio()
686 refcount_set(&adap->tc_mqprio->refcnt, 0); in cxgb4_init_tc_mqprio()
691 port_mqprio = &tc_mqprio->port_mqprio[i]; in cxgb4_init_tc_mqprio()
697 kfree(tc_mqprio); in cxgb4_init_tc_mqprio()
706 if (adap->tc_mqprio) { in cxgb4_cleanup_tc_mqprio()
707 mutex_lock(&adap->tc_mqprio->mqprio_mutex); in cxgb4_cleanup_tc_mqprio()
708 if (adap->tc_mqprio->port_mqprio) { in cxgb4_cleanup_tc_mqprio()
714 port_mqprio = &adap->tc_mqprio->port_mqprio[i]; in cxgb4_cleanup_tc_mqprio()
717 kfree(adap->tc_mqprio->port_mqprio); in cxgb4_cleanup_tc_mqprio()
719 mutex_unlock(&adap->tc_mqprio->mqprio_mutex); in cxgb4_cleanup_tc_mqprio()
720 kfree(adap->tc_mqprio); in cxgb4_cleanup_tc_mqprio()