Lines Matching refs:luns
259 struct fsg_lun *luns[FSG_MAX_LUNS]; member
448 int i = ARRAY_SIZE(common->luns) - 1; in _fsg_common_get_max_lun()
450 while (i >= 0 && !common->luns[i]) in _fsg_common_get_max_lun()
2200 if (cbw->Lun >= ARRAY_SIZE(common->luns) || in received_cbw()
2229 if (common->lun < ARRAY_SIZE(common->luns)) in received_cbw()
2230 common->curlun = common->luns[common->lun]; in received_cbw()
2371 for (i = 0; i < ARRAY_SIZE(common->luns); ++i) in do_set_interface()
2372 if (common->luns[i]) in do_set_interface()
2373 common->luns[i]->unit_attention_data = in do_set_interface()
2475 for (i = 0; i < ARRAY_SIZE(common->luns); ++i) { in handle_exception()
2476 curlun = common->luns[i]; in handle_exception()
2589 for (i = 0; i < ARRAY_SIZE(common->luns); i++) { in fsg_main_thread()
2590 struct fsg_lun *curlun = common->luns[i]; in fsg_main_thread()
2698 memset(common->luns, 0, sizeof(common->luns)); in fsg_common_setup()
2775 if (common->luns[i]) { in _fsg_common_remove_luns()
2776 fsg_common_remove_lun(common->luns[i]); in _fsg_common_remove_luns()
2777 common->luns[i] = NULL; in _fsg_common_remove_luns()
2783 _fsg_common_remove_luns(common, ARRAY_SIZE(common->luns)); in fsg_common_remove_luns()
2862 if (id >= ARRAY_SIZE(common->luns)) in fsg_common_create_lun()
2865 if (common->luns[id]) in fsg_common_create_lun()
2903 common->luns[id] = lun; in fsg_common_create_lun()
2934 common->luns[id] = NULL; in fsg_common_create_lun()
2950 rc = fsg_common_create_lun(common, &cfg->luns[i], i, buf, NULL); in fsg_common_create_luns()
2975 pn ?: ((*common->luns)->cdrom in fsg_common_set_inquiry_string()
2992 for (i = 0; i < ARRAY_SIZE(common->luns); ++i) { in fsg_common_release()
2993 struct fsg_lun *lun = common->luns[i]; in fsg_common_release()
3297 if (fsg_opts->refcnt || fsg_opts->common->luns[num]) { in fsg_lun_make()
3317 opts->lun = fsg_opts->common->luns[num]; in fsg_lun_make()
3346 fsg_opts->common->luns[lun_opts->lun_id] = NULL; in fsg_lun_drop()
3505 opts->lun0.lun = opts->common->luns[0]; in fsg_alloc_inst()
3582 min(params->luns ?: (params->file_count ?: 1u), in fsg_config_from_params()
3584 for (i = 0, lun = cfg->luns; i < cfg->nluns; ++i, ++lun) { in fsg_config_from_params()