Lines Matching full:lli

35 	struct llun_info *lli = NULL;  in create_local()  local
37 lli = kzalloc(sizeof(*lli), GFP_KERNEL); in create_local()
38 if (unlikely(!lli)) { in create_local()
39 dev_err(dev, "%s: could not allocate lli\n", __func__); in create_local()
43 lli->sdev = sdev; in create_local()
44 lli->host_no = sdev->host->host_no; in create_local()
45 lli->in_table = false; in create_local()
47 memcpy(lli->wwid, wwid, DK_CXLFLASH_MANAGE_LUN_WWID_LEN); in create_local()
49 return lli; in create_local()
86 struct llun_info *lli, *temp; in lookup_local() local
88 list_for_each_entry_safe(lli, temp, &cfg->lluns, list) in lookup_local()
89 if (!memcmp(lli->wwid, wwid, DK_CXLFLASH_MANAGE_LUN_WWID_LEN)) in lookup_local()
90 return lli; in lookup_local()
136 struct llun_info *lli = NULL; in find_and_create_lun() local
142 lli = lookup_local(cfg, wwid); in find_and_create_lun()
143 if (lli) in find_and_create_lun()
146 lli = create_local(sdev, wwid); in find_and_create_lun()
147 if (unlikely(!lli)) in find_and_create_lun()
152 lli->parent = gli; in find_and_create_lun()
153 list_add(&lli->list, &cfg->lluns); in find_and_create_lun()
159 kfree(lli); in find_and_create_lun()
160 lli = NULL; in find_and_create_lun()
164 lli->parent = gli; in find_and_create_lun()
165 list_add(&lli->list, &cfg->lluns); in find_and_create_lun()
170 dev_dbg(dev, "%s: returning lli=%p, gli=%p\n", __func__, lli, gli); in find_and_create_lun()
171 return lli; in find_and_create_lun()
180 struct llun_info *lli, *temp; in cxlflash_term_local_luns() local
183 list_for_each_entry_safe(lli, temp, &cfg->lluns, list) { in cxlflash_term_local_luns()
184 list_del(&lli->list); in cxlflash_term_local_luns()
185 kfree(lli); in cxlflash_term_local_luns()
232 struct llun_info *lli = NULL; in cxlflash_manage_lun() local
238 lli = find_and_create_lun(sdev, manage->wwid); in cxlflash_manage_lun()
239 dev_dbg(dev, "%s: WWID=%016llx%016llx, flags=%016llx lli=%p\n", in cxlflash_manage_lun()
241 get_unaligned_be64(&manage->wwid[8]), manage->hdr.flags, lli); in cxlflash_manage_lun()
242 if (unlikely(!lli)) { in cxlflash_manage_lun()
253 lli->port_sel |= CHAN2PORTMASK(chan); in cxlflash_manage_lun()
254 lli->lun_id[chan] = lun_to_lunid(sdev->lun); in cxlflash_manage_lun()
255 sdev->hostdata = lli; in cxlflash_manage_lun()
257 if (lli->parent->mode != MODE_NONE) in cxlflash_manage_lun()
265 lli->port_sel &= ~CHAN2PORTMASK(chan); in cxlflash_manage_lun()
266 if (lli->port_sel == 0U) in cxlflash_manage_lun()
267 lli->in_table = false; in cxlflash_manage_lun()
272 __func__, lli->port_sel, chan, lli->lun_id[chan]); in cxlflash_manage_lun()