/drivers/usb/gadget/function/ |
D | u_ether_configfs.h | 19 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 …]
|
D | uvc_configfs.c | 146 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 …]
|
D | f_uac1.c | 434 struct f_uac1_opts *opts = g_audio_to_uac1_opts(audio); in in_rq_cur() local 442 if ((FUIN_EN(opts) && (entity_id == USB_IN_FU_ID)) || in in_rq_cur() 443 (FUOUT_EN(opts) && (entity_id == USB_OUT_FU_ID))) { in in_rq_cur() 446 if (FUIN_EN(opts) && (entity_id == USB_IN_FU_ID)) in in_rq_cur() 485 struct f_uac1_opts *opts = g_audio_to_uac1_opts(audio); in in_rq_min() local 493 if ((FUIN_EN(opts) && (entity_id == USB_IN_FU_ID)) || in in_rq_min() 494 (FUOUT_EN(opts) && (entity_id == USB_OUT_FU_ID))) { in in_rq_min() 497 if (FUIN_EN(opts) && (entity_id == USB_IN_FU_ID)) in in_rq_min() 505 min_db = opts->p_volume_min; in in_rq_min() 507 min_db = opts->c_volume_min; in in_rq_min() [all …]
|
D | f_uac2.c | 749 static void setup_headers(struct f_uac2_opts *opts, in setup_headers() argument 791 if (EPIN_EN(opts)) in setup_headers() 793 if (EPOUT_EN(opts)) { in setup_headers() 797 if (FUOUT_EN(opts)) in setup_headers() 801 if (EPIN_EN(opts)) { in setup_headers() 804 if (FUIN_EN(opts)) in setup_headers() 810 if (EPOUT_EN(opts)) in setup_headers() 813 if (FUOUT_EN(opts) || FUIN_EN(opts)) { in setup_headers() 819 if (EPOUT_EN(opts)) { in setup_headers() 830 if (EPOUT_FBACK_IN_EN(opts)) { in setup_headers() [all …]
|
D | f_uvc.c | 595 struct f_uvc_opts *opts; in uvc_function_bind() local 600 opts = fi_to_f_uvc_opts(f->fi); in uvc_function_bind() 603 opts->streaming_interval = clamp(opts->streaming_interval, 1U, 16U); in uvc_function_bind() 604 opts->streaming_maxpacket = clamp(opts->streaming_maxpacket, 1U, 3072U); in uvc_function_bind() 605 opts->streaming_maxburst = min(opts->streaming_maxburst, 15U); in uvc_function_bind() 608 if (opts->streaming_maxburst && in uvc_function_bind() 609 (opts->streaming_maxpacket % 1024) != 0) { in uvc_function_bind() 610 opts->streaming_maxpacket = roundup(opts->streaming_maxpacket, 1024); in uvc_function_bind() 612 opts->streaming_maxpacket); in uvc_function_bind() 621 if (opts->streaming_maxpacket <= 1024) { in uvc_function_bind() [all …]
|
D | f_uac1_legacy.c | 326 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() 580 struct f_uac1_legacy_opts *opts; in f_audio_set_alt() local 586 opts = container_of(f->fi, struct f_uac1_legacy_opts, func_inst); in f_audio_set_alt() 587 req_buf_size = opts->req_buf_size; in f_audio_set_alt() 588 req_count = opts->req_count; in f_audio_set_alt() 589 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 …]
|
D | f_sourcesink.c | 451 struct f_ss_opts *opts; in sourcesink_free_func() local 453 opts = container_of(f->fi, struct f_ss_opts, func_inst); in sourcesink_free_func() 455 mutex_lock(&opts->lock); in sourcesink_free_func() 456 opts->refcnt--; in sourcesink_free_func() 457 mutex_unlock(&opts->lock); in sourcesink_free_func() 892 struct f_ss_opts *opts = to_f_ss_opts(item); in f_ss_opts_pattern_show() local 895 mutex_lock(&opts->lock); in f_ss_opts_pattern_show() 896 result = sprintf(page, "%u\n", opts->pattern); in f_ss_opts_pattern_show() 897 mutex_unlock(&opts->lock); in f_ss_opts_pattern_show() 905 struct f_ss_opts *opts = to_f_ss_opts(item); in f_ss_opts_pattern_store() local [all …]
|
D | f_midi.c | 1082 struct f_midi_opts *opts = to_f_midi_opts(item); in midi_attr_release() local 1084 usb_put_function_instance(&opts->func_inst); in midi_attr_release() 1094 struct f_midi_opts *opts = to_f_midi_opts(item); \ 1097 mutex_lock(&opts->lock); \ 1098 result = sprintf(page, "%d\n", opts->name); \ 1099 mutex_unlock(&opts->lock); \ 1107 struct f_midi_opts *opts = to_f_midi_opts(item); \ 1111 mutex_lock(&opts->lock); \ 1112 if (opts->refcnt > 1) { \ 1125 opts->name = num; \ [all …]
|
D | f_rndis.c | 839 struct f_rndis_opts *opts; in rndis_borrow_net() local 841 opts = container_of(f, struct f_rndis_opts, func_inst); in rndis_borrow_net() 842 if (opts->bound) in rndis_borrow_net() 843 gether_cleanup(netdev_priv(opts->net)); in rndis_borrow_net() 845 free_netdev(opts->net); in rndis_borrow_net() 846 opts->borrowed_net = opts->bound = true; in rndis_borrow_net() 847 opts->net = net; in rndis_borrow_net() 900 struct f_rndis_opts *opts; in rndis_free_inst() local 902 opts = container_of(f, struct f_rndis_opts, func_inst); in rndis_free_inst() 903 if (!opts->borrowed_net) { in rndis_free_inst() [all …]
|
D | f_hid.c | 1045 struct f_hid_opts *opts = to_f_hid_opts(item); in hid_attr_release() local 1047 usb_put_function_instance(&opts->func_inst); in hid_attr_release() 1057 struct f_hid_opts *opts = to_f_hid_opts(item); \ 1060 mutex_lock(&opts->lock); \ 1061 result = sprintf(page, "%d\n", opts->name); \ 1062 mutex_unlock(&opts->lock); \ 1070 struct f_hid_opts *opts = to_f_hid_opts(item); \ 1074 mutex_lock(&opts->lock); \ 1075 if (opts->refcnt) { \ 1088 opts->name = num; \ [all …]
|
D | f_subset.c | 419 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 …]
|
D | f_ncm.c | 968 const struct ndp_parser_opts *opts = ncm->parser_opts; in package_for_tx() local 970 const int dgram_idx_len = 2 * 2 * opts->dgram_item_len; in package_for_tx() 984 put_ncm(&ntb_iter, opts->block_length, new_len); in package_for_tx() 985 put_ncm(&ntb_iter, opts->ndp_index, ndp_index); in package_for_tx() 988 new_len = opts->ndp_size + in package_for_tx() 1028 const struct ndp_parser_opts *opts = ncm->parser_opts; in ncm_wrap_ntb() local 1032 const int dgram_idx_len = 2 * 2 * opts->dgram_item_len; in ncm_wrap_ntb() 1067 ncb_len = opts->nth_size; in ncm_wrap_ntb() 1079 put_unaligned_le32(opts->nth_sign, ntb_data); in ncm_wrap_ntb() 1082 put_unaligned_le16(opts->nth_size, ntb_data++); in ncm_wrap_ntb() [all …]
|
D | f_eem.c | 594 struct f_eem_opts *opts; in eem_free_inst() local 596 opts = container_of(f, struct f_eem_opts, func_inst); in eem_free_inst() 597 if (opts->bound) in eem_free_inst() 598 gether_cleanup(netdev_priv(opts->net)); in eem_free_inst() 600 free_netdev(opts->net); in eem_free_inst() 601 kfree(opts); in eem_free_inst() 606 struct f_eem_opts *opts; in eem_alloc_inst() local 608 opts = kzalloc(sizeof(*opts), GFP_KERNEL); in eem_alloc_inst() 609 if (!opts) in eem_alloc_inst() 611 mutex_init(&opts->lock); in eem_alloc_inst() [all …]
|
D | f_printer.c | 1203 struct f_printer_opts *opts = to_f_printer_opts(item); in printer_attr_release() local 1205 usb_put_function_instance(&opts->func_inst); in printer_attr_release() 1215 struct f_printer_opts *opts = to_f_printer_opts(item); in f_printer_opts_pnp_string_show() local 1218 mutex_lock(&opts->lock); in f_printer_opts_pnp_string_show() 1219 if (!opts->pnp_string) in f_printer_opts_pnp_string_show() 1222 result = strlcpy(page, opts->pnp_string, PAGE_SIZE); in f_printer_opts_pnp_string_show() 1231 mutex_unlock(&opts->lock); in f_printer_opts_pnp_string_show() 1239 struct f_printer_opts *opts = to_f_printer_opts(item); in f_printer_opts_pnp_string_store() local 1243 mutex_lock(&opts->lock); in f_printer_opts_pnp_string_store() 1251 if (opts->pnp_string_allocated) in f_printer_opts_pnp_string_store() [all …]
|
D | f_serial.c | 260 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() 310 struct f_serial_opts *opts; in gser_free_inst() local 312 opts = container_of(f, struct f_serial_opts, func_inst); in gser_free_inst() 313 gserial_free_line(opts->port_num); in gser_free_inst() 314 kfree(opts); in gser_free_inst() 319 struct f_serial_opts *opts; in gser_alloc_inst() local 322 opts = kzalloc(sizeof(*opts), GFP_KERNEL); in gser_alloc_inst() 323 if (!opts) in gser_alloc_inst() 326 opts->func_inst.free_func_inst = gser_free_inst; in gser_alloc_inst() [all …]
|
D | f_loopback.c | 223 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 …]
|
D | f_ecm.c | 861 struct f_ecm_opts *opts; in ecm_free_inst() local 863 opts = container_of(f, struct f_ecm_opts, func_inst); in ecm_free_inst() 864 if (opts->bound) in ecm_free_inst() 865 gether_cleanup(netdev_priv(opts->net)); in ecm_free_inst() 867 free_netdev(opts->net); in ecm_free_inst() 868 kfree(opts); in ecm_free_inst() 873 struct f_ecm_opts *opts; in ecm_alloc_inst() local 875 opts = kzalloc(sizeof(*opts), GFP_KERNEL); in ecm_alloc_inst() 876 if (!opts) in ecm_alloc_inst() 878 mutex_init(&opts->lock); in ecm_alloc_inst() [all …]
|
D | f_obex.c | 389 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/ |
D | fabrics.c | 107 if (ctrl->opts->mask & NVMF_OPT_TRADDR) in nvmf_get_address() 108 len += scnprintf(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() 392 if (ctrl->opts->disable_sqflow) in nvmf_connect_admin_queue() 399 uuid_copy(&data->hostid, &ctrl->opts->host->id); in nvmf_connect_admin_queue() 401 strncpy(data->subsysnqn, ctrl->opts->subsysnqn, NVMF_NQN_SIZE); in nvmf_connect_admin_queue() 402 strncpy(data->hostnqn, ctrl->opts->host->nqn, NVMF_NQN_SIZE); in nvmf_connect_admin_queue() [all …]
|
D | fabrics.h | 148 struct nvmf_ctrl_options *opts); 153 struct nvmf_ctrl_options *opts) in nvmf_ctlr_matches_baseopts() argument 158 strcmp(opts->subsysnqn, ctrl->opts->subsysnqn) || in nvmf_ctlr_matches_baseopts() 159 strcmp(opts->host->nqn, ctrl->opts->host->nqn) || in nvmf_ctlr_matches_baseopts() 160 memcmp(&opts->host->id, &ctrl->opts->host->id, sizeof(uuid_t))) in nvmf_ctlr_matches_baseopts() 173 void nvmf_free_options(struct nvmf_ctrl_options *opts); 181 struct nvmf_ctrl_options *opts);
|
/drivers/net/ppp/ |
D | ppp_mppe.h | 34 #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/crypto/caam/ |
D | qi.c | 175 struct qm_mcc_initfq opts; in create_caam_req_fq() local 191 memset(&opts, 0, sizeof(opts)); in create_caam_req_fq() 192 opts.we_mask = cpu_to_be16(QM_INITFQ_WE_FQCTRL | QM_INITFQ_WE_DESTWQ | in create_caam_req_fq() 195 opts.fqd.fq_ctrl = cpu_to_be16(QM_FQCTRL_CPCSTASH | QM_FQCTRL_CGE); in create_caam_req_fq() 196 qm_fqd_set_destwq(&opts.fqd, qm_channel_caam, 2); in create_caam_req_fq() 197 opts.fqd.context_b = cpu_to_be32(qman_fq_fqid(rsp_fq)); in create_caam_req_fq() 198 qm_fqd_context_a_set64(&opts.fqd, hwdesc); in create_caam_req_fq() 199 opts.fqd.cgid = qipriv.cgr.cgrid; in create_caam_req_fq() 201 ret = qman_init_fq(req_fq, fq_sched_flag, &opts); in create_caam_req_fq() 616 struct qm_mcc_initfq opts; in alloc_rsp_fq_cpu() local [all …]
|
/drivers/usb/gadget/legacy/ |
D | mass_storage.c | 141 struct fsg_opts *opts; in msg_bind() local 150 opts = fsg_opts_from_func_inst(fi_msg); in msg_bind() 152 opts->no_configfs = true; in msg_bind() 153 status = fsg_common_set_num_buffers(opts->common, fsg_num_buffers); in msg_bind() 157 status = fsg_common_set_cdev(opts->common, cdev, config.can_stall); in msg_bind() 161 fsg_common_set_sysfs(opts->common, true); in msg_bind() 162 status = fsg_common_create_luns(opts->common, &config); in msg_bind() 166 fsg_common_set_inquiry_string(opts->common, config.vendor_name, in msg_bind() 198 fsg_common_remove_luns(opts->common); in msg_bind() 200 fsg_common_free_buffers(opts->common); in msg_bind()
|
D | acm_ms.c | 155 struct fsg_opts *opts; in acm_ms_bind() local 171 opts = fsg_opts_from_func_inst(fi_msg); in acm_ms_bind() 173 opts->no_configfs = true; in acm_ms_bind() 174 status = fsg_common_set_num_buffers(opts->common, fsg_num_buffers); in acm_ms_bind() 178 status = fsg_common_set_cdev(opts->common, cdev, config.can_stall); in acm_ms_bind() 182 fsg_common_set_sysfs(opts->common, true); in acm_ms_bind() 183 status = fsg_common_create_luns(opts->common, &config); in acm_ms_bind() 187 fsg_common_set_inquiry_string(opts->common, config.vendor_name, in acm_ms_bind() 227 fsg_common_remove_luns(opts->common); in acm_ms_bind() 229 fsg_common_free_buffers(opts->common); in acm_ms_bind()
|
/drivers/staging/vt6655/ |
D | device_main.c | 160 struct vnt_options *opts = &priv->opts; in device_get_options() local 162 opts->rx_descs0 = RX_DESC_DEF0; in device_get_options() 163 opts->rx_descs1 = RX_DESC_DEF1; in device_get_options() 164 opts->tx_descs[0] = TX_DESC_DEF0; in device_get_options() 165 opts->tx_descs[1] = TX_DESC_DEF1; in device_get_options() 166 opts->int_works = INT_WORKS_DEF; in device_get_options() 168 opts->short_retry = SHORT_RETRY_DEF; in device_get_options() 169 opts->long_retry = LONG_RETRY_DEF; in device_get_options() 170 opts->bbp_type = BBP_TYPE_DEF; in device_get_options() 176 priv->byShortRetryLimit = priv->opts.short_retry; in device_set_options() [all …]
|