答复: make a confirm for [usb: dwc3: gadget: skip Set/Clear Halt when invalid]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



After merge the patch 
[PATCH] usb: dwc3: gadget: properly increment dequeue pointer on,

fixed the case. 
Thank you so much.


Liang Shengjun


-----邮件原件-----
发件人: Felipe Balbi [mailto:felipe.balbi@xxxxxxxxxxxxxxx] 
发送时间: 2018年6月25日 17:43
收件人: liangshengjun <liangshengjun@xxxxxxxxxxxxx>
抄送: stable@xxxxxxxxxxxxxxx; linux-usb@xxxxxxxxxxxxxxx; Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>
主题: Re: make a confirm for [usb: dwc3: gadget: skip Set/Clear Halt when invalid]


Hi,

please don't top-post and break your emails at 80 columns

liangshengjun <liangshengjun@xxxxxxxxxxxxx> writes:
> 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?

no, this is not the right fix. I think thkis has been fixed recently, though. Check if current mainline still has the issue. If it doesn, collect tracepoint data (see [1] below) and let me know how you reproduce it.

[1] https://www.kernel.org/doc/html/latest/driver-api/usb/dwc3.html#reporting-bugs

--
balbi
?韬{.n?????%??檩??w?{.n???{炳???骅w*jg????????G??⒏⒎?:+v????????????"??????



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux