[PATCH] usb: dwc2: gadget: Fix kill_all_requests race

2019-08-05 Thread John Keeping
thout threaded interrupts. Signed-off-by: John Keeping --- drivers/usb/dwc2/gadget.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index 60ac98cd8ad8..92e8de9cb45c 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/dr

Re: [PATCH] usb: dwc2: gadget: Consider VBUS discharge time in disconnect flow

2019-02-06 Thread John Keeping
On Tue, 5 Feb 2019 12:08:48 +0400 Minas Harutyunyan wrote: > If VBUS discharge time > 3ms then on device cable disconnect, core > asserted Early Suspend then Suspend interrupts which no need to > handle. > > VBUS discharge time depend on PHY schematic implementation. > Can be up to 1 sec. > > T

Re: [PATCH] usb: dwc2: gadget: fix ISOC frame overflow handling

2018-12-21 Thread John Keeping
Hi Minas, On Wed, 19 Dec 2018 14:09:01 + Minas Harutyunyan wrote: > On 12/18/2018 6:35 PM, John Keeping wrote: > > Hi Minas, > > > > On Fri, 14 Dec 2018 09:00:08 + > > Minas Harutyunyan wrote: > >> First of all, sorry for delayed answer. > >

Re: [PATCH] usb: dwc2: gadget: fix ISOC frame overflow handling

2018-12-18 Thread John Keeping
Hi Minas, On Fri, 14 Dec 2018 09:00:08 + Minas Harutyunyan wrote: > First of all, sorry for delayed answer. > Looks like similar issue seen by Andrzej Pietrasiewicz > : "dwc2 isochronous transfers issues". Same > feedback provided to Andrzej. > > I run tests on 4.20.0-rc4 in DDMA. By defau

Re: [PATCH] usb: dwc2: gadget: fix ISOC frame overflow handling

2018-11-12 Thread John Keeping
Hi Minas, On Mon, 12 Nov 2018 08:53:36 + Minas Harutyunyan wrote: > On 11/9/2018 10:43 PM, John Keeping wrote: > > On Fri, 9 Nov 2018 14:36:36 + > > Minas Harutyunyan wrote: > > > >> On 11/9/2018 12:43 PM, Minas Harutyunyan wrote: > >>>

Re: [PATCH] usb: dwc2: gadget: fix ISOC frame overflow handling

2018-11-09 Thread John Keeping
Hi Minas, On Fri, 9 Nov 2018 14:36:36 + Minas Harutyunyan wrote: > On 11/9/2018 12:43 PM, Minas Harutyunyan wrote: > > Hi John, > > > > On 11/8/2018 9:37 PM, John Keeping wrote: > >> Hi Minas, > >> > >> On Mon, 5 Nov 2018 08:28:07 + &g

Re: [PATCH] usb: dwc2: gadget: fix ISOC frame overflow handling

2018-11-08 Thread John Keeping
Hi Minas, On Mon, 5 Nov 2018 08:28:07 + Minas Harutyunyan wrote: > On 10/23/2018 5:43 PM, John Keeping wrote: > > By clearing the overrun flag as soon as the target frame is next > > incremented, we can end up incrementing the target frame more than

[PATCH] usb: dwc2: gadget: fix ISOC frame overflow handling

2018-10-23 Thread John Keeping
n the endpoint is disabled and the frame number has not yet done so. Instead, wait until the frame number also wraps and then clear the overrun flag. Signed-off-by: John Keeping --- drivers/usb/dwc2/gadget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc2/gad

[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 Reviewed-by

[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 --- drivers/usb

[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-off-b

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 Keep

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 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_COMPAT"), 354bc4

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

2017-11-09 Thread John Keeping
7;s just 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 --- drivers/usb/gadget/function/f_fs.c | 3 +-- 1 file changed, 1 inser

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

2017-09-12 Thread John Keeping
complete. Signed-off-by: John Keeping --- 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 as v2.

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

2017-07-13 Thread John Keeping
completed requests are passed to userspace in the order in which they complete. Signed-off-by: John Keeping --- 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/drivers/usb/gadget/function

[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 --- drivers/usb/gadget/configfs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/gadget/configf

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

2016-05-18 Thread John Keeping
he Incomplete 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 on Rockchip RK3288 (Radxa Rock2 Square). With these patches the UAC2 gadget works smoothl

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. Wit

[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 --- drivers/usb/dwc2/gadget.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers