Lines Matching refs:gli
334 struct glun_info *gli = lli->parent; in read_cap16() local
412 mutex_lock(&gli->mutex); in read_cap16()
413 gli->max_lba = be64_to_cpu(*((__be64 *)&cmd_buf[0])); in read_cap16()
414 gli->blk_len = be32_to_cpu(*((__be32 *)&cmd_buf[8])); in read_cap16()
415 mutex_unlock(&gli->mutex); in read_cap16()
422 __func__, gli->max_lba, gli->blk_len, rc); in read_cap16()
564 int cxlflash_lun_attach(struct glun_info *gli, enum lun_mode mode, bool locked) in cxlflash_lun_attach() argument
569 mutex_lock(&gli->mutex); in cxlflash_lun_attach()
571 if (gli->mode == MODE_NONE) in cxlflash_lun_attach()
572 gli->mode = mode; in cxlflash_lun_attach()
573 else if (gli->mode != mode) { in cxlflash_lun_attach()
575 __func__, gli->mode, mode); in cxlflash_lun_attach()
580 gli->users++; in cxlflash_lun_attach()
581 WARN_ON(gli->users <= 0); in cxlflash_lun_attach()
584 __func__, rc, gli->mode, gli->users); in cxlflash_lun_attach()
586 mutex_unlock(&gli->mutex); in cxlflash_lun_attach()
600 void cxlflash_lun_detach(struct glun_info *gli) in cxlflash_lun_detach() argument
602 mutex_lock(&gli->mutex); in cxlflash_lun_detach()
603 WARN_ON(gli->mode == MODE_NONE); in cxlflash_lun_detach()
604 if (--gli->users == 0) { in cxlflash_lun_detach()
605 gli->mode = MODE_NONE; in cxlflash_lun_detach()
606 cxlflash_ba_terminate(&gli->blka.ba_lun); in cxlflash_lun_detach()
608 pr_debug("%s: gli->users=%u\n", __func__, gli->users); in cxlflash_lun_detach()
609 WARN_ON(gli->users < 0); in cxlflash_lun_detach()
610 mutex_unlock(&gli->mutex); in cxlflash_lun_detach()
635 struct glun_info *gli = lli->parent; in _cxlflash_disk_release() local
651 __func__, ctxid, release->rsrc_handle, gli->mode, gli->users); in _cxlflash_disk_release()
680 switch (gli->mode) { in _cxlflash_disk_release()
721 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()