stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Balbi <felipe.balbi@linux.intel.com>
To: liangshengjun <liangshengjun@hisilicon.com>
Cc: "stable\@vger.kernel.org" <stable@vger.kernel.org>,
	"linux-usb\@vger.kernel.org" <linux-usb@vger.kernel.org>,
	Alan Stern <stern@rowland.harvard.edu>
Subject: Re: make a confirm for  [usb: dwc3: gadget: skip Set/Clear Halt when invalid]
Date: Mon, 25 Jun 2018 12:43:04 +0300	[thread overview]
Message-ID: <876027urpz.fsf@linux.intel.com> (raw)
In-Reply-To: <84923CA334DF85428B9ADCEC0F3CE864BA19A3@dggemm510-mbx.china.huawei.com>

[-- Attachment #1: Type: text/plain, Size: 1872 bytes --]


Hi,

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

liangshengjun <liangshengjun@hisilicon.com> 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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2018-06-25  9:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=876027urpz.fsf@linux.intel.com \
    --to=felipe.balbi@linux.intel.com \
    --cc=liangshengjun@hisilicon.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).