Re: [PATCH 1/3] usb: dwc3: gadget: Prevent losing events in event cache

2017-04-11 Thread Janusz Dziedzic
On 10 April 2017 at 20:43, John Youn <john.y...@synopsys.com> wrote: > On 04/08/2017 12:38 PM, Janusz Dziedzic wrote: >> 2017-04-08 1:57 GMT+02:00 Thinh Nguyen <thinh.ngu...@synopsys.com>: >>> The dwc3 driver can overwite its previous events if its top half IRQ

Re: [PATCH 3/3] usb: dwc3: ep0: improve handling of unaligned OUT requests

2017-04-10 Thread Janusz Dziedzic
On 7 April 2017 at 13:36, Felipe Balbi wrote: > Just like we did for all other endpoint types, let's rely on a chained > TRB pointing to ep0_bounce_addr in order to align transfer size. This > will make the code simpler. > > Signed-off-by: Felipe Balbi

Re: [PATCH 1/3] usb: dwc3: gadget: Prevent losing events in event cache

2017-04-08 Thread Janusz Dziedzic
2017-04-08 1:57 GMT+02:00 Thinh Nguyen : > The dwc3 driver can overwite its previous events if its top half IRQ > handler gets invoked again before processing the events in the cache. We > see this as a hang in the file transfer and the host will attempt to > reset the

Re: usb: host: xhci: stalled endpoint ring not cleared on empty td_list

2017-03-30 Thread Janusz Dziedzic
On 30 March 2017 at 11:23, Greg KH <g...@kroah.com> wrote: > On Thu, Mar 30, 2017 at 11:11:34AM +0200, Janusz Dziedzic wrote: >> On 30 March 2017 at 10:53, Greg KH <g...@kroah.com> wrote: >> > On Thu, Mar 30, 2017 at 10:29:41AM +0200, Christian Gromm wrote: >> &

Re: usb: host: xhci: stalled endpoint ring not cleared on empty td_list

2017-03-30 Thread Janusz Dziedzic
On 30 March 2017 at 10:53, Greg KH wrote: > On Thu, Mar 30, 2017 at 10:29:41AM +0200, Christian Gromm wrote: >> >> >> On 03/27/2017 11:31 AM, Felipe Balbi wrote: >> > >> > Hi, >> > >> > Christian Gromm writes: >> > > we observe an issue with a

Re: [PATCH] usb: dwc2: pci: Fix error handling in dwc2_pci_probe

2017-02-17 Thread Janusz Dziedzic
On 17 February 2017 at 14:01, Vardan Mikayelyan wrote: > Move usb_phy_generic_register() function call to the top, to simplify > error handling. > > Replace kzalloc() with devm_kzalloc(). > > After platform_device_add(), if we error out, we must do >

Re: [PATCH v2 28/37] usb: host: xhci: combine event TRB completion debugging messages

2017-01-24 Thread Janusz Dziedzic
On 23 January 2017 at 13:20, Mathias Nyman wrote: > From: Felipe Balbi > > If we just provide a helper to convert completion code to string, we can > combine all debugging messages into a single print. > > [keep the old debug messages,

Re: [PATCH] usb: dwc3: gadget: Avoid race between dwc3 interrupt handler and irq thread handler

2016-12-28 Thread Janusz Dziedzic
ed anything? > > this is top half handler. Interrupts are already disabled. > BTW, We don't use spin_lock in top half handler. Maybe we should/can switch all spin_lock_irqsave() to simple spin_lock() in the thread/callbacks? Or there is a reason to use irqsave() version? BR Janusz

Re: [PATCH] usb: dwc3: gadget: Avoid race between dwc3 interrupt handler and irq thread handler

2016-12-28 Thread Janusz Dziedzic
2016-12-27 13:16 GMT+01:00 Baolin Wang <baolin.w...@linaro.org>: > Hi, > > On 27 December 2016 at 19:11, Felipe Balbi <ba...@kernel.org> wrote: >> >> Hi, >> >> Baolin Wang <baolin.w...@linaro.org> writes: >>> Hi, >>> >>

Re: [PATCH] usb: dwc3: gadget: Avoid race between dwc3 interrupt handler and irq thread handler

2016-12-27 Thread Janusz Dziedzic
NT(0), count); > + spin_unlock(>lock); > > return IRQ_WAKE_THREAD; > } > -- > 1.7.9.5 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-usb" in > the body of a message to majord...@vger.kernel.org > More majordomo info

[PATCH] usb: dwc3: skip interrupt when ep disabled

2016-12-08 Thread Janusz Dziedzic
In case EP disabled pass only EPCPLT command to be handled. In other case we could hit Bug like below. BUG: unable to handle kernel NULL pointer dereference at 0003 IP: [] dwc3_thread_interrupt+0x11c8/0x1790 while dep->endpoint.desc is NULL. Signed-off-by: Janusz Dzied

Re: [PATCH 3/4] usb: dwc3: gadget: use evt->cache for processing events

2016-11-15 Thread Janusz Dziedzic
On 15 November 2016 at 12:23, Felipe Balbi wrote: > From: John Youn > > Let's start copying events from evt->buf to > evt->cache and use evt->cache for processing events. > > A follow-up patch will be added to clear events in > the top-half

Re: [PATCH v2 3/5] usb: dwc3: gadget: Write the event count in interrupt

2016-11-09 Thread Janusz Dziedzic
On 9 November 2016 at 09:05, Felipe Balbi wrote: > > Hi, > > John Youn writes: >>> + dwc3_writel(dwc->regs, DWC3_GEVNTCOUNT(0), count); >>> + > After that evt->buf[lpos, lpos + count] seems goes back to HW, so > thread should not

[PATCH 5/5] usb: dwc3: warn on once when no trbs

2016-11-09 Thread Janusz Dziedzic
Seems last time we hit few issues where we get trb_left = 0, mainly because of HWO bit still set in previous TRB. Add warn on once to catch/fix such problems much faster. Signed-off-by: Janusz Dziedzic <januszx.dzied...@linux.intel.com> --- drivers/usb/dwc3/gadget.c | 4 +++- 1 file chan

[PATCH 1/5] usb: dwc3: decrement queued_requests

2016-11-09 Thread Janusz Dziedzic
In case we will fail to STARTTRANSFER we should also decrement queued_requests. Signed-off-by: Janusz Dziedzic <januszx.dzied...@linux.intel.com> --- drivers/usb/dwc3/gadget.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index a

[PATCH 2/5] usb: dwc3: clean TRB if STARTTRANSFER fail

2016-11-09 Thread Janusz Dziedzic
No way to send more data. Signed-off-by: Janusz Dziedzic <januszx.dzied...@linux.intel.com> --- drivers/usb/dwc3/gadget.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 840e312..19bea3b 100644 --- a/drivers/usb/dwc3/gadget.c +

[PATCH 4/5] usb: dwc3: isoc clean DWC3_EP_PENDING_REQUEST flag

2016-11-09 Thread Janusz Dziedzic
After we kick_transfer we should clean DWC3_EP_PENDING_REQUEST endpoint flag. Signed-off-by: Janusz Dziedzic <januszx.dzied...@linux.intel.com> --- drivers/usb/dwc3/gadget.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 0

[PATCH 3/5] usb: dwc3: fix post-increment

2016-11-09 Thread Janusz Dziedzic
Use pre-increment and set -ETIMEDOUT correctly. Signed-off-by: Janusz Dziedzic <januszx.dzied...@linux.intel.com> --- drivers/usb/dwc3/gadget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 19bea3b..0cd98c0

Re: [PATCH v2 3/5] usb: dwc3: gadget: Write the event count in interrupt

2016-11-04 Thread Janusz Dziedzic
On 4 November 2016 at 07:41, Janusz Dziedzic <janusz.dzied...@tieto.com> wrote: > On 4 November 2016 at 02:31, John Youn <johny...@synopsys.com> wrote: >> >> Since we are saving the event count and handling the events in the >> threaded interrupt handler, we can w

Re: [PATCH v2 3/5] usb: dwc3: gadget: Write the event count in interrupt

2016-11-04 Thread Janusz Dziedzic
On 4 November 2016 at 02:31, John Youn wrote: > > Since we are saving the event count and handling the events in the > threaded interrupt handler, we can write and clear out the eventcount in > the hard interrupt handler itself. > > This behavior will be required for IP

[PATCH] usb: gadget: f_hid add super speed support

2016-11-03 Thread Janusz Dziedzic
Add super speed descriptors to f_hid. Signed-off-by: Janusz Dziedzic <januszx.dzied...@linux.intel.com> --- drivers/usb/gadget/function/f_hid.c | 67 - 1 file changed, 66 insertions(+), 1 deletion(-) diff --git a/drivers/usb/gadget/function/f_hid.c b/d

Re: [RESEND PATCH v3 1/2] usb: dwc3: gadget: Add disconnect checking when changing function dynamically

2016-10-13 Thread Janusz Dziedzic
On 13 October 2016 at 12:41, Baolin Wang wrote: > On 13 October 2016 at 17:49, Felipe Balbi wrote: >> >> Hi, >> >> Baolin Wang writes: > diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c > index

Re: [RESEND PATCH v3 1/2] usb: dwc3: gadget: Add disconnect checking when changing function dynamically

2016-10-13 Thread Janusz Dziedzic
On 13 October 2016 at 10:21, Baolin Wang <baolin.w...@linaro.org> wrote: > Hi, > > On 13 October 2016 at 16:16, Janusz Dziedzic <janusz.dzied...@tieto.com> > wrote: >> On 13 October 2016 at 09:37, Baolin Wang <baolin.w...@linaro.org> wrote: >>> Hi

Re: [RESEND PATCH v3 1/2] usb: dwc3: gadget: Add disconnect checking when changing function dynamically

2016-10-13 Thread Janusz Dziedzic
On 13 October 2016 at 09:37, Baolin Wang wrote: > Hi, > > On 13 October 2016 at 15:06, Felipe Balbi wrote: >> >> Hi, >> >> Baolin Wang writes: >>> When system has stpped the gadget, we should avoid queuing any requests >> >>

Re: [PATCH 11/22] usb: dwc3: gadget: clear LST from previous TRB on Update Transfer

2016-05-27 Thread Janusz Dziedzic
On 19 May 2016 at 09:08, Felipe Balbi wrote: > > Hi, > > Paul Zimmerman writes: >> Felipe Balbi writes: >> >>> If we're going to issue a Update Transfer command, >>> let's clear LST bit from previous TRB. This will