Home
last modified time | relevance | path

Searched refs:opts (Results 1 – 25 of 89) sorted by relevance

1234

/drivers/usb/gadget/function/
Du_ether_configfs.h19 struct f_##_f_##_opts *opts = to_f_##_f_##_opts(item); \
21 usb_put_function_instance(&opts->func_inst); \
32 struct f_##_f_##_opts *opts = to_f_##_f_##_opts(item); \
35 mutex_lock(&opts->lock); \
36 result = gether_get_dev_addr(opts->net, page, PAGE_SIZE); \
37 mutex_unlock(&opts->lock); \
45 struct f_##_f_##_opts *opts = to_f_##_f_##_opts(item); \
48 mutex_lock(&opts->lock); \
49 if (opts->refcnt) { \
50 mutex_unlock(&opts->lock); \
[all …]
Duvc_configfs.c146 struct f_uvc_opts *opts; \
154 opts = to_f_uvc_opts(opts_item); \
156 mutex_lock(&opts->lock); \
158 mutex_unlock(&opts->lock); \
169 struct f_uvc_opts *opts; \
178 opts = to_f_uvc_opts(opts_item); \
180 mutex_lock(&opts->lock); \
181 if (ch->linked || opts->refcnt) { \
197 mutex_unlock(&opts->lock); \
264 struct f_uvc_opts *opts; \
[all …]
Df_uvc.c593 struct f_uvc_opts *opts; in uvc_function_bind() local
598 opts = fi_to_f_uvc_opts(f->fi); in uvc_function_bind()
601 opts->streaming_interval = clamp(opts->streaming_interval, 1U, 16U); in uvc_function_bind()
602 opts->streaming_maxpacket = clamp(opts->streaming_maxpacket, 1U, 3072U); in uvc_function_bind()
603 opts->streaming_maxburst = min(opts->streaming_maxburst, 15U); in uvc_function_bind()
606 if (opts->streaming_maxburst && in uvc_function_bind()
607 (opts->streaming_maxpacket % 1024) != 0) { in uvc_function_bind()
608 opts->streaming_maxpacket = roundup(opts->streaming_maxpacket, 1024); in uvc_function_bind()
610 opts->streaming_maxpacket); in uvc_function_bind()
619 if (opts->streaming_maxpacket <= 1024) { in uvc_function_bind()
[all …]
Df_uac1_legacy.c326 struct f_uac1_legacy_opts *opts; in f_audio_out_ep_complete() local
330 opts = container_of(audio->card.func.fi, struct f_uac1_legacy_opts, in f_audio_out_ep_complete()
332 audio_buf_size = opts->audio_buf_size; in f_audio_out_ep_complete()
578 struct f_uac1_legacy_opts *opts; in f_audio_set_alt() local
584 opts = container_of(f->fi, struct f_uac1_legacy_opts, func_inst); in f_audio_set_alt()
585 req_buf_size = opts->req_buf_size; in f_audio_set_alt()
586 req_count = opts->req_count; in f_audio_set_alt()
587 audio_buf_size = opts->audio_buf_size; in f_audio_set_alt()
810 struct f_uac1_legacy_opts *opts = to_f_uac1_opts(item); in f_uac1_attr_release() local
812 usb_put_function_instance(&opts->func_inst); in f_uac1_attr_release()
[all …]
Df_sourcesink.c450 struct f_ss_opts *opts; in sourcesink_free_func() local
452 opts = container_of(f->fi, struct f_ss_opts, func_inst); in sourcesink_free_func()
454 mutex_lock(&opts->lock); in sourcesink_free_func()
455 opts->refcnt--; in sourcesink_free_func()
456 mutex_unlock(&opts->lock); in sourcesink_free_func()
890 struct f_ss_opts *opts = to_f_ss_opts(item); in f_ss_opts_pattern_show() local
893 mutex_lock(&opts->lock); in f_ss_opts_pattern_show()
894 result = sprintf(page, "%u\n", opts->pattern); in f_ss_opts_pattern_show()
895 mutex_unlock(&opts->lock); in f_ss_opts_pattern_show()
903 struct f_ss_opts *opts = to_f_ss_opts(item); in f_ss_opts_pattern_store() local
[all …]
Df_hid.c871 struct f_hid_opts *opts = to_f_hid_opts(item); in hid_attr_release() local
873 usb_put_function_instance(&opts->func_inst); in hid_attr_release()
883 struct f_hid_opts *opts = to_f_hid_opts(item); \
886 mutex_lock(&opts->lock); \
887 result = sprintf(page, "%d\n", opts->name); \
888 mutex_unlock(&opts->lock); \
896 struct f_hid_opts *opts = to_f_hid_opts(item); \
900 mutex_lock(&opts->lock); \
901 if (opts->refcnt) { \
914 opts->name = num; \
[all …]
Df_midi.c1076 struct f_midi_opts *opts = to_f_midi_opts(item); in midi_attr_release() local
1078 usb_put_function_instance(&opts->func_inst); in midi_attr_release()
1088 struct f_midi_opts *opts = to_f_midi_opts(item); \
1091 mutex_lock(&opts->lock); \
1092 result = sprintf(page, "%d\n", opts->name); \
1093 mutex_unlock(&opts->lock); \
1101 struct f_midi_opts *opts = to_f_midi_opts(item); \
1105 mutex_lock(&opts->lock); \
1106 if (opts->refcnt > 1) { \
1119 opts->name = num; \
[all …]
Df_rndis.c837 struct f_rndis_opts *opts; in rndis_borrow_net() local
839 opts = container_of(f, struct f_rndis_opts, func_inst); in rndis_borrow_net()
840 if (opts->bound) in rndis_borrow_net()
841 gether_cleanup(netdev_priv(opts->net)); in rndis_borrow_net()
843 free_netdev(opts->net); in rndis_borrow_net()
844 opts->borrowed_net = opts->bound = true; in rndis_borrow_net()
845 opts->net = net; in rndis_borrow_net()
898 struct f_rndis_opts *opts; in rndis_free_inst() local
900 opts = container_of(f, struct f_rndis_opts, func_inst); in rndis_free_inst()
901 if (!opts->borrowed_net) { in rndis_free_inst()
[all …]
Df_uac2.c476 static void setup_descriptor(struct f_uac2_opts *opts) in setup_descriptor() argument
481 if (EPOUT_EN(opts)) in setup_descriptor()
483 if (EPIN_EN(opts)) in setup_descriptor()
485 if (EPOUT_EN(opts)) in setup_descriptor()
487 if (EPIN_EN(opts)) in setup_descriptor()
489 if (EPOUT_EN(opts)) in setup_descriptor()
491 if (EPIN_EN(opts)) in setup_descriptor()
506 if (EPIN_EN(opts)) { in setup_descriptor()
515 if (EPOUT_EN(opts)) { in setup_descriptor()
529 if (EPIN_EN(opts)) in setup_descriptor()
[all …]
Df_subset.c419 struct f_gether_opts *opts; in geth_free_inst() local
421 opts = container_of(f, struct f_gether_opts, func_inst); in geth_free_inst()
422 if (opts->bound) in geth_free_inst()
423 gether_cleanup(netdev_priv(opts->net)); in geth_free_inst()
425 free_netdev(opts->net); in geth_free_inst()
426 kfree(opts); in geth_free_inst()
431 struct f_gether_opts *opts; in geth_alloc_inst() local
433 opts = kzalloc(sizeof(*opts), GFP_KERNEL); in geth_alloc_inst()
434 if (!opts) in geth_alloc_inst()
436 mutex_init(&opts->lock); in geth_alloc_inst()
[all …]
Df_ncm.c960 const struct ndp_parser_opts *opts = ncm->parser_opts; in package_for_tx() local
962 const int dgram_idx_len = 2 * 2 * opts->dgram_item_len; in package_for_tx()
976 put_ncm(&ntb_iter, opts->block_length, new_len); in package_for_tx()
977 put_ncm(&ntb_iter, opts->ndp_index, ndp_index); in package_for_tx()
980 new_len = opts->ndp_size + in package_for_tx()
1020 const struct ndp_parser_opts *opts = ncm->parser_opts; in ncm_wrap_ntb() local
1024 const int dgram_idx_len = 2 * 2 * opts->dgram_item_len; in ncm_wrap_ntb()
1059 ncb_len = opts->nth_size; in ncm_wrap_ntb()
1071 put_unaligned_le32(opts->nth_sign, ntb_data); in ncm_wrap_ntb()
1074 put_unaligned_le16(opts->nth_size, ntb_data++); in ncm_wrap_ntb()
[all …]
Df_uac1.c639 struct f_uac1_opts *opts = to_f_uac1_opts(item); in f_uac1_attr_release() local
641 usb_put_function_instance(&opts->func_inst); in f_uac1_attr_release()
653 struct f_uac1_opts *opts = to_f_uac1_opts(item); \
656 mutex_lock(&opts->lock); \
657 result = sprintf(page, "%u\n", opts->name); \
658 mutex_unlock(&opts->lock); \
667 struct f_uac1_opts *opts = to_f_uac1_opts(item); \
671 mutex_lock(&opts->lock); \
672 if (opts->refcnt) { \
681 opts->name = num; \
[all …]
Df_eem.c561 struct f_eem_opts *opts; in eem_free_inst() local
563 opts = container_of(f, struct f_eem_opts, func_inst); in eem_free_inst()
564 if (opts->bound) in eem_free_inst()
565 gether_cleanup(netdev_priv(opts->net)); in eem_free_inst()
567 free_netdev(opts->net); in eem_free_inst()
568 kfree(opts); in eem_free_inst()
573 struct f_eem_opts *opts; in eem_alloc_inst() local
575 opts = kzalloc(sizeof(*opts), GFP_KERNEL); in eem_alloc_inst()
576 if (!opts) in eem_alloc_inst()
578 mutex_init(&opts->lock); in eem_alloc_inst()
[all …]
Df_printer.c1153 struct f_printer_opts *opts = to_f_printer_opts(item); in printer_attr_release() local
1155 usb_put_function_instance(&opts->func_inst); in printer_attr_release()
1165 struct f_printer_opts *opts = to_f_printer_opts(item); in f_printer_opts_pnp_string_show() local
1168 mutex_lock(&opts->lock); in f_printer_opts_pnp_string_show()
1169 if (!opts->pnp_string) in f_printer_opts_pnp_string_show()
1172 result = strlcpy(page, opts->pnp_string, PAGE_SIZE); in f_printer_opts_pnp_string_show()
1181 mutex_unlock(&opts->lock); in f_printer_opts_pnp_string_show()
1189 struct f_printer_opts *opts = to_f_printer_opts(item); in f_printer_opts_pnp_string_store() local
1193 mutex_lock(&opts->lock); in f_printer_opts_pnp_string_store()
1201 if (opts->pnp_string_allocated) in f_printer_opts_pnp_string_store()
[all …]
Df_serial.c260 struct f_serial_opts *opts = to_f_serial_opts(item); in serial_attr_release() local
262 usb_put_function_instance(&opts->func_inst); in serial_attr_release()
289 struct f_serial_opts *opts; in gser_free_inst() local
291 opts = container_of(f, struct f_serial_opts, func_inst); in gser_free_inst()
292 gserial_free_line(opts->port_num); in gser_free_inst()
293 kfree(opts); in gser_free_inst()
298 struct f_serial_opts *opts; in gser_alloc_inst() local
301 opts = kzalloc(sizeof(*opts), GFP_KERNEL); in gser_alloc_inst()
302 if (!opts) in gser_alloc_inst()
305 opts->func_inst.free_func_inst = gser_free_inst; in gser_alloc_inst()
[all …]
Df_loopback.c223 struct f_lb_opts *opts; in lb_free_func() local
225 opts = container_of(f->fi, struct f_lb_opts, func_inst); in lb_free_func()
227 mutex_lock(&opts->lock); in lb_free_func()
228 opts->refcnt--; in lb_free_func()
229 mutex_unlock(&opts->lock); in lb_free_func()
475 struct f_lb_opts *opts = to_f_lb_opts(item); in f_lb_opts_qlen_show() local
478 mutex_lock(&opts->lock); in f_lb_opts_qlen_show()
479 result = sprintf(page, "%d\n", opts->qlen); in f_lb_opts_qlen_show()
480 mutex_unlock(&opts->lock); in f_lb_opts_qlen_show()
488 struct f_lb_opts *opts = to_f_lb_opts(item); in f_lb_opts_qlen_store() local
[all …]
Df_ecm.c858 struct f_ecm_opts *opts; in ecm_free_inst() local
860 opts = container_of(f, struct f_ecm_opts, func_inst); in ecm_free_inst()
861 if (opts->bound) in ecm_free_inst()
862 gether_cleanup(netdev_priv(opts->net)); in ecm_free_inst()
864 free_netdev(opts->net); in ecm_free_inst()
865 kfree(opts); in ecm_free_inst()
870 struct f_ecm_opts *opts; in ecm_alloc_inst() local
872 opts = kzalloc(sizeof(*opts), GFP_KERNEL); in ecm_alloc_inst()
873 if (!opts) in ecm_alloc_inst()
875 mutex_init(&opts->lock); in ecm_alloc_inst()
[all …]
Df_obex.c389 struct f_serial_opts *opts = to_f_serial_opts(item); in obex_attr_release() local
391 usb_put_function_instance(&opts->func_inst); in obex_attr_release()
418 struct f_serial_opts *opts; in obex_free_inst() local
420 opts = container_of(f, struct f_serial_opts, func_inst); in obex_free_inst()
421 gserial_free_line(opts->port_num); in obex_free_inst()
422 kfree(opts); in obex_free_inst()
427 struct f_serial_opts *opts; in obex_alloc_inst() local
430 opts = kzalloc(sizeof(*opts), GFP_KERNEL); in obex_alloc_inst()
431 if (!opts) in obex_alloc_inst()
434 opts->func_inst.free_func_inst = obex_free_inst; in obex_alloc_inst()
[all …]
/drivers/nvme/host/
Dfabrics.c107 if (ctrl->opts->mask & NVMF_OPT_TRADDR) in nvmf_get_address()
108 len += snprintf(buf, size, "traddr=%s", ctrl->opts->traddr); in nvmf_get_address()
109 if (ctrl->opts->mask & NVMF_OPT_TRSVCID) in nvmf_get_address()
111 (len) ? "," : "", ctrl->opts->trsvcid); in nvmf_get_address()
112 if (ctrl->opts->mask & NVMF_OPT_HOST_TRADDR) in nvmf_get_address()
114 (len) ? "," : "", ctrl->opts->host_traddr); in nvmf_get_address()
387 if (ctrl->opts->disable_sqflow) in nvmf_connect_admin_queue()
394 uuid_copy(&data->hostid, &ctrl->opts->host->id); in nvmf_connect_admin_queue()
396 strncpy(data->subsysnqn, ctrl->opts->subsysnqn, NVMF_NQN_SIZE); in nvmf_connect_admin_queue()
397 strncpy(data->hostnqn, ctrl->opts->host->nqn, NVMF_NQN_SIZE); in nvmf_connect_admin_queue()
[all …]
Dfabrics.h148 struct nvmf_ctrl_options *opts);
153 struct nvmf_ctrl_options *opts) in nvmf_ctlr_matches_baseopts() argument
157 strcmp(opts->subsysnqn, ctrl->opts->subsysnqn) || in nvmf_ctlr_matches_baseopts()
158 strcmp(opts->host->nqn, ctrl->opts->host->nqn) || in nvmf_ctlr_matches_baseopts()
159 memcmp(&opts->host->id, &ctrl->opts->host->id, sizeof(uuid_t))) in nvmf_ctlr_matches_baseopts()
172 void nvmf_free_options(struct nvmf_ctrl_options *opts);
180 struct nvmf_ctrl_options *opts);
/drivers/net/ppp/
Dppp_mppe.h34 #define MPPE_OPTS_TO_CI(opts, ci) \ argument
39 if (opts & MPPE_OPT_STATEFUL) \
48 if (opts & MPPE_OPT_128) \
50 if (opts & MPPE_OPT_40) \
56 #define MPPE_CI_TO_OPTS(ci, opts) \ argument
60 opts = 0; \
64 opts |= MPPE_OPT_STATEFUL; \
68 opts |= MPPE_OPT_128; \
70 opts |= MPPE_OPT_40; \
74 opts |= MPPE_OPT_56; \
[all …]
/drivers/usb/gadget/legacy/
Dmass_storage.c108 struct fsg_opts *opts; in msg_do_config() local
116 opts = fsg_opts_from_func_inst(fi_msg); in msg_do_config()
144 struct fsg_opts *opts; in msg_bind() local
153 opts = fsg_opts_from_func_inst(fi_msg); in msg_bind()
155 opts->no_configfs = true; in msg_bind()
156 status = fsg_common_set_num_buffers(opts->common, fsg_num_buffers); in msg_bind()
160 status = fsg_common_set_cdev(opts->common, cdev, config.can_stall); in msg_bind()
164 fsg_common_set_sysfs(opts->common, true); in msg_bind()
165 status = fsg_common_create_luns(opts->common, &config); in msg_bind()
169 fsg_common_set_inquiry_string(opts->common, config.vendor_name, in msg_bind()
[all …]
Dacm_ms.c108 struct fsg_opts *opts; in acm_ms_do_config() local
116 opts = fsg_opts_from_func_inst(fi_msg); in acm_ms_do_config()
158 struct fsg_opts *opts; in acm_ms_bind() local
174 opts = fsg_opts_from_func_inst(fi_msg); in acm_ms_bind()
176 opts->no_configfs = true; in acm_ms_bind()
177 status = fsg_common_set_num_buffers(opts->common, fsg_num_buffers); in acm_ms_bind()
181 status = fsg_common_set_cdev(opts->common, cdev, config.can_stall); in acm_ms_bind()
185 fsg_common_set_sysfs(opts->common, true); in acm_ms_bind()
186 status = fsg_common_create_luns(opts->common, &config); in acm_ms_bind()
190 fsg_common_set_inquiry_string(opts->common, config.vendor_name, in acm_ms_bind()
[all …]
/drivers/crypto/caam/
Dqi.c179 struct qm_mcc_initfq opts; in create_caam_req_fq() local
195 memset(&opts, 0, sizeof(opts)); in create_caam_req_fq()
196 opts.we_mask = cpu_to_be16(QM_INITFQ_WE_FQCTRL | QM_INITFQ_WE_DESTWQ | in create_caam_req_fq()
199 opts.fqd.fq_ctrl = cpu_to_be16(QM_FQCTRL_CPCSTASH | QM_FQCTRL_CGE); in create_caam_req_fq()
200 qm_fqd_set_destwq(&opts.fqd, qm_channel_caam, 2); in create_caam_req_fq()
201 opts.fqd.context_b = cpu_to_be32(qman_fq_fqid(rsp_fq)); in create_caam_req_fq()
202 qm_fqd_context_a_set64(&opts.fqd, hwdesc); in create_caam_req_fq()
203 opts.fqd.cgid = qipriv.cgr.cgrid; in create_caam_req_fq()
205 ret = qman_init_fq(req_fq, fq_sched_flag, &opts); in create_caam_req_fq()
606 struct qm_mcc_initfq opts; in alloc_rsp_fq_cpu() local
[all …]
/drivers/nvme/target/
Dfcloop.c47 fcloop_parse_options(struct fcloop_ctrl_options *opts, in fcloop_parse_options() argument
64 opts->mask |= token; in fcloop_parse_options()
71 opts->wwnn = token64; in fcloop_parse_options()
78 opts->wwpn = token64; in fcloop_parse_options()
85 opts->roles = token; in fcloop_parse_options()
92 opts->fcaddr = token; in fcloop_parse_options()
99 opts->lpwwnn = token64; in fcloop_parse_options()
106 opts->lpwwpn = token64; in fcloop_parse_options()
895 struct fcloop_ctrl_options *opts; in fcloop_create_local_port() local
906 opts = kzalloc(sizeof(*opts), GFP_KERNEL); in fcloop_create_local_port()
[all …]

1234