Lines Matching +full:double +full:- +full:buffering
1 // SPDX-License-Identifier: GPL-2.0+
3 * mass_storage.c -- Mass Storage USB Gadget
5 * Copyright (C) 2003-2008 Alan Stern
14 * appearing to the host as a disk drive or as a CD-ROM drive. In
17 * double-buffering for increased throughput. Last but not least, it
31 /*-------------------------------------------------------------------------*/
40 * Instead: allocate your own, using normal USB-IF procedures.
43 #define FSG_PRODUCT_ID 0xa4a5 /* Linux-USB File-backed Storage Gadget */
47 /*-------------------------------------------------------------------------*/
73 .language = 0x0409, /* en-us */
98 * 2 is usually enough for good buffering pipeline
110 if (gadget_is_otg(c->cdev->gadget)) { in msg_do_config()
111 c->descriptors = otg_desc; in msg_do_config()
112 c->bmAttributes |= USB_CONFIG_ATT_WAKEUP; in msg_do_config()
131 .label = "Linux File-Backed Storage",
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()
174 if (gadget_is_otg(cdev->gadget) && !otg_desc[0]) { in msg_bind()
177 usb_desc = usb_otg_descriptor_alloc(cdev->gadget); in msg_bind()
179 status = -ENOMEM; in msg_bind()
182 usb_otg_descriptor_init(cdev->gadget, usb_desc); in msg_bind()
192 dev_info(&cdev->gadget->dev, in msg_bind()
200 fsg_common_remove_luns(opts->common); in msg_bind()
202 fsg_common_free_buffers(opts->common); in msg_bind()