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()
438 DBG(cdev, "%s speed %s: IN/%s, OUT/%s, ISO-IN/%s, ISO-OUT/%s\n", in sourcesink_bind()
439 (gadget_is_superspeed(c->cdev->gadget) ? "super" : in sourcesink_bind()
440 (gadget_is_dualspeed(c->cdev->gadget) ? "dual" : "full")), in sourcesink_bind()
441 f->name, ss->in_ep->name, ss->out_ep->name, in sourcesink_bind()
442 ss->iso_in_ep ? ss->iso_in_ep->name : "<none>", in sourcesink_bind()
443 ss->iso_out_ep ? ss->iso_out_ep->name : "<none>"); in sourcesink_bind()
444 return 0; in sourcesink_bind()
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()
466 u8 *buf = req->buf; in check_read_data()
467 struct usb_composite_dev *cdev = ss->function.config->cdev; in check_read_data()
468 int max_packet_size = le16_to_cpu(ss->out_ep->desc->wMaxPacketSize); in check_read_data()
470 if (ss->pattern == 2) in check_read_data()
471 return 0; in check_read_data()
473 for (i = 0; i < req->actual; i++, buf++) { in check_read_data()
474 switch (ss->pattern) { in check_read_data()
476 /* all-zeroes has no synchronization issues */ in check_read_data()
477 case 0: in check_read_data()
478 if (*buf == 0) in check_read_data()
482 /* "mod63" stays in sync with short-terminated transfers, in check_read_data()
495 usb_ep_set_halt(ss->out_ep); in check_read_data()
496 return -EINVAL; in check_read_data()
498 return 0; in check_read_data()
504 u8 *buf = req->buf; in reinit_write_data()
505 int max_packet_size = le16_to_cpu(ep->desc->wMaxPacketSize); in reinit_write_data()
506 struct f_sourcesink *ss = ep->driver_data; in reinit_write_data()
508 switch (ss->pattern) { in reinit_write_data()
509 case 0: in reinit_write_data()
510 memset(req->buf, 0, req->length); in reinit_write_data()
513 for (i = 0; i < req->length; i++) in reinit_write_data()
524 struct f_sourcesink *ss = ep->driver_data; in source_sink_complete()
525 int status = req->status; in source_sink_complete()
531 cdev = ss->function.config->cdev; in source_sink_complete()
535 case 0: /* normal completion? */ in source_sink_complete()
536 if (ep == ss->out_ep) { in source_sink_complete()
538 if (ss->pattern != 2) in source_sink_complete()
539 memset(req->buf, 0x55, req->length); in source_sink_complete()
544 case -ECONNABORTED: /* hardware forced ep reset */ in source_sink_complete()
545 case -ECONNRESET: /* request dequeued */ in source_sink_complete()
546 case -ESHUTDOWN: /* disconnect from host */ in source_sink_complete()
547 VDBG(cdev, "%s gone (%d), %d/%d\n", ep->name, status, in source_sink_complete()
548 req->actual, req->length); in source_sink_complete()
549 if (ep == ss->out_ep) in source_sink_complete()
554 case -EOVERFLOW: /* buffer overrun on read means that in source_sink_complete()
560 DBG(cdev, "%s complete --> %d, %d/%d\n", ep->name, in source_sink_complete()
561 status, req->actual, req->length); in source_sink_complete()
563 case -EREMOTEIO: /* short read */ in source_sink_complete()
569 ERROR(cdev, "kill %s: resubmit %d bytes --> %d\n", in source_sink_complete()
570 ep->name, req->length, status); in source_sink_complete()
581 int i, size, qlen, status = 0; in source_sink_start_ep()
586 size = ss->isoc_maxpacket * in source_sink_start_ep()
587 (ss->isoc_mult + 1) * in source_sink_start_ep()
588 (ss->isoc_maxburst + 1); in source_sink_start_ep()
591 size = ss->isoc_maxpacket * (ss->isoc_mult + 1); in source_sink_start_ep()
594 size = ss->isoc_maxpacket > 1023 ? in source_sink_start_ep()
595 1023 : ss->isoc_maxpacket; in source_sink_start_ep()
598 ep = is_in ? ss->iso_in_ep : ss->iso_out_ep; in source_sink_start_ep()
599 qlen = ss->iso_qlen; in source_sink_start_ep()
601 ep = is_in ? ss->in_ep : ss->out_ep; in source_sink_start_ep()
602 qlen = ss->bulk_qlen; in source_sink_start_ep()
603 size = ss->buflen; in source_sink_start_ep()
606 for (i = 0; i < qlen; i++) { in source_sink_start_ep()
609 return -ENOMEM; in source_sink_start_ep()
611 req->complete = source_sink_complete; in source_sink_start_ep()
614 else if (ss->pattern != 2) in source_sink_start_ep()
615 memset(req->buf, 0x55, req->length); in source_sink_start_ep()
621 cdev = ss->function.config->cdev; in source_sink_start_ep()
622 ERROR(cdev, "start %s%s %s --> %d\n", in source_sink_start_ep()
623 is_iso ? "ISO-" : "", is_in ? "IN" : "OUT", in source_sink_start_ep()
624 ep->name, status); in source_sink_start_ep()
637 cdev = ss->function.config->cdev; in disable_source_sink()
638 disable_endpoints(cdev, ss->in_ep, ss->out_ep, ss->iso_in_ep, in disable_source_sink()
639 ss->iso_out_ep); in disable_source_sink()
640 VDBG(cdev, "%s disabled\n", ss->function.name); in disable_source_sink()
647 int result = 0; in enable_source_sink()
648 int speed = cdev->gadget->speed; in enable_source_sink()
652 ep = ss->in_ep; in enable_source_sink()
653 result = config_ep_by_speed(cdev->gadget, &(ss->function), ep); in enable_source_sink()
657 if (result < 0) in enable_source_sink()
659 ep->driver_data = ss; in enable_source_sink()
662 if (result < 0) { in enable_source_sink()
664 ep = ss->in_ep; in enable_source_sink()
670 ep = ss->out_ep; in enable_source_sink()
671 result = config_ep_by_speed(cdev->gadget, &(ss->function), ep); in enable_source_sink()
675 if (result < 0) in enable_source_sink()
677 ep->driver_data = ss; in enable_source_sink()
680 if (result < 0) { in enable_source_sink()
682 ep = ss->out_ep; in enable_source_sink()
687 if (alt == 0) in enable_source_sink()
691 ep = ss->iso_in_ep; in enable_source_sink()
693 result = config_ep_by_speed(cdev->gadget, &(ss->function), ep); in enable_source_sink()
697 if (result < 0) in enable_source_sink()
699 ep->driver_data = ss; in enable_source_sink()
702 if (result < 0) { in enable_source_sink()
704 ep = ss->iso_in_ep; in enable_source_sink()
712 ep = ss->iso_out_ep; in enable_source_sink()
714 result = config_ep_by_speed(cdev->gadget, &(ss->function), ep); in enable_source_sink()
718 if (result < 0) in enable_source_sink()
720 ep->driver_data = ss; in enable_source_sink()
723 if (result < 0) { in enable_source_sink()
729 ss->cur_alt = alt; in enable_source_sink()
731 DBG(cdev, "%s enabled, alt intf %d\n", ss->function.name, alt); in enable_source_sink()
739 struct usb_composite_dev *cdev = f->config->cdev; in sourcesink_set_alt()
749 return ss->cur_alt; in sourcesink_get_alt()
759 /*-------------------------------------------------------------------------*/
764 struct usb_configuration *c = f->config; in sourcesink_setup()
765 struct usb_request *req = c->cdev->req; in sourcesink_setup()
766 int value = -EOPNOTSUPP; in sourcesink_setup()
767 u16 w_index = le16_to_cpu(ctrl->wIndex); in sourcesink_setup()
768 u16 w_value = le16_to_cpu(ctrl->wValue); in sourcesink_setup()
769 u16 w_length = le16_to_cpu(ctrl->wLength); in sourcesink_setup()
771 req->length = USB_COMP_EP0_BUFSIZ; in sourcesink_setup()
776 switch (ctrl->bRequest) { in sourcesink_setup()
779 * These are the same vendor-specific requests supported by in sourcesink_setup()
781 * device spec by allowing multiple-packet requests. in sourcesink_setup()
783 * NOTE: the Control-OUT data stays in req->buf ... better in sourcesink_setup()
787 case 0x5b: /* control WRITE test -- fill the buffer */ in sourcesink_setup()
788 if (ctrl->bRequestType != (USB_DIR_OUT|USB_TYPE_VENDOR)) in sourcesink_setup()
793 if (w_length > req->length) in sourcesink_setup()
797 case 0x5c: /* control READ test -- return the buffer */ in sourcesink_setup()
798 if (ctrl->bRequestType != (USB_DIR_IN|USB_TYPE_VENDOR)) in sourcesink_setup()
803 if (w_length > req->length) in sourcesink_setup()
810 VDBG(c->cdev, in sourcesink_setup()
812 ctrl->bRequestType, ctrl->bRequest, in sourcesink_setup()
817 if (value >= 0) { in sourcesink_setup()
818 VDBG(c->cdev, "source/sink req%02x.%02x v%04x i%04x l%d\n", in sourcesink_setup()
819 ctrl->bRequestType, ctrl->bRequest, in sourcesink_setup()
821 req->zero = 0; in sourcesink_setup()
822 req->length = value; in sourcesink_setup()
823 value = usb_ep_queue(c->cdev->gadget->ep0, req, GFP_ATOMIC); in sourcesink_setup()
824 if (value < 0) in sourcesink_setup()
825 ERROR(c->cdev, "source/sink response, err %d\n", in sourcesink_setup()
829 /* device either stalls (value < 0) or reports success */ in sourcesink_setup()
841 return ERR_PTR(-ENOMEM); in source_sink_alloc_func()
845 mutex_lock(&ss_opts->lock); in source_sink_alloc_func()
846 ss_opts->refcnt++; in source_sink_alloc_func()
847 mutex_unlock(&ss_opts->lock); in source_sink_alloc_func()
849 ss->pattern = ss_opts->pattern; in source_sink_alloc_func()
850 ss->isoc_interval = ss_opts->isoc_interval; in source_sink_alloc_func()
851 ss->isoc_maxpacket = ss_opts->isoc_maxpacket; in source_sink_alloc_func()
852 ss->isoc_mult = ss_opts->isoc_mult; in source_sink_alloc_func()
853 ss->isoc_maxburst = ss_opts->isoc_maxburst; in source_sink_alloc_func()
854 ss->buflen = ss_opts->bulk_buflen; in source_sink_alloc_func()
855 ss->bulk_qlen = ss_opts->bulk_qlen; in source_sink_alloc_func()
856 ss->iso_qlen = ss_opts->iso_qlen; in source_sink_alloc_func()
858 ss->function.name = "source/sink"; in source_sink_alloc_func()
859 ss->function.bind = sourcesink_bind; in source_sink_alloc_func()
860 ss->function.set_alt = sourcesink_set_alt; in source_sink_alloc_func()
861 ss->function.get_alt = sourcesink_get_alt; in source_sink_alloc_func()
862 ss->function.disable = sourcesink_disable; in source_sink_alloc_func()
863 ss->function.setup = sourcesink_setup; in source_sink_alloc_func()
864 ss->function.strings = sourcesink_strings; in source_sink_alloc_func()
866 ss->function.free_func = sourcesink_free_func; in source_sink_alloc_func()
868 return &ss->function; in source_sink_alloc_func()
881 usb_put_function_instance(&ss_opts->func_inst); in ss_attr_release()
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()
907 mutex_lock(&opts->lock); in f_ss_opts_pattern_store()
908 if (opts->refcnt) { in f_ss_opts_pattern_store()
909 ret = -EBUSY; in f_ss_opts_pattern_store()
913 ret = kstrtou8(page, 0, &num); in f_ss_opts_pattern_store()
917 if (num != 0 && num != 1 && num != 2) { in f_ss_opts_pattern_store()
918 ret = -EINVAL; in f_ss_opts_pattern_store()
922 opts->pattern = num; in f_ss_opts_pattern_store()
925 mutex_unlock(&opts->lock); in f_ss_opts_pattern_store()
936 mutex_lock(&opts->lock); in f_ss_opts_isoc_interval_show()
937 result = sprintf(page, "%u\n", opts->isoc_interval); in f_ss_opts_isoc_interval_show()
938 mutex_unlock(&opts->lock); in f_ss_opts_isoc_interval_show()
950 mutex_lock(&opts->lock); in f_ss_opts_isoc_interval_store()
951 if (opts->refcnt) { in f_ss_opts_isoc_interval_store()
952 ret = -EBUSY; in f_ss_opts_isoc_interval_store()
956 ret = kstrtou8(page, 0, &num); in f_ss_opts_isoc_interval_store()
961 ret = -EINVAL; in f_ss_opts_isoc_interval_store()
965 opts->isoc_interval = num; in f_ss_opts_isoc_interval_store()
968 mutex_unlock(&opts->lock); in f_ss_opts_isoc_interval_store()
979 mutex_lock(&opts->lock); in f_ss_opts_isoc_maxpacket_show()
980 result = sprintf(page, "%u\n", opts->isoc_maxpacket); in f_ss_opts_isoc_maxpacket_show()
981 mutex_unlock(&opts->lock); in f_ss_opts_isoc_maxpacket_show()
993 mutex_lock(&opts->lock); in f_ss_opts_isoc_maxpacket_store()
994 if (opts->refcnt) { in f_ss_opts_isoc_maxpacket_store()
995 ret = -EBUSY; in f_ss_opts_isoc_maxpacket_store()
999 ret = kstrtou16(page, 0, &num); in f_ss_opts_isoc_maxpacket_store()
1004 ret = -EINVAL; in f_ss_opts_isoc_maxpacket_store()
1008 opts->isoc_maxpacket = num; in f_ss_opts_isoc_maxpacket_store()
1011 mutex_unlock(&opts->lock); in f_ss_opts_isoc_maxpacket_store()
1022 mutex_lock(&opts->lock); in f_ss_opts_isoc_mult_show()
1023 result = sprintf(page, "%u\n", opts->isoc_mult); in f_ss_opts_isoc_mult_show()
1024 mutex_unlock(&opts->lock); in f_ss_opts_isoc_mult_show()
1036 mutex_lock(&opts->lock); in f_ss_opts_isoc_mult_store()
1037 if (opts->refcnt) { in f_ss_opts_isoc_mult_store()
1038 ret = -EBUSY; in f_ss_opts_isoc_mult_store()
1042 ret = kstrtou8(page, 0, &num); in f_ss_opts_isoc_mult_store()
1047 ret = -EINVAL; in f_ss_opts_isoc_mult_store()
1051 opts->isoc_mult = num; in f_ss_opts_isoc_mult_store()
1054 mutex_unlock(&opts->lock); in f_ss_opts_isoc_mult_store()
1065 mutex_lock(&opts->lock); in f_ss_opts_isoc_maxburst_show()
1066 result = sprintf(page, "%u\n", opts->isoc_maxburst); in f_ss_opts_isoc_maxburst_show()
1067 mutex_unlock(&opts->lock); in f_ss_opts_isoc_maxburst_show()
1079 mutex_lock(&opts->lock); in f_ss_opts_isoc_maxburst_store()
1080 if (opts->refcnt) { in f_ss_opts_isoc_maxburst_store()
1081 ret = -EBUSY; in f_ss_opts_isoc_maxburst_store()
1085 ret = kstrtou8(page, 0, &num); in f_ss_opts_isoc_maxburst_store()
1090 ret = -EINVAL; in f_ss_opts_isoc_maxburst_store()
1094 opts->isoc_maxburst = num; in f_ss_opts_isoc_maxburst_store()
1097 mutex_unlock(&opts->lock); in f_ss_opts_isoc_maxburst_store()
1108 mutex_lock(&opts->lock); in f_ss_opts_bulk_buflen_show()
1109 result = sprintf(page, "%u\n", opts->bulk_buflen); in f_ss_opts_bulk_buflen_show()
1110 mutex_unlock(&opts->lock); in f_ss_opts_bulk_buflen_show()
1122 mutex_lock(&opts->lock); in f_ss_opts_bulk_buflen_store()
1123 if (opts->refcnt) { in f_ss_opts_bulk_buflen_store()
1124 ret = -EBUSY; in f_ss_opts_bulk_buflen_store()
1128 ret = kstrtou32(page, 0, &num); in f_ss_opts_bulk_buflen_store()
1132 opts->bulk_buflen = num; in f_ss_opts_bulk_buflen_store()
1135 mutex_unlock(&opts->lock); in f_ss_opts_bulk_buflen_store()
1146 mutex_lock(&opts->lock); in f_ss_opts_bulk_qlen_show()
1147 result = sprintf(page, "%u\n", opts->bulk_qlen); in f_ss_opts_bulk_qlen_show()
1148 mutex_unlock(&opts->lock); in f_ss_opts_bulk_qlen_show()
1160 mutex_lock(&opts->lock); in f_ss_opts_bulk_qlen_store()
1161 if (opts->refcnt) { in f_ss_opts_bulk_qlen_store()
1162 ret = -EBUSY; in f_ss_opts_bulk_qlen_store()
1166 ret = kstrtou32(page, 0, &num); in f_ss_opts_bulk_qlen_store()
1170 opts->bulk_qlen = num; in f_ss_opts_bulk_qlen_store()
1173 mutex_unlock(&opts->lock); in f_ss_opts_bulk_qlen_store()
1184 mutex_lock(&opts->lock); in f_ss_opts_iso_qlen_show()
1185 result = sprintf(page, "%u\n", opts->iso_qlen); in f_ss_opts_iso_qlen_show()
1186 mutex_unlock(&opts->lock); in f_ss_opts_iso_qlen_show()
1198 mutex_lock(&opts->lock); in f_ss_opts_iso_qlen_store()
1199 if (opts->refcnt) { in f_ss_opts_iso_qlen_store()
1200 ret = -EBUSY; in f_ss_opts_iso_qlen_store()
1204 ret = kstrtou32(page, 0, &num); in f_ss_opts_iso_qlen_store()
1208 opts->iso_qlen = num; in f_ss_opts_iso_qlen_store()
1211 mutex_unlock(&opts->lock); in f_ss_opts_iso_qlen_store()
1249 return ERR_PTR(-ENOMEM); in source_sink_alloc_inst()
1250 mutex_init(&ss_opts->lock); in source_sink_alloc_inst()
1251 ss_opts->func_inst.free_func_inst = source_sink_free_instance; in source_sink_alloc_inst()
1252 ss_opts->isoc_interval = GZERO_ISOC_INTERVAL; in source_sink_alloc_inst()
1253 ss_opts->isoc_maxpacket = GZERO_ISOC_MAXPACKET; in source_sink_alloc_inst()
1254 ss_opts->bulk_buflen = GZERO_BULK_BUFLEN; in source_sink_alloc_inst()
1255 ss_opts->bulk_qlen = GZERO_SS_BULK_QLEN; in source_sink_alloc_inst()
1256 ss_opts->iso_qlen = GZERO_SS_ISO_QLEN; in source_sink_alloc_inst()
1258 config_group_init_type_name(&ss_opts->func_inst.group, "", in source_sink_alloc_inst()
1261 return &ss_opts->func_inst; in source_sink_alloc_inst()