Home
last modified time | relevance | path

Searched refs:res_cb (Results 1 – 3 of 3) sorted by relevance

/linux/drivers/infiniband/hw/erdma/
H A Derdma_main.c411 dev->res_cb[ERDMA_RES_TYPE_PD].max_cap = ERDMA_MAX_PD; in erdma_dev_attrs_init()
412 dev->res_cb[ERDMA_RES_TYPE_STAG_IDX].max_cap = dev->attrs.max_mr; in erdma_dev_attrs_init()
413 dev->res_cb[ERDMA_RES_TYPE_AH].max_cap = dev->attrs.max_ah; in erdma_dev_attrs_init()
449 dev->res_cb[i].next_alloc_idx = 1; in erdma_res_cb_init()
450 spin_lock_init(&dev->res_cb[i].lock); in erdma_res_cb_init()
451 dev->res_cb[i].bitmap = in erdma_res_cb_init()
452 bitmap_zalloc(dev->res_cb[i].max_cap, GFP_KERNEL); in erdma_res_cb_init()
453 if (!dev->res_cb[i].bitmap) in erdma_res_cb_init()
461 bitmap_free(dev->res_cb[j].bitmap); in erdma_res_cb_init()
471 bitmap_free(dev->res_cb[i].bitmap); in erdma_res_cb_free()
H A Derdma_verbs.c255 static int erdma_alloc_idx(struct erdma_resource_cb *res_cb) in erdma_alloc_idx() argument
260 spin_lock_irqsave(&res_cb->lock, flags); in erdma_alloc_idx()
261 idx = find_next_zero_bit(res_cb->bitmap, res_cb->max_cap, in erdma_alloc_idx()
262 res_cb->next_alloc_idx); in erdma_alloc_idx()
263 if (idx == res_cb->max_cap) { in erdma_alloc_idx()
264 idx = find_first_zero_bit(res_cb->bitmap, res_cb->max_cap); in erdma_alloc_idx()
265 if (idx == res_cb->max_cap) { in erdma_alloc_idx()
266 res_cb->next_alloc_idx = 1; in erdma_alloc_idx()
267 spin_unlock_irqrestore(&res_cb->lock, flags); in erdma_alloc_idx()
272 set_bit(idx, res_cb->bitmap); in erdma_alloc_idx()
[all …]
/linux/drivers/net/ethernet/hisilicon/hns3/
H A Dhns3_enet.c3611 struct hns3_desc_cb *res_cb) in hns3_replace_buffer() argument
3614 ring->desc_cb[i] = *res_cb; in hns3_replace_buffer()