Home
last modified time | relevance | path

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

/Linux-v6.6/drivers/scsi/qedi/
Dqedi_main.c532 static int qedi_init_id_tbl(struct qedi_portid_tbl *id_tbl, u16 size, in qedi_init_id_tbl() argument
535 id_tbl->start = start_id; in qedi_init_id_tbl()
536 id_tbl->max = size; in qedi_init_id_tbl()
537 id_tbl->next = next; in qedi_init_id_tbl()
538 spin_lock_init(&id_tbl->lock); in qedi_init_id_tbl()
539 id_tbl->table = kcalloc(BITS_TO_LONGS(size), sizeof(long), GFP_KERNEL); in qedi_init_id_tbl()
540 if (!id_tbl->table) in qedi_init_id_tbl()
546 static void qedi_free_id_tbl(struct qedi_portid_tbl *id_tbl) in qedi_free_id_tbl() argument
548 kfree(id_tbl->table); in qedi_free_id_tbl()
549 id_tbl->table = NULL; in qedi_free_id_tbl()
[all …]
Dqedi_gbl.h67 int qedi_alloc_id(struct qedi_portid_tbl *id_tbl, u16 id);
68 u16 qedi_alloc_new_id(struct qedi_portid_tbl *id_tbl);
69 void qedi_free_id(struct qedi_portid_tbl *id_tbl, u16 id);
/Linux-v6.6/drivers/net/ethernet/broadcom/
Dcnic.c656 static int cnic_init_id_tbl(struct cnic_id_tbl *id_tbl, u32 size, u32 start_id, in cnic_init_id_tbl() argument
659 id_tbl->start = start_id; in cnic_init_id_tbl()
660 id_tbl->max = size; in cnic_init_id_tbl()
661 id_tbl->next = next; in cnic_init_id_tbl()
662 spin_lock_init(&id_tbl->lock); in cnic_init_id_tbl()
663 id_tbl->table = bitmap_zalloc(size, GFP_KERNEL); in cnic_init_id_tbl()
664 if (!id_tbl->table) in cnic_init_id_tbl()
670 static void cnic_free_id_tbl(struct cnic_id_tbl *id_tbl) in cnic_free_id_tbl() argument
672 bitmap_free(id_tbl->table); in cnic_free_id_tbl()
673 id_tbl->table = NULL; in cnic_free_id_tbl()
[all …]