Lines Matching refs:luns
258 struct fsg_lun *luns[FSG_MAX_LUNS]; member
447 int i = ARRAY_SIZE(common->luns) - 1; in _fsg_common_get_max_lun()
449 while (i >= 0 && !common->luns[i]) in _fsg_common_get_max_lun()
2152 if (cbw->Lun >= ARRAY_SIZE(common->luns) || in received_cbw()
2181 if (common->lun < ARRAY_SIZE(common->luns)) in received_cbw()
2182 common->curlun = common->luns[common->lun]; in received_cbw()
2323 for (i = 0; i < ARRAY_SIZE(common->luns); ++i) in do_set_interface()
2324 if (common->luns[i]) in do_set_interface()
2325 common->luns[i]->unit_attention_data = in do_set_interface()
2427 for (i = 0; i < ARRAY_SIZE(common->luns); ++i) { in handle_exception()
2428 curlun = common->luns[i]; in handle_exception()
2541 for (i = 0; i < ARRAY_SIZE(common->luns); i++) { in fsg_main_thread()
2542 struct fsg_lun *curlun = common->luns[i]; in fsg_main_thread()
2634 memset(common->luns, 0, sizeof(common->luns)); in fsg_common_setup()
2711 if (common->luns[i]) { in _fsg_common_remove_luns()
2712 fsg_common_remove_lun(common->luns[i]); in _fsg_common_remove_luns()
2713 common->luns[i] = NULL; in _fsg_common_remove_luns()
2719 _fsg_common_remove_luns(common, ARRAY_SIZE(common->luns)); in fsg_common_remove_luns()
2797 if (id >= ARRAY_SIZE(common->luns)) in fsg_common_create_lun()
2800 if (common->luns[id]) in fsg_common_create_lun()
2838 common->luns[id] = lun; in fsg_common_create_lun()
2869 common->luns[id] = NULL; in fsg_common_create_lun()
2885 rc = fsg_common_create_lun(common, &cfg->luns[i], i, buf, NULL); in fsg_common_create_luns()
2910 pn ?: ((*common->luns)->cdrom in fsg_common_set_inquiry_string()
2927 for (i = 0; i < ARRAY_SIZE(common->luns); ++i) { in fsg_common_release()
2928 struct fsg_lun *lun = common->luns[i]; in fsg_common_release()
3219 if (fsg_opts->refcnt || fsg_opts->common->luns[num]) { in fsg_lun_make()
3239 opts->lun = fsg_opts->common->luns[num]; in fsg_lun_make()
3268 fsg_opts->common->luns[lun_opts->lun_id] = NULL; in fsg_lun_drop()
3427 opts->lun0.lun = opts->common->luns[0]; in fsg_alloc_inst()
3504 min(params->luns ?: (params->file_count ?: 1u), in fsg_config_from_params()
3506 for (i = 0, lun = cfg->luns; i < cfg->nluns; ++i, ++lun) { in fsg_config_from_params()