Lines Matching +full:0 +full:- +full:1023

1 // SPDX-License-Identifier: GPL-2.0+
3 * f_sourcesink.c - USB peripheral source/sink configuration driver
5 * Copyright (C) 2003-2008 David Brownell
30 * plus two that support control-OUT tests. If the optional "autoresume"
32 * test harness from USB-IF.
58 /*-------------------------------------------------------------------------*/
64 .bAlternateSetting = 0,
104 .wMaxPacketSize = cpu_to_le16(1023),
114 .wMaxPacketSize = cpu_to_le16(1023),
194 .bMaxBurst = 0,
195 .bmAttributes = 0,
196 .wBytesPerInterval = 0,
211 .bMaxBurst = 0,
212 .bmAttributes = 0,
213 .wBytesPerInterval = 0,
229 .bMaxBurst = 0,
230 .bmAttributes = 0,
247 .bMaxBurst = 0,
248 .bmAttributes = 0,
271 /* function-specific strings: */
274 [0].s = "source and sink data",
279 .language = 0x0409, /* en-us */
288 /*-------------------------------------------------------------------------*/
300 if (value < 0) in disable_ep()
301 DBG(cdev, "disable %s --> %d\n", ep->name, value); in disable_ep()
319 struct usb_composite_dev *cdev = c->cdev; in sourcesink_bind()
326 if (id < 0) in sourcesink_bind()
332 ss->in_ep = usb_ep_autoconfig(cdev->gadget, &fs_source_desc); in sourcesink_bind()
333 if (!ss->in_ep) { in sourcesink_bind()
336 f->name, cdev->gadget->name); in sourcesink_bind()
337 return -ENODEV; in sourcesink_bind()
340 ss->out_ep = usb_ep_autoconfig(cdev->gadget, &fs_sink_desc); in sourcesink_bind()
341 if (!ss->out_ep) in sourcesink_bind()
345 if (ss->isoc_interval < 1) in sourcesink_bind()
346 ss->isoc_interval = 1; in sourcesink_bind()
347 if (ss->isoc_interval > 16) in sourcesink_bind()
348 ss->isoc_interval = 16; in sourcesink_bind()
349 if (ss->isoc_mult > 2) in sourcesink_bind()
350 ss->isoc_mult = 2; in sourcesink_bind()
351 if (ss->isoc_maxburst > 15) in sourcesink_bind()
352 ss->isoc_maxburst = 15; in sourcesink_bind()
355 fs_iso_source_desc.wMaxPacketSize = ss->isoc_maxpacket > 1023 ? in sourcesink_bind()
356 1023 : ss->isoc_maxpacket; in sourcesink_bind()
357 fs_iso_source_desc.bInterval = ss->isoc_interval; in sourcesink_bind()
358 fs_iso_sink_desc.wMaxPacketSize = ss->isoc_maxpacket > 1023 ? in sourcesink_bind()
359 1023 : ss->isoc_maxpacket; in sourcesink_bind()
360 fs_iso_sink_desc.bInterval = ss->isoc_interval; in sourcesink_bind()
363 ss->iso_in_ep = usb_ep_autoconfig(cdev->gadget, &fs_iso_source_desc); in sourcesink_bind()
364 if (!ss->iso_in_ep) in sourcesink_bind()
367 ss->iso_out_ep = usb_ep_autoconfig(cdev->gadget, &fs_iso_sink_desc); in sourcesink_bind()
368 if (!ss->iso_out_ep) { in sourcesink_bind()
369 usb_ep_autoconfig_release(ss->iso_in_ep); in sourcesink_bind()
370 ss->iso_in_ep = NULL; in sourcesink_bind()
382 if (ss->isoc_maxpacket > 1024) in sourcesink_bind()
383 ss->isoc_maxpacket = 1024; in sourcesink_bind()
394 hs_iso_source_desc.wMaxPacketSize = ss->isoc_maxpacket; in sourcesink_bind()
395 hs_iso_source_desc.wMaxPacketSize |= ss->isoc_mult << 11; in sourcesink_bind()
396 hs_iso_source_desc.bInterval = ss->isoc_interval; in sourcesink_bind()
400 hs_iso_sink_desc.wMaxPacketSize = ss->isoc_maxpacket; in sourcesink_bind()
401 hs_iso_sink_desc.wMaxPacketSize |= ss->isoc_mult << 11; in sourcesink_bind()
402 hs_iso_sink_desc.bInterval = ss->isoc_interval; in sourcesink_bind()
416 ss_iso_source_desc.wMaxPacketSize = ss->isoc_maxpacket; in sourcesink_bind()
417 ss_iso_source_desc.bInterval = ss->isoc_interval; in sourcesink_bind()
418 ss_iso_source_comp_desc.bmAttributes = ss->isoc_mult; in sourcesink_bind()
419 ss_iso_source_comp_desc.bMaxBurst = ss->isoc_maxburst; in sourcesink_bind()
420 ss_iso_source_comp_desc.wBytesPerInterval = ss->isoc_maxpacket * in sourcesink_bind()
421 (ss->isoc_mult + 1) * (ss->isoc_maxburst + 1); in sourcesink_bind()
425 ss_iso_sink_desc.wMaxPacketSize = ss->isoc_maxpacket; in sourcesink_bind()
426 ss_iso_sink_desc.bInterval = ss->isoc_interval; in sourcesink_bind()
427 ss_iso_sink_comp_desc.bmAttributes = ss->isoc_mult; in sourcesink_bind()
428 ss_iso_sink_comp_desc.bMaxBurst = ss->isoc_maxburst; in sourcesink_bind()
429 ss_iso_sink_comp_desc.wBytesPerInterval = ss->isoc_maxpacket * in sourcesink_bind()
430 (ss->isoc_mult + 1) * (ss->isoc_maxburst + 1); in sourcesink_bind()
439 DBG(cdev, "%s speed %s: IN/%s, OUT/%s, ISO-IN/%s, ISO-OUT/%s\n", in sourcesink_bind()
440 (gadget_is_superspeed(c->cdev->gadget) ? "super" : in sourcesink_bind()
441 (gadget_is_dualspeed(c->cdev->gadget) ? "dual" : "full")), in sourcesink_bind()
442 f->name, ss->in_ep->name, ss->out_ep->name, in sourcesink_bind()
443 ss->iso_in_ep ? ss->iso_in_ep->name : "<none>", in sourcesink_bind()
444 ss->iso_out_ep ? ss->iso_out_ep->name : "<none>"); in sourcesink_bind()
445 return 0; in sourcesink_bind()
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()
467 u8 *buf = req->buf; in check_read_data()
468 struct usb_composite_dev *cdev = ss->function.config->cdev; in check_read_data()
469 int max_packet_size = le16_to_cpu(ss->out_ep->desc->wMaxPacketSize); in check_read_data()
471 if (ss->pattern == 2) in check_read_data()
472 return 0; in check_read_data()
474 for (i = 0; i < req->actual; i++, buf++) { in check_read_data()
475 switch (ss->pattern) { in check_read_data()
477 /* all-zeroes has no synchronization issues */ in check_read_data()
478 case 0: in check_read_data()
479 if (*buf == 0) in check_read_data()
483 /* "mod63" stays in sync with short-terminated transfers, in check_read_data()
496 usb_ep_set_halt(ss->out_ep); in check_read_data()
497 return -EINVAL; in check_read_data()
499 return 0; in check_read_data()
505 u8 *buf = req->buf; in reinit_write_data()
506 int max_packet_size = le16_to_cpu(ep->desc->wMaxPacketSize); in reinit_write_data()
507 struct f_sourcesink *ss = ep->driver_data; in reinit_write_data()
509 switch (ss->pattern) { in reinit_write_data()
510 case 0: in reinit_write_data()
511 memset(req->buf, 0, req->length); in reinit_write_data()
514 for (i = 0; i < req->length; i++) in reinit_write_data()
525 struct f_sourcesink *ss = ep->driver_data; in source_sink_complete()
526 int status = req->status; in source_sink_complete()
532 cdev = ss->function.config->cdev; in source_sink_complete()
536 case 0: /* normal completion? */ in source_sink_complete()
537 if (ep == ss->out_ep) { in source_sink_complete()
539 if (ss->pattern != 2) in source_sink_complete()
540 memset(req->buf, 0x55, req->length); in source_sink_complete()
545 case -ECONNABORTED: /* hardware forced ep reset */ in source_sink_complete()
546 case -ECONNRESET: /* request dequeued */ in source_sink_complete()
547 case -ESHUTDOWN: /* disconnect from host */ in source_sink_complete()
548 VDBG(cdev, "%s gone (%d), %d/%d\n", ep->name, status, in source_sink_complete()
549 req->actual, req->length); in source_sink_complete()
550 if (ep == ss->out_ep) in source_sink_complete()
555 case -EOVERFLOW: /* buffer overrun on read means that in source_sink_complete()
561 DBG(cdev, "%s complete --> %d, %d/%d\n", ep->name, in source_sink_complete()
562 status, req->actual, req->length); in source_sink_complete()
565 case -EREMOTEIO: /* short read */ in source_sink_complete()
571 ERROR(cdev, "kill %s: resubmit %d bytes --> %d\n", in source_sink_complete()
572 ep->name, req->length, status); in source_sink_complete()
583 int i, size, qlen, status = 0; in source_sink_start_ep()
589 size = ss->isoc_maxpacket * in source_sink_start_ep()
590 (ss->isoc_mult + 1) * in source_sink_start_ep()
591 (ss->isoc_maxburst + 1); in source_sink_start_ep()
594 size = ss->isoc_maxpacket * (ss->isoc_mult + 1); in source_sink_start_ep()
597 size = ss->isoc_maxpacket > 1023 ? in source_sink_start_ep()
598 1023 : ss->isoc_maxpacket; in source_sink_start_ep()
601 ep = is_in ? ss->iso_in_ep : ss->iso_out_ep; in source_sink_start_ep()
602 qlen = ss->iso_qlen; in source_sink_start_ep()
604 ep = is_in ? ss->in_ep : ss->out_ep; in source_sink_start_ep()
605 qlen = ss->bulk_qlen; in source_sink_start_ep()
606 size = ss->buflen; in source_sink_start_ep()
609 for (i = 0; i < qlen; i++) { in source_sink_start_ep()
612 return -ENOMEM; in source_sink_start_ep()
614 req->complete = source_sink_complete; in source_sink_start_ep()
617 else if (ss->pattern != 2) in source_sink_start_ep()
618 memset(req->buf, 0x55, req->length); in source_sink_start_ep()
624 cdev = ss->function.config->cdev; in source_sink_start_ep()
625 ERROR(cdev, "start %s%s %s --> %d\n", in source_sink_start_ep()
626 is_iso ? "ISO-" : "", is_in ? "IN" : "OUT", in source_sink_start_ep()
627 ep->name, status); in source_sink_start_ep()
640 cdev = ss->function.config->cdev; in disable_source_sink()
641 disable_endpoints(cdev, ss->in_ep, ss->out_ep, ss->iso_in_ep, in disable_source_sink()
642 ss->iso_out_ep); in disable_source_sink()
643 VDBG(cdev, "%s disabled\n", ss->function.name); in disable_source_sink()
650 int result = 0; in enable_source_sink()
651 int speed = cdev->gadget->speed; in enable_source_sink()
655 ep = ss->in_ep; in enable_source_sink()
656 result = config_ep_by_speed(cdev->gadget, &(ss->function), ep); in enable_source_sink()
660 if (result < 0) in enable_source_sink()
662 ep->driver_data = ss; in enable_source_sink()
665 if (result < 0) { in enable_source_sink()
667 ep = ss->in_ep; in enable_source_sink()
673 ep = ss->out_ep; in enable_source_sink()
674 result = config_ep_by_speed(cdev->gadget, &(ss->function), ep); in enable_source_sink()
678 if (result < 0) in enable_source_sink()
680 ep->driver_data = ss; in enable_source_sink()
683 if (result < 0) { in enable_source_sink()
685 ep = ss->out_ep; in enable_source_sink()
690 if (alt == 0) in enable_source_sink()
694 ep = ss->iso_in_ep; in enable_source_sink()
696 result = config_ep_by_speed(cdev->gadget, &(ss->function), ep); in enable_source_sink()
700 if (result < 0) in enable_source_sink()
702 ep->driver_data = ss; in enable_source_sink()
705 if (result < 0) { in enable_source_sink()
707 ep = ss->iso_in_ep; in enable_source_sink()
715 ep = ss->iso_out_ep; in enable_source_sink()
717 result = config_ep_by_speed(cdev->gadget, &(ss->function), ep); in enable_source_sink()
721 if (result < 0) in enable_source_sink()
723 ep->driver_data = ss; in enable_source_sink()
726 if (result < 0) { in enable_source_sink()
732 ss->cur_alt = alt; in enable_source_sink()
734 DBG(cdev, "%s enabled, alt intf %d\n", ss->function.name, alt); in enable_source_sink()
742 struct usb_composite_dev *cdev = f->config->cdev; in sourcesink_set_alt()
752 return ss->cur_alt; in sourcesink_get_alt()
762 /*-------------------------------------------------------------------------*/
767 struct usb_configuration *c = f->config; in sourcesink_setup()
768 struct usb_request *req = c->cdev->req; in sourcesink_setup()
769 int value = -EOPNOTSUPP; in sourcesink_setup()
770 u16 w_index = le16_to_cpu(ctrl->wIndex); in sourcesink_setup()
771 u16 w_value = le16_to_cpu(ctrl->wValue); in sourcesink_setup()
772 u16 w_length = le16_to_cpu(ctrl->wLength); in sourcesink_setup()
774 req->length = USB_COMP_EP0_BUFSIZ; in sourcesink_setup()
779 switch (ctrl->bRequest) { in sourcesink_setup()
782 * These are the same vendor-specific requests supported by in sourcesink_setup()
784 * device spec by allowing multiple-packet requests. in sourcesink_setup()
786 * NOTE: the Control-OUT data stays in req->buf ... better in sourcesink_setup()
790 case 0x5b: /* control WRITE test -- fill the buffer */ in sourcesink_setup()
791 if (ctrl->bRequestType != (USB_DIR_OUT|USB_TYPE_VENDOR)) in sourcesink_setup()
796 if (w_length > req->length) in sourcesink_setup()
800 case 0x5c: /* control READ test -- return the buffer */ in sourcesink_setup()
801 if (ctrl->bRequestType != (USB_DIR_IN|USB_TYPE_VENDOR)) in sourcesink_setup()
806 if (w_length > req->length) in sourcesink_setup()
813 VDBG(c->cdev, in sourcesink_setup()
815 ctrl->bRequestType, ctrl->bRequest, in sourcesink_setup()
820 if (value >= 0) { in sourcesink_setup()
821 VDBG(c->cdev, "source/sink req%02x.%02x v%04x i%04x l%d\n", in sourcesink_setup()
822 ctrl->bRequestType, ctrl->bRequest, in sourcesink_setup()
824 req->zero = 0; in sourcesink_setup()
825 req->length = value; in sourcesink_setup()
826 value = usb_ep_queue(c->cdev->gadget->ep0, req, GFP_ATOMIC); in sourcesink_setup()
827 if (value < 0) in sourcesink_setup()
828 ERROR(c->cdev, "source/sink response, err %d\n", in sourcesink_setup()
832 /* device either stalls (value < 0) or reports success */ in sourcesink_setup()
844 return ERR_PTR(-ENOMEM); in source_sink_alloc_func()
848 mutex_lock(&ss_opts->lock); in source_sink_alloc_func()
849 ss_opts->refcnt++; in source_sink_alloc_func()
850 mutex_unlock(&ss_opts->lock); in source_sink_alloc_func()
852 ss->pattern = ss_opts->pattern; in source_sink_alloc_func()
853 ss->isoc_interval = ss_opts->isoc_interval; in source_sink_alloc_func()
854 ss->isoc_maxpacket = ss_opts->isoc_maxpacket; in source_sink_alloc_func()
855 ss->isoc_mult = ss_opts->isoc_mult; in source_sink_alloc_func()
856 ss->isoc_maxburst = ss_opts->isoc_maxburst; in source_sink_alloc_func()
857 ss->buflen = ss_opts->bulk_buflen; in source_sink_alloc_func()
858 ss->bulk_qlen = ss_opts->bulk_qlen; in source_sink_alloc_func()
859 ss->iso_qlen = ss_opts->iso_qlen; in source_sink_alloc_func()
861 ss->function.name = "source/sink"; in source_sink_alloc_func()
862 ss->function.bind = sourcesink_bind; in source_sink_alloc_func()
863 ss->function.set_alt = sourcesink_set_alt; in source_sink_alloc_func()
864 ss->function.get_alt = sourcesink_get_alt; in source_sink_alloc_func()
865 ss->function.disable = sourcesink_disable; in source_sink_alloc_func()
866 ss->function.setup = sourcesink_setup; in source_sink_alloc_func()
867 ss->function.strings = sourcesink_strings; in source_sink_alloc_func()
869 ss->function.free_func = sourcesink_free_func; in source_sink_alloc_func()
871 return &ss->function; in source_sink_alloc_func()
884 usb_put_function_instance(&ss_opts->func_inst); in ss_attr_release()
896 mutex_lock(&opts->lock); in f_ss_opts_pattern_show()
897 result = sprintf(page, "%u\n", opts->pattern); in f_ss_opts_pattern_show()
898 mutex_unlock(&opts->lock); in f_ss_opts_pattern_show()
910 mutex_lock(&opts->lock); in f_ss_opts_pattern_store()
911 if (opts->refcnt) { in f_ss_opts_pattern_store()
912 ret = -EBUSY; in f_ss_opts_pattern_store()
916 ret = kstrtou8(page, 0, &num); in f_ss_opts_pattern_store()
920 if (num != 0 && num != 1 && num != 2) { in f_ss_opts_pattern_store()
921 ret = -EINVAL; in f_ss_opts_pattern_store()
925 opts->pattern = num; in f_ss_opts_pattern_store()
928 mutex_unlock(&opts->lock); in f_ss_opts_pattern_store()
939 mutex_lock(&opts->lock); in f_ss_opts_isoc_interval_show()
940 result = sprintf(page, "%u\n", opts->isoc_interval); in f_ss_opts_isoc_interval_show()
941 mutex_unlock(&opts->lock); in f_ss_opts_isoc_interval_show()
953 mutex_lock(&opts->lock); in f_ss_opts_isoc_interval_store()
954 if (opts->refcnt) { in f_ss_opts_isoc_interval_store()
955 ret = -EBUSY; in f_ss_opts_isoc_interval_store()
959 ret = kstrtou8(page, 0, &num); in f_ss_opts_isoc_interval_store()
964 ret = -EINVAL; in f_ss_opts_isoc_interval_store()
968 opts->isoc_interval = num; in f_ss_opts_isoc_interval_store()
971 mutex_unlock(&opts->lock); in f_ss_opts_isoc_interval_store()
982 mutex_lock(&opts->lock); in f_ss_opts_isoc_maxpacket_show()
983 result = sprintf(page, "%u\n", opts->isoc_maxpacket); in f_ss_opts_isoc_maxpacket_show()
984 mutex_unlock(&opts->lock); in f_ss_opts_isoc_maxpacket_show()
996 mutex_lock(&opts->lock); in f_ss_opts_isoc_maxpacket_store()
997 if (opts->refcnt) { in f_ss_opts_isoc_maxpacket_store()
998 ret = -EBUSY; in f_ss_opts_isoc_maxpacket_store()
1002 ret = kstrtou16(page, 0, &num); in f_ss_opts_isoc_maxpacket_store()
1007 ret = -EINVAL; in f_ss_opts_isoc_maxpacket_store()
1011 opts->isoc_maxpacket = num; in f_ss_opts_isoc_maxpacket_store()
1014 mutex_unlock(&opts->lock); in f_ss_opts_isoc_maxpacket_store()
1025 mutex_lock(&opts->lock); in f_ss_opts_isoc_mult_show()
1026 result = sprintf(page, "%u\n", opts->isoc_mult); in f_ss_opts_isoc_mult_show()
1027 mutex_unlock(&opts->lock); in f_ss_opts_isoc_mult_show()
1039 mutex_lock(&opts->lock); in f_ss_opts_isoc_mult_store()
1040 if (opts->refcnt) { in f_ss_opts_isoc_mult_store()
1041 ret = -EBUSY; in f_ss_opts_isoc_mult_store()
1045 ret = kstrtou8(page, 0, &num); in f_ss_opts_isoc_mult_store()
1050 ret = -EINVAL; in f_ss_opts_isoc_mult_store()
1054 opts->isoc_mult = num; in f_ss_opts_isoc_mult_store()
1057 mutex_unlock(&opts->lock); in f_ss_opts_isoc_mult_store()
1068 mutex_lock(&opts->lock); in f_ss_opts_isoc_maxburst_show()
1069 result = sprintf(page, "%u\n", opts->isoc_maxburst); in f_ss_opts_isoc_maxburst_show()
1070 mutex_unlock(&opts->lock); in f_ss_opts_isoc_maxburst_show()
1082 mutex_lock(&opts->lock); in f_ss_opts_isoc_maxburst_store()
1083 if (opts->refcnt) { in f_ss_opts_isoc_maxburst_store()
1084 ret = -EBUSY; in f_ss_opts_isoc_maxburst_store()
1088 ret = kstrtou8(page, 0, &num); in f_ss_opts_isoc_maxburst_store()
1093 ret = -EINVAL; in f_ss_opts_isoc_maxburst_store()
1097 opts->isoc_maxburst = num; in f_ss_opts_isoc_maxburst_store()
1100 mutex_unlock(&opts->lock); in f_ss_opts_isoc_maxburst_store()
1111 mutex_lock(&opts->lock); in f_ss_opts_bulk_buflen_show()
1112 result = sprintf(page, "%u\n", opts->bulk_buflen); in f_ss_opts_bulk_buflen_show()
1113 mutex_unlock(&opts->lock); in f_ss_opts_bulk_buflen_show()
1125 mutex_lock(&opts->lock); in f_ss_opts_bulk_buflen_store()
1126 if (opts->refcnt) { in f_ss_opts_bulk_buflen_store()
1127 ret = -EBUSY; in f_ss_opts_bulk_buflen_store()
1131 ret = kstrtou32(page, 0, &num); in f_ss_opts_bulk_buflen_store()
1135 opts->bulk_buflen = num; in f_ss_opts_bulk_buflen_store()
1138 mutex_unlock(&opts->lock); in f_ss_opts_bulk_buflen_store()
1149 mutex_lock(&opts->lock); in f_ss_opts_bulk_qlen_show()
1150 result = sprintf(page, "%u\n", opts->bulk_qlen); in f_ss_opts_bulk_qlen_show()
1151 mutex_unlock(&opts->lock); in f_ss_opts_bulk_qlen_show()
1163 mutex_lock(&opts->lock); in f_ss_opts_bulk_qlen_store()
1164 if (opts->refcnt) { in f_ss_opts_bulk_qlen_store()
1165 ret = -EBUSY; in f_ss_opts_bulk_qlen_store()
1169 ret = kstrtou32(page, 0, &num); in f_ss_opts_bulk_qlen_store()
1173 opts->bulk_qlen = num; in f_ss_opts_bulk_qlen_store()
1176 mutex_unlock(&opts->lock); in f_ss_opts_bulk_qlen_store()
1187 mutex_lock(&opts->lock); in f_ss_opts_iso_qlen_show()
1188 result = sprintf(page, "%u\n", opts->iso_qlen); in f_ss_opts_iso_qlen_show()
1189 mutex_unlock(&opts->lock); in f_ss_opts_iso_qlen_show()
1201 mutex_lock(&opts->lock); in f_ss_opts_iso_qlen_store()
1202 if (opts->refcnt) { in f_ss_opts_iso_qlen_store()
1203 ret = -EBUSY; in f_ss_opts_iso_qlen_store()
1207 ret = kstrtou32(page, 0, &num); in f_ss_opts_iso_qlen_store()
1211 opts->iso_qlen = num; in f_ss_opts_iso_qlen_store()
1214 mutex_unlock(&opts->lock); in f_ss_opts_iso_qlen_store()
1252 return ERR_PTR(-ENOMEM); in source_sink_alloc_inst()
1253 mutex_init(&ss_opts->lock); in source_sink_alloc_inst()
1254 ss_opts->func_inst.free_func_inst = source_sink_free_instance; in source_sink_alloc_inst()
1255 ss_opts->isoc_interval = GZERO_ISOC_INTERVAL; in source_sink_alloc_inst()
1256 ss_opts->isoc_maxpacket = GZERO_ISOC_MAXPACKET; in source_sink_alloc_inst()
1257 ss_opts->bulk_buflen = GZERO_BULK_BUFLEN; in source_sink_alloc_inst()
1258 ss_opts->bulk_qlen = GZERO_SS_BULK_QLEN; in source_sink_alloc_inst()
1259 ss_opts->iso_qlen = GZERO_SS_ISO_QLEN; in source_sink_alloc_inst()
1261 config_group_init_type_name(&ss_opts->func_inst.group, "", in source_sink_alloc_inst()
1264 return &ss_opts->func_inst; in source_sink_alloc_inst()