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

2017-05-11 Thread Thinh Nguyen
Hi, On 5/11/2017 1:22 AM, Felipe Balbi wrote: > > Hi, > > John Youn writes: >> The device hangs at the end of the log. I repeated the test with USB 3.0 IP version 2.90a and USB 3.1 IP version 1.60, and I found the same result where the TH is

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

2017-05-11 Thread Felipe Balbi
Hi, John Youn writes: > The device hangs at the end of the log. >>> >>> I repeated the test with USB 3.0 IP version 2.90a and USB 3.1 IP version >>> 1.60, and I found the same result where the TH is occasionally called >>> twice back-to-back. >>> Right,

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

2017-05-10 Thread Thinh Nguyen
Hi Felipe, On 4/21/2017 10:26 AM, John Youn wrote: > On 04/18/2017 05:47 AM, Felipe Balbi wrote: >> >> Hi, >> >> Thinh Nguyen writes: (Thinh, for whatever I didn't receive your email via the list, replying to myself) >>> >>> Could it be because of the

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

2017-04-21 Thread John Youn
On 04/18/2017 05:47 AM, Felipe Balbi wrote: > > Hi, > > Thinh Nguyen writes: >>> (Thinh, for whatever I didn't receive your email via the list, replying >>> to myself) >> >> Could it be because of the attached file? >> >>> >>> Felipe Balbi writes:

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

2017-04-18 Thread Felipe Balbi
Hi, Thinh Nguyen writes: >> (Thinh, for whatever I didn't receive your email via the list, replying >> to myself) > > Could it be because of the attached file? > >> >> Felipe Balbi writes: Hmm, can you apply this patch and provide output when

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

2017-04-18 Thread David Laight
From: Bjorn Helgaas > Sent: 12 April 2017 16:05 ... > >> So we mask the interrupt in the TH and a short time later, the > >> interrupt de-assertion packet is sent on PCIe bus and if that's not > >> seen right away we may already have another call to TH before the BH > >> gets scheduled. > > > >

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

2017-04-12 Thread Thinh Nguyen
Hi Felipe, On 4/11/2017 11:31 PM, Felipe Balbi wrote: Hi, (Thinh, for whatever I didn't receive your email via the list, replying to myself) Could it be because of the attached file? Felipe Balbi writes: Hmm, can you apply this patch and provide output when the

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

2017-04-12 Thread Bjorn Helgaas
On Wed, Apr 12, 2017 at 1:13 AM, Felipe Balbi wrote: > > Hi, > > John Youn writes: John Youn writes: >> Thinh Nguyen writes: >>> The dwc3 driver can overwite its previous events if its top

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

2017-04-12 Thread John Youn
On 04/11/2017 11:14 PM, Felipe Balbi wrote: > > Hi, > > John Youn writes: John Youn writes: >> Thinh Nguyen writes: >>> The dwc3 driver can overwite its previous events if its top half IRQ >>> handler

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

2017-04-12 Thread Felipe Balbi
Hi, (Thinh, for whatever I didn't receive your email via the list, replying to myself) Felipe Balbi writes: >> Hmm, can you apply this patch and provide output when the failure >> happens? I suggest setting up a 100MiB trace buffer. You don't need to >> enable any tracers nor

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

2017-04-12 Thread Felipe Balbi
Hi, John Youn writes: >>> John Youn writes: > Thinh Nguyen writes: >> The dwc3 driver can overwite its previous events if its top half IRQ >> handler gets invoked again before processing the events in the

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

2017-04-12 Thread Felipe Balbi
Hi, John Youn writes: >> John Youn writes: Thinh Nguyen writes: > The dwc3 driver can overwite its previous events if its top half IRQ > handler gets invoked again before processing the events in the

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

2017-04-12 Thread Felipe Balbi
Hi, John Youn writes: Do you think we introduce this when adding evt->cache in TH? Even without evt->cache we still could overwrite evt->count - so, was that seen before evt->cache? >>> >>> The multiple TH calls could have happened even before we

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

2017-04-11 Thread John Youn
On 04/11/2017 09:31 AM, John Youn wrote: > On 04/11/2017 12:45 AM, Felipe Balbi wrote: >> >> Hi, >> >> John Youn writes: Thinh Nguyen writes: > The dwc3 driver can overwite its previous events if its top half IRQ > handler gets

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

2017-04-11 Thread John Youn
On 04/11/2017 12:45 AM, Felipe Balbi wrote: > > Hi, > > John Youn writes: >>> Thinh Nguyen writes: The dwc3 driver can overwite its previous events if its top half IRQ handler gets invoked again before processing the events in the

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

2017-04-11 Thread John Youn
On 04/10/2017 11:58 PM, Felipe Balbi wrote: > > Hi, > > John Youn writes: Yes it will re-assert. The interrupt line will remain asserted as long events remain in the buffer and it is not masked. So when we eventually unmask, the interrupt will be reasserted

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

2017-04-11 Thread Felipe Balbi
Hi, John Youn writes: >> Thinh Nguyen writes: >>> 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 >> >> interrupts are masked, why would top half

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

2017-04-11 Thread Felipe Balbi
Hi, John Youn writes: >>> Yes it will re-assert. The interrupt line will remain asserted as long >>> events remain in the buffer and it is not masked. So when we >>> eventually unmask, the interrupt will be reasserted again immediately. >>> BTW, other option here

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

2017-04-11 Thread John Youn
On 04/10/2017 11:17 PM, Janusz Dziedzic wrote: > On 10 April 2017 at 20:43, John Youn wrote: >> On 04/08/2017 12:38 PM, Janusz Dziedzic wrote: >>> 2017-04-08 1:57 GMT+02:00 Thinh Nguyen : The dwc3 driver can overwite its previous events if

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 wrote: > On 04/08/2017 12:38 PM, Janusz Dziedzic wrote: >> 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

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

2017-04-10 Thread John Youn
On 04/09/2017 11:59 PM, Felipe Balbi wrote: > > Hi, > > Thinh Nguyen writes: >> 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 > > interrupts are masked, why would top half

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

2017-04-10 Thread John Youn
On 04/08/2017 12:38 PM, Janusz Dziedzic wrote: > 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

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

2017-04-10 Thread Felipe Balbi
Hi, Thinh Nguyen writes: > 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 interrupts are masked, why would top half get invoked again? Is this, perhaps, related to DWC3

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