Lines Matching refs:nsgpg
5387 bfa_sgpg_mfree(struct bfa_s *bfa, struct list_head *sgpg_q, int nsgpg) in bfa_sgpg_mfree() argument
5392 mod->free_sgpgs += nsgpg; in bfa_sgpg_mfree()
5405 if (mod->free_sgpgs < wqe->nsgpg) in bfa_sgpg_mfree()
5406 nsgpg = mod->free_sgpgs; in bfa_sgpg_mfree()
5408 nsgpg = wqe->nsgpg; in bfa_sgpg_mfree()
5409 bfa_sgpg_malloc(bfa, &wqe->sgpg_q, nsgpg); in bfa_sgpg_mfree()
5410 wqe->nsgpg -= nsgpg; in bfa_sgpg_mfree()
5411 if (wqe->nsgpg == 0) { in bfa_sgpg_mfree()
5419 bfa_sgpg_wait(struct bfa_s *bfa, struct bfa_sgpg_wqe_s *wqe, int nsgpg) in bfa_sgpg_wait() argument
5423 WARN_ON(nsgpg <= 0); in bfa_sgpg_wait()
5424 WARN_ON(nsgpg <= mod->free_sgpgs); in bfa_sgpg_wait()
5426 wqe->nsgpg_total = wqe->nsgpg = nsgpg; in bfa_sgpg_wait()
5437 wqe->nsgpg -= mod->free_sgpgs; in bfa_sgpg_wait()
5452 if (wqe->nsgpg_total != wqe->nsgpg) in bfa_sgpg_wcancel()
5454 wqe->nsgpg_total - wqe->nsgpg); in bfa_sgpg_wcancel()