[PATCH v2] usb: gadget: f_uac2: fix bFirstInterface in composite gadget

2018-02-14 Thread John Keeping
If there are multiple functions associated with a configuration, then the UAC2 interfaces may not start at zero. Set the correct first interface number in the association descriptor so that the audio interfaces are enumerated correctly in this case. Signed-off-by: John Keeping <j...@metanate.

[PATCH] usb: gadget: f_uac2: fix bFirstInterface in composite gadget

2018-01-12 Thread John Keeping
If there are multiple functions associated with a configuration, then the UAC2 interfaces may not start at zero. Set the correct first interface number in the association descriptor so that the audio interfaces are enumerated correctly in this case. Signed-off-by: John Keeping <j...@metanate.

[PATCH v2] usb: f_fs: Force Reserved1=1 in OS_DESC_EXT_COMPAT

2017-11-27 Thread John Keeping
pace programs continue to work correctly and, as a bonus, old programs are now compliant with the specification without having to fix anything themselves. Fixes: 53642399aa71 ("usb: gadget: f_fs: Fix wrong check on reserved1 of OS_DESC_EXT_COMPAT") Cc: sta...@vger.kernel.org Signed

Re: [PATCH] usb: f_fs: Drop check on Reserved1 field on OS_DESC_EXT_COMPAT

2017-11-13 Thread John Keeping
tinue to work correctly and, as a bonus, old programs are now compliant with the specification without having to fix anything themselves. Fixes: 53642399aa71 ("usb: gadget: f_fs: Fix wrong check on reserved1 of OS_DESC_EXT_COMPAT") Cc: sta...@vger.kernel.org Signed-off-by: John Keeping <

Re: [PATCH] usb: f_fs: Drop check on Reserved1 field on OS_DESC_EXT_COMPAT

2017-11-10 Thread John Keeping
On Fri, 10 Nov 2017 12:40:39 +0200, Felipe Balbi wrote: > John Keeping <j...@metanate.com> writes: > > This check has gone through several incompatible variations in commits > > 53642399aa71 ("usb: gadget: f_fs: Fix wrong check on reserved1 of > > OS_DESC_EXT_COMP

[PATCH] usb: f_fs: Drop check on Reserved1 field on OS_DESC_EXT_COMPAT

2017-11-09 Thread John Keeping
ust drop the condition to avoid breaking userspace. Fixes: 53642399aa71 ("usb: gadget: f_fs: Fix wrong check on reserved1 of OS_DESC_EXT_COMPAT") Cc: sta...@vger.kernel.org # v4.7+ Signed-off-by: John Keeping <j...@metanate.com> --- drivers/usb/gadget/function/f_fs.c | 3 +-- 1

[PATCH v2] usb: gadget: ffs: handle I/O completion in-order

2017-09-12 Thread John Keeping
they complete. Signed-off-by: John Keeping <j...@metanate.com> --- I originally sent a version of this patch back in July [1] without any response. Since then, I've improved the commit message and switched from create_singlethread_workqueue() to alloc_ordered_workqueue(), so I've marked this

[PATCH] usb: gadget: ffs: handle I/O completion in-order

2017-07-13 Thread John Keeping
that completed requests are passed to userspace in the order in which they complete. Signed-off-by: John Keeping <j...@metanate.com> --- drivers/usb/gadget/function/f_fs.c | 10 +- drivers/usb/gadget/function/u_fs.h | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/drive

[PATCH] usb: gadget: configs: plug memory leak

2017-02-28 Thread John Keeping
When binding a gadget to a device, "name" is stored in gi->udc_name, but this does not happen when unregistering and the string is leaked. Signed-off-by: John Keeping <j...@metanate.com> --- drivers/usb/gadget/configfs.c | 1 + 1 file changed, 1 insertion(+) diff --git a

Re: [PATCH 00/13] usb: dwc2: Fix up gadget isochronous support

2016-05-18 Thread John Keeping
complete ISO IN/OUT interrupts. > > These patches have been sitting in our internal tree for a while and > tested mostly on a HAPS-based FPGA IP validation platform. Tested-by: John Keeping <j...@metanate.com> on Rockchip RK3288 (Radxa Rock2 Square). With these patches the UAC2 ga

Problem with dwc2 gadget isochronous in transfers

2016-03-24 Thread John Keeping
Hi, I've been trying to use the uac2 gadget function on a Radxa Rock2 board which uses the dwc2 driver, but it seems there is a problem with isochronous in endpoints (out works fine). When trying to use the audio gadget no data is transferred and the other end of the link ends up timing out.

[PATCH] usb: dwc2: gadget: avoid null dereference on incomplete transfer

2016-03-14 Thread John Keeping
) [] (handle_irq_event_percpu) from [] (handle_irq_event+0x48/0x6c) In all other loops we already skip endpoints that are null, so do so here as well. Signed-off-by: John Keeping <j...@metanate.com> --- drivers/usb/dwc2/gadget.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-)