Lines Matching refs:luns
283 struct fsg_lun *luns[FSG_MAX_LUNS]; member
494 int i = ARRAY_SIZE(common->luns) - 1; in _fsg_common_get_max_lun()
496 while (i >= 0 && !common->luns[i]) in _fsg_common_get_max_lun()
2143 if (cbw->Lun >= ARRAY_SIZE(common->luns) || in received_cbw()
2172 if (common->lun < ARRAY_SIZE(common->luns)) in received_cbw()
2173 common->curlun = common->luns[common->lun]; in received_cbw()
2318 for (i = 0; i < ARRAY_SIZE(common->luns); ++i) in do_set_interface()
2319 if (common->luns[i]) in do_set_interface()
2320 common->luns[i]->unit_attention_data = in do_set_interface()
2418 for (i = 0; i < ARRAY_SIZE(common->luns); ++i) { in handle_exception()
2419 curlun = common->luns[i]; in handle_exception()
2564 for (i = 0; i < ARRAY_SIZE(common->luns); --i) { in fsg_main_thread()
2565 struct fsg_lun *curlun = common->luns[i]; in fsg_main_thread()
2686 memset(common->luns, 0, sizeof(common->luns)); in fsg_common_setup()
2767 if (common->luns[i]) { in _fsg_common_remove_luns()
2768 fsg_common_remove_lun(common->luns[i]); in _fsg_common_remove_luns()
2769 common->luns[i] = NULL; in _fsg_common_remove_luns()
2775 _fsg_common_remove_luns(common, ARRAY_SIZE(common->luns)); in fsg_common_remove_luns()
2860 if (id >= ARRAY_SIZE(common->luns)) in fsg_common_create_lun()
2863 if (common->luns[id]) in fsg_common_create_lun()
2901 common->luns[id] = lun; in fsg_common_create_lun()
2932 common->luns[id] = NULL; in fsg_common_create_lun()
2948 rc = fsg_common_create_lun(common, &cfg->luns[i], i, buf, NULL); in fsg_common_create_luns()
2973 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()
3269 if (fsg_opts->refcnt || fsg_opts->common->luns[num]) { in fsg_lun_make()
3289 opts->lun = fsg_opts->common->luns[num]; in fsg_lun_make()
3318 fsg_opts->common->luns[lun_opts->lun_id] = NULL; in fsg_lun_drop()
3479 opts->lun0.lun = opts->common->luns[0]; in fsg_alloc_inst()
3554 min(params->luns ?: (params->file_count ?: 1u), in fsg_config_from_params()
3556 for (i = 0, lun = cfg->luns; i < cfg->nluns; ++i, ++lun) { in fsg_config_from_params()