Lines Matching refs:luns
260 struct fsg_lun *luns[FSG_MAX_LUNS]; member
449 int i = ARRAY_SIZE(common->luns) - 1; in _fsg_common_get_max_lun()
451 while (i >= 0 && !common->luns[i]) in _fsg_common_get_max_lun()
2217 if (cbw->Lun >= ARRAY_SIZE(common->luns) || in received_cbw()
2246 if (common->lun < ARRAY_SIZE(common->luns)) in received_cbw()
2247 common->curlun = common->luns[common->lun]; in received_cbw()
2388 for (i = 0; i < ARRAY_SIZE(common->luns); ++i) in do_set_interface()
2389 if (common->luns[i]) in do_set_interface()
2390 common->luns[i]->unit_attention_data = in do_set_interface()
2492 for (i = 0; i < ARRAY_SIZE(common->luns); ++i) { in handle_exception()
2493 curlun = common->luns[i]; in handle_exception()
2606 for (i = 0; i < ARRAY_SIZE(common->luns); i++) { in fsg_main_thread()
2607 struct fsg_lun *curlun = common->luns[i]; in fsg_main_thread()
2715 memset(common->luns, 0, sizeof(common->luns)); in fsg_common_setup()
2792 if (common->luns[i]) { in _fsg_common_remove_luns()
2793 fsg_common_remove_lun(common->luns[i]); in _fsg_common_remove_luns()
2794 common->luns[i] = NULL; in _fsg_common_remove_luns()
2800 _fsg_common_remove_luns(common, ARRAY_SIZE(common->luns)); in fsg_common_remove_luns()
2879 if (id >= ARRAY_SIZE(common->luns)) in fsg_common_create_lun()
2882 if (common->luns[id]) in fsg_common_create_lun()
2920 common->luns[id] = lun; in fsg_common_create_lun()
2947 common->luns[id] = NULL; in fsg_common_create_lun()
2963 rc = fsg_common_create_lun(common, &cfg->luns[i], i, buf, NULL); in fsg_common_create_luns()
2988 pn ?: ((*common->luns)->cdrom in fsg_common_set_inquiry_string()
3005 for (i = 0; i < ARRAY_SIZE(common->luns); ++i) { in fsg_common_release()
3006 struct fsg_lun *lun = common->luns[i]; in fsg_common_release()
3309 if (fsg_opts->refcnt || fsg_opts->common->luns[num]) { in fsg_lun_make()
3329 opts->lun = fsg_opts->common->luns[num]; in fsg_lun_make()
3358 fsg_opts->common->luns[lun_opts->lun_id] = NULL; in fsg_lun_drop()
3517 opts->lun0.lun = opts->common->luns[0]; in fsg_alloc_inst()
3595 min(params->luns ?: (params->file_count ?: 1u), in fsg_config_from_params()
3597 for (i = 0, lun = cfg->luns; i < cfg->nluns; ++i, ++lun) { in fsg_config_from_params()