Lines Matching refs:lli
372 static int init_vlun(struct llun_info *lli) in init_vlun() argument
375 struct glun_info *gli = lli->parent; in init_vlun()
382 blka->ba_lun.lun_id = lli->lun_index; in init_vlun()
393 pr_debug("%s: returning rc=%d lli=%p\n", __func__, rc, lli); in init_vlun()
512 struct llun_info *lli = sdev->hostdata; in grow_lxt() local
513 struct glun_info *gli = lli->parent; in grow_lxt()
576 (lli->lun_index << LXT_LUNIDX_SHIFT) | in grow_lxt()
578 lli->port_sel)); in grow_lxt()
625 struct llun_info *lli = sdev->hostdata; in shrink_lxt() local
626 struct glun_info *gli = lli->parent; in shrink_lxt()
732 struct llun_info *lli = sdev->hostdata; in _cxlflash_vlun_resize() local
733 struct glun_info *gli = lli->parent; in _cxlflash_vlun_resize()
767 ctxi = get_context(cfg, rctxid, lli, CTX_CTRL_ERR_FALLBACK); in _cxlflash_vlun_resize()
777 rhte = get_rhte(ctxi, rhndl, lli); in _cxlflash_vlun_resize()
814 struct llun_info *lli, *temp; in cxlflash_restore_luntable() local
822 list_for_each_entry_safe(lli, temp, &cfg->lluns, list) { in cxlflash_restore_luntable()
823 if (!lli->in_table) in cxlflash_restore_luntable()
826 lind = lli->lun_index; in cxlflash_restore_luntable()
828 if (lli->port_sel == BOTH_PORTS) { in cxlflash_restore_luntable()
829 writeq_be(lli->lun_id[0], &agm->fc_port[0][lind]); in cxlflash_restore_luntable()
830 writeq_be(lli->lun_id[1], &agm->fc_port[1][lind]); in cxlflash_restore_luntable()
833 lli->lun_id[0], lli->lun_id[1]); in cxlflash_restore_luntable()
835 chan = PORT2CHAN(lli->port_sel); in cxlflash_restore_luntable()
836 writeq_be(lli->lun_id[chan], &agm->fc_port[chan][lind]); in cxlflash_restore_luntable()
839 lli->lun_id[chan]); in cxlflash_restore_luntable()
857 static int init_luntable(struct cxlflash_cfg *cfg, struct llun_info *lli) in init_luntable() argument
867 if (lli->in_table) in init_luntable()
870 if (lli->port_sel == BOTH_PORTS) { in init_luntable()
881 lind = lli->lun_index = cfg->promote_lun_index; in init_luntable()
882 writeq_be(lli->lun_id[0], &agm->fc_port[0][lind]); in init_luntable()
883 writeq_be(lli->lun_id[1], &agm->fc_port[1][lind]); in init_luntable()
886 __func__, lind, lli->lun_id[0], lli->lun_id[1]); in init_luntable()
892 chan = PORT2CHAN(lli->port_sel); in init_luntable()
898 lind = lli->lun_index = cfg->last_lun_index[chan]; in init_luntable()
899 writeq_be(lli->lun_id[chan], &agm->fc_port[chan][lind]); in init_luntable()
902 __func__, lind, chan, lli->lun_id[chan]); in init_luntable()
905 lli->in_table = true; in init_luntable()
928 struct llun_info *lli = sdev->hostdata; in cxlflash_disk_virtual_open() local
929 struct glun_info *gli = lli->parent; in cxlflash_disk_virtual_open()
950 rc = init_vlun(lli); in cxlflash_disk_virtual_open()
967 rc = init_luntable(cfg, lli); in cxlflash_disk_virtual_open()
974 ctxi = get_context(cfg, rctxid, lli, 0); in cxlflash_disk_virtual_open()
981 rhte = rhte_checkout(ctxi, lli); in cxlflash_disk_virtual_open()
1011 if (lli->port_sel == BOTH_PORTS) in cxlflash_disk_virtual_open()
1124 struct llun_info *lli = sdev->hostdata; in cxlflash_disk_clone() local
1125 struct glun_info *gli = lli->parent; in cxlflash_disk_clone()
1160 ctxi_src = get_context(cfg, rctxid_src, lli, CTX_CTRL_CLONE); in cxlflash_disk_clone()
1161 ctxi_dst = get_context(cfg, rctxid_dst, lli, 0); in cxlflash_disk_clone()