stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: make a confirm for  [usb: dwc3: gadget: skip Set/Clear Halt when invalid]
@ 2018-06-25  9:37 liangshengjun
  2018-06-25  9:43 ` Felipe Balbi
  0 siblings, 1 reply; 6+ messages in thread
From: liangshengjun @ 2018-06-25  9:37 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: stable@vger.kernel.org, linux-usb@vger.kernel.org, Alan Stern

Hi balbi,

	Thanks for reponse. Now I fixed this case without check STALL status when clear-Halt request.

BDW, I have meet other case:

Run dwc3 for uvc function, the uvc video show video overlapping when windows 7 restart camera app.
I debug the dwc3 drivers ,found :
	1. when camera app close, the dwc3 ep_dequeue is call. Then giveback request with status: -ECONNRESET to uvc function layer.  dep->trb_dequeue keep stable
	2.when camera app reopen ,the dwc3 ep_queue is call. Then kick a transfer, fetch a new trb to dwc3 core. dep->trb_enqueue increment.
	3.when one trb tranfter complete, handle event process function fetch one frb by current dep->trb_dequeue, and uvc function would get one request complete giveback, which have been dequeue.
	   But in fact, current dep->trb_dequeue pointer buffer is "old", because stp1 have been dequeue it.
	   Current dwc3 drivers:  the correct enqueue req process is " ep enqueue > fetch a new trb by trb_enqueue > increase trb_enqueue > pack trb to dwc3 core",  Right?
	   For dequeue request process, now is " ep dequeue > stop started_list request > giveback request with -ECONNRESET status" Right ?

  To avoid getting a older request which has been dequeued, I think dequeue process necessary sync the trb_dequeue to trb_enqueue. Right ?		



Liang Shengjun


-----邮件原件-----
发件人: Felipe Balbi [mailto:felipe.balbi@linux.intel.com] 
发送时间: 2018年6月25日 15:48
收件人: Alan Stern <stern@rowland.harvard.edu>
抄送: liangshengjun <liangshengjun@hisilicon.com>; stable@vger.kernel.org; linux-usb@vger.kernel.org
主题: Re: make a confirm for [usb: dwc3: gadget: skip Set/Clear Halt when invalid]


Hi,

Alan Stern <stern@rowland.harvard.edu> writes:
>> that patch is not 100% correct. You can revert it in your tree. I 
>> added that because of a problem I found when running adb against macOS.
>> 
>> It's actually okay to send Clear Halt at any time, but for some 
>> reason
>> dwc3 was hanging when running adb against macOS.
>
> Note: According to the USB spec it's okay to send Clear-Halt at any 
> time.  But there are plenty of devices that get upset if they receive 
> this message when the endpoint isn't actually halted.

right. The weird thing here is that dwc3 has never suffered from this until we ran ADB against macOS. That was the only way to get any problems.

Without clear halt, though, we have no means for syncing data toggle.

--
balbi

^ permalink raw reply	[flat|nested] 6+ messages in thread
[parent not found: <84923CA334DF85428B9ADCEC0F3CE864BA1492@dggemm510-mbx.china.huawei.com>]

end of thread, other threads:[~2018-06-26 10:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-25  9:37 make a confirm for [usb: dwc3: gadget: skip Set/Clear Halt when invalid] liangshengjun
2018-06-25  9:43 ` Felipe Balbi
2018-06-26 10:09   ` 答复: " liangshengjun
     [not found] <84923CA334DF85428B9ADCEC0F3CE864BA1492@dggemm510-mbx.china.huawei.com>
2018-06-21  9:42 ` Felipe Balbi
2018-06-21 15:29   ` Alan Stern
2018-06-25  7:47     ` Felipe Balbi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).