Lines Matching refs:gli
334 struct glun_info *gli = lli->parent; in read_cap16() local
414 mutex_lock(&gli->mutex); in read_cap16()
415 gli->max_lba = be64_to_cpu(*((__be64 *)&cmd_buf[0])); in read_cap16()
416 gli->blk_len = be32_to_cpu(*((__be32 *)&cmd_buf[8])); in read_cap16()
417 mutex_unlock(&gli->mutex); in read_cap16()
424 __func__, gli->max_lba, gli->blk_len, rc); in read_cap16()
566 int cxlflash_lun_attach(struct glun_info *gli, enum lun_mode mode, bool locked) in cxlflash_lun_attach() argument
571 mutex_lock(&gli->mutex); in cxlflash_lun_attach()
573 if (gli->mode == MODE_NONE) in cxlflash_lun_attach()
574 gli->mode = mode; in cxlflash_lun_attach()
575 else if (gli->mode != mode) { in cxlflash_lun_attach()
577 __func__, gli->mode, mode); in cxlflash_lun_attach()
582 gli->users++; in cxlflash_lun_attach()
583 WARN_ON(gli->users <= 0); in cxlflash_lun_attach()
586 __func__, rc, gli->mode, gli->users); in cxlflash_lun_attach()
588 mutex_unlock(&gli->mutex); in cxlflash_lun_attach()
602 void cxlflash_lun_detach(struct glun_info *gli) in cxlflash_lun_detach() argument
604 mutex_lock(&gli->mutex); in cxlflash_lun_detach()
605 WARN_ON(gli->mode == MODE_NONE); in cxlflash_lun_detach()
606 if (--gli->users == 0) { in cxlflash_lun_detach()
607 gli->mode = MODE_NONE; in cxlflash_lun_detach()
608 cxlflash_ba_terminate(&gli->blka.ba_lun); in cxlflash_lun_detach()
610 pr_debug("%s: gli->users=%u\n", __func__, gli->users); in cxlflash_lun_detach()
611 WARN_ON(gli->users < 0); in cxlflash_lun_detach()
612 mutex_unlock(&gli->mutex); in cxlflash_lun_detach()
637 struct glun_info *gli = lli->parent; in _cxlflash_disk_release() local
653 __func__, ctxid, release->rsrc_handle, gli->mode, gli->users); in _cxlflash_disk_release()
682 switch (gli->mode) { in _cxlflash_disk_release()
723 cxlflash_lun_detach(gli); in _cxlflash_disk_release()
1322 struct glun_info *gli = lli->parent; in cxlflash_disk_attach() local
1344 if (gli->max_lba == 0) { in cxlflash_disk_attach()
1354 dev_dbg(dev, "%s: LBA = %016llx\n", __func__, gli->max_lba); in cxlflash_disk_attach()
1355 dev_dbg(dev, "%s: BLK_LEN = %08x\n", __func__, gli->blk_len); in cxlflash_disk_attach()
1472 attach->block_size = gli->blk_len; in cxlflash_disk_attach()
1474 attach->last_lba = gli->max_lba; in cxlflash_disk_attach()
1476 attach->max_xfer /= gli->blk_len; in cxlflash_disk_attach()
1776 struct glun_info *gli = lli->parent; in process_sense() local
1777 u64 prev_lba = gli->max_lba; in process_sense()
1804 if (prev_lba != gli->max_lba) in process_sense()
1807 gli->max_lba); in process_sense()
1842 struct glun_info *gli = lli->parent; in cxlflash_disk_verify() local
1890 switch (gli->mode) { in cxlflash_disk_verify()
1892 last_lba = gli->max_lba; in cxlflash_disk_verify()
1896 last_lba = ((u64)rhte->lxt_cnt * MC_CHUNK_SIZE * gli->blk_len); in cxlflash_disk_verify()
1965 struct glun_info *gli = lli->parent; in cxlflash_disk_direct_open() local
1984 rc = cxlflash_lun_attach(gli, MODE_PHYSICAL, false); in cxlflash_disk_direct_open()
2009 last_lba = gli->max_lba; in cxlflash_disk_direct_open()
2032 cxlflash_lun_detach(gli); in cxlflash_disk_direct_open()