Files
linux/drivers
Lee Jones f632042365 ANDROID: usb: f_accessory: Check buffer size when initialised via composite
When communicating with accessory devices via USBFS, the initialisation
call-stack looks like:

  ConfigFS > Gadget ConfigFS > UDC > Gadget ConfigFS > Composite

Eventually ending up in composite_dev_prepare() where memory for the
data buffer is allocated and initialised.  The default size used for the
allocation is USB_COMP_EP0_BUFSIZ (4k).  When handling bulk transfers,
acc_ctrlrequest() needs to be able to handle buffers up to
BULK_BUFFER_SIZE (16k).  Instead of adding new generic attributes to
'struct usb_request' to track the size of the allocated buffer, we can
simply split off the affected thread of execution to travel via a
knowledgeable abstracted function acc_ctrlrequest_composite() where we
can complete the necessary specific checks.

Bug: 264029575
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: Ia1280f85499621d3fa57f7262b4a2c80f4be7773
Signed-off-by: Lee Jones <joneslee@google.com>
2023-01-23 10:32:00 +00:00
..
2023-01-18 13:13:15 +00:00
2023-01-18 13:45:44 +00:00
2023-01-18 13:13:15 +00:00
2023-01-18 12:52:16 +00:00
2023-01-18 13:13:15 +00:00
2023-01-18 12:52:16 +00:00
2023-01-18 12:52:16 +00:00
2023-01-18 13:45:44 +00:00
2023-01-18 13:13:15 +00:00
2023-01-18 12:52:16 +00:00
2023-01-18 13:45:44 +00:00
2023-01-18 12:52:16 +00:00
2023-01-18 13:45:44 +00:00
2023-01-18 13:13:15 +00:00
2023-01-18 13:13:15 +00:00
2023-01-18 12:52:16 +00:00
2023-01-18 13:13:15 +00:00
2023-01-18 13:13:15 +00:00
2023-01-18 13:45:44 +00:00
2023-01-18 13:45:44 +00:00
2023-01-18 13:13:15 +00:00
2023-01-18 13:13:15 +00:00
2023-01-18 12:52:16 +00:00
2023-01-18 12:52:16 +00:00
2022-12-31 13:14:48 +01:00
2023-01-18 13:45:44 +00:00
2023-01-18 13:13:15 +00:00
2023-01-18 13:13:15 +00:00
2022-11-28 16:08:50 +00:00
2023-01-18 13:13:15 +00:00
2023-01-18 13:45:44 +00:00
2023-01-18 13:13:15 +00:00
2023-01-18 13:13:15 +00:00