Hi Felipe, >-----Original Message----- >From: Felipe Balbi [mailto:balbi@xxxxxxxxxx] >Sent: Tuesday, October 09, 2018 11:07 AM >To: Anurag Kumar Vulisha <anuragku@xxxxxxxxxx>; Anurag Kumar Vulisha ><anuragku@xxxxxxxxxx>; gregkh@xxxxxxxxxxxxxxxxxxx >Cc: v.anuragkumar@xxxxxxxxx; linux-usb@xxxxxxxxxxxxxxx; linux- >kernel@xxxxxxxxxxxxxxx; Thinh.Nguyen@xxxxxxxxxxxx; Ajay Yugalkishore Pandey ><APANDEY@xxxxxxxxxx> >Subject: RE: [PATCH v5 0/8] usb: dwc3: Fix broken BULK stream support to dwc3 >gadget driver > > >(no top-posting, please) > Will ensure this won't happen again >Hi, > > >Anurag Kumar Vulisha <anuragku@xxxxxxxxxx> writes: > >> Hi Felipe, >> >> Please let us know if you have any suggestions / comments on this patch series. >> If you feel this patch series are okay, can we proceed with them? > >I really don't like this dwc3-specific timer. The best way here would be >to add a timer on udc/core.c which can be reused by any udc. This would >mean, of course, teaching udc/core about streams and lettting it do part >of the handling. > Thanks for spending your time in reviewing this patch. The reason for adding the timer is when streams are enabled there could be chances for the host and gadget controller to become out of sync, the gadget may wait for the host to issue prime transaction and the host may wait for the gadget to issue ERDY. To avoid such a potential deadlock conditions, timeout needs to be implemented in dwc3 driver. After timeout occurs, gadget will first stop transfer and restart the transfer again. This issue is mentioned in databook 2.90A section 9.5.2. I am not aware of how other controllers are handling the streams, but since this issue looks more like a dwc3 specific issue, I think it would be more convincing to add the timer in dwc3 gadget driver rather than adding in udc framework. Also we are stopping the timer when a valid StreamEvnt is found, which would be difficult to handle if the timer is moved into udc. Please help me by correcting , if I am missing something or my understanding is wrong. Thanks, Anurag Kumar Vulisha >Best > >-- >balbi