linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Wesley Cheng <wcheng@codeaurora.org>,
	Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
	Wesley Cheng <quic_wcheng@quicinc.com>,
	Jung Daehwan <dh10.jung@samsung.com>
Cc: Felipe Balbi <balbi@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	"quic_jackp@quicinc.com" <quic_jackp@quicinc.com>
Subject: Re: [PATCH v2 1/2] usb: dwc3: Not set DWC3_EP_END_TRANSFER_PENDING in ep cmd fails
Date: Fri, 25 Feb 2022 01:26:02 +0000	[thread overview]
Message-ID: <810de66c-7d73-fae0-9356-b06b48134ad6@synopsys.com> (raw)
In-Reply-To: <dbd00cb1-b5d0-24e7-ef72-dff3765c26cf@codeaurora.org>

Hi Wesley,

Wesley Cheng wrote:
> Hi Thinh,
> 
> On 2/22/2022 6:59 PM, Thinh Nguyen wrote:
>> Hi Wesley,
>>

<snip>

>>
>> Can you provide a full trace?
>>
> Sorry for doing this, but we didn't have a way to share the file
> directly, so I have to paste the trace below. :/
> 
>> Btw, when you experiment with increasing the timeout to 10 seconds, did
>> you use the mdelay() in each loop? The delta time for End Transfer
>> timeout here seems very small.
>>
> This particular run did not modify the timeout for the cmd status polling.
> 
> Is that something that you want to try?  Not pertaining to this dequeue
> situation, during the pullup disable path debug, I noticed that as long
> as there was a pending EP0 SETUP packet (not data/status) cached in the
> controller, it would also have endxfer timeouts on non-control EPs.  We
> were able to capture a bus sniffer log + ftrace, and it showed that at
> the point of the error, the lecroy/bus log saw a SETUP token ACK'ed,
> while on the ftrace, there were endxfer timeouts for all non-control EPs
> (due to the dwc3_gadget_stop_active_transfers() call)
> 
> Thanks
> Wesley
> 
> TRACE
> ---------------------------------------------------------------------
> 

<snip>

> [ 1023.912550050       0x4af666fd2]   dbg_trace_log_ctrl: Clear Endpoint
> Feature(Halt ep4in)
> [ 1023.912934738       0x4af668cab]   dbg_send_ep_cmd: ep0out: cmd 'Set
> Stall' [404] params 00000000 00000000 00000000 --> status: Successful
> [ 1023.913361561       0x4af66acae]   dbg_send_ep_cmd: ep0out: cmd
> 'Start Transfer' [406] params 00000000 efffa000 00000000 --> status:
> Successful
> [ 1024.336480573       0x4afe2a29b]   dbg_trace_log_ctrl: Clear Endpoint
> Feature(Halt ep5in)
> [ 1024.336855573       0x4afe2bebc]   dbg_send_ep_cmd: ep5in: cmd 'Clear
> Stall' [405] params 00000000 00000000 00000000 --> status: Successful
> [ 1024.337264531       0x4afe2dd68]   dbg_send_ep_cmd: ep0in: cmd 'Start
> Transfer' [406] params 00000000 efffa000 00000000 --> status: Successful
> [ 1024.351910156       0x4afe727d4]   dbg_send_ep_cmd: ep0out: cmd
> 'Start Transfer' [406] params 00000000 efffa000 00000000 --> status:
> Successful
> [ 1024.363139896       0x4afea720f]   dbg_trace_log_ctrl: Clear Endpoint
> Feature(Halt ep4in)
> [ 1024.363898281       0x4afeaaaf0]   dbg_send_ep_cmd: ep0out: cmd 'Set
> Stall' [404] params 00000000 00000000 00000000 --> status: Successful
> [ 1024.364734010       0x4afeae99e]   dbg_send_ep_cmd: ep0out: cmd
> 'Start Transfer' [406] params 00000000 efffa000 00000000 --> status:
> Successful
> [ 1024.776173803       0x4b063739a]   dbg_trace_log_ctrl: Clear Endpoint
> Feature(Halt ep5in)
> [ 1024.776907188       0x4b063aa9b]   dbg_send_ep_cmd: ep5in: cmd 'Clear
> Stall' [405] params 00000000 00000000 00000000 --> status: Successful
> [ 1024.777646147       0x4b063e208]   dbg_send_ep_cmd: ep0in: cmd 'Start
> Transfer' [406] params 00000000 efffa000 00000000 --> status: Successful
> [ 1024.788641980       0x4b0671ab8]   dbg_send_ep_cmd: ep0out: cmd
> 'Start Transfer' [406] params 00000000 efffa000 00000000 --> status:
> Successful
> [ 1024.799682397       0x4b06a56bf]   dbg_trace_log_ctrl: Clear Endpoint
> Feature(Halt ep4in)
> [ 1024.800442605       0x4b06a8fc3]   dbg_send_ep_cmd: ep0out: cmd 'Set
> Stall' [404] params 00000000 00000000 00000000 --> status: Successful
> [ 1024.801184584       0x4b06ac769]   dbg_send_ep_cmd: ep0out: cmd
> 'Start Transfer' [406] params 00000000 efffa000 00000000 --> status:
> Successful
> [ 1025.222173752       0x4b0e61d99]   dbg_trace_log_ctrl: Clear Endpoint
> Feature(Halt ep5in)
> [ 1025.222991669       0x4b0e65af1]   dbg_send_ep_cmd: ep5in: cmd 'Clear
> Stall' [405] params 00000000 00000000 00000000 --> status: Successful
> [ 1025.223850731       0x4b0e69b5f]   dbg_send_ep_cmd: ep0in: cmd 'Start
> Transfer' [406] params 00000000 efffa000 00000000 --> status: Successful
> [ 1025.239023492       0x4b0eb0d54]   dbg_send_ep_cmd: ep0out: cmd
> 'Start Transfer' [406] params 00000000 efffa000 00000000 --> status:
> Successful
> [ 1025.248963179       0x4b0edf6ce]   dbg_trace_log_ctrl: Clear Endpoint
> Feature(Halt ep4in)
> [ 1025.249709846       0x4b0ee2ecd]   dbg_send_ep_cmd: ep0out: cmd 'Set
> Stall' [404] params 00000000 00000000 00000000 --> status: Successful
> [ 1025.250533440       0x4b0ee6c93]   dbg_send_ep_cmd: ep0out: cmd
> 'Start Transfer' [406] params 00000000 efffa000 00000000 --> status:
> Successful
> [ 1025.667084535       0x4b16875e7]   dbg_trace_log_ctrl: Clear Endpoint
> Feature(Halt ep5in)
> [ 1025.667827764       0x4b168ada6]   dbg_send_ep_cmd: ep5in: cmd 'Clear
> Stall' [405] params 00000000 00000000 00000000 --> status: Successful
> [ 1025.668635993       0x4b168ea44]   dbg_send_ep_cmd: ep0in: cmd 'Start
> Transfer' [406] params 00000000 efffa000 00000000 --> status: Successful
> [ 1025.674777764       0x4b16ab6e7]   dbg_send_ep_cmd: ep0out: cmd
> 'Start Transfer' [406] params 00000000 efffa000 00000000 --> status:
> Successful
> [ 1025.684733597       0x4b16da197]   dbg_trace_log_ctrl: Clear Endpoint
> Feature(Halt ep4in)
> [ 1025.685336150       0x4b16dcec7]   dbg_send_ep_cmd: ep0out: cmd 'Set
> Stall' [404] params 00000000 00000000 00000000 --> status: Successful
> [ 1025.686112608       0x4b16e0904]   dbg_send_ep_cmd: ep0out: cmd
> 'Start Transfer' [406] params 00000000 efffa000 00000000 --> status:
> Successful
> [ 1025.698842347       0x4b171c3bf]   dbg_send_ep_cmd: ep0out: cmd 'Set
> Stall' [404] params 00000000 00000000 00000000 --> status: Successful
> [ 1026.444051569       0x4b24c1670]   dbg_send_ep_cmd: ep0out: cmd
> 'Start Transfer' [406] params 00000000 efffa000 00000000 --> status: No
> Resource

Why did this fail with No Resource? Was it sent before the control TRB
completion?

> [ 1027.225705425       0x4b3311678]   dbg_trace_log_ctrl: Clear Endpoint
> Feature(Halt ep5in)
> [ 1027.225820165       0x4b3311f14]   dbg_send_ep_cmd: ep5in: cmd 'Clear
> Stall' [405] params 00000000 00000000 00000000 --> status: Successful
> [ 1027.225931467       0x4b331276c]   dbg_send_ep_cmd: ep0in: cmd 'Start
> Transfer' [406] params 00000000 efffa000 00000000 --> status: Successful
> [ 1027.234311467       0x4b3339bed]   dbg_ep_dequeue: ep7in: req
> ffffff87f99b8f00 length 0/61696 zsI ==> -115
> [ 1027.247409123       0x4b337723f]   dbg_send_ep_cmd: ep7in: cmd 'End
> Transfer' [f0d08] params 00000000 00000000 00000000 --> status: Timed Out
> 

If the Start Transfer for ep0 failed and the Setup packet can't be
DMA'ed out, the End Transfer may not go through.

Can you leave the log unfiltered and is it possible to send as
attachment? It's missing some important info in this log.

Thanks,
Thinh

  reply	other threads:[~2022-02-25  1:26 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20220214111148epcas2p3fac143c7870c53ecadfb6b093fcf626b@epcas2p3.samsung.com>
2022-02-14 11:08 ` [PATCH v2 0/2] Fix ep command fail issue in dequeue Daehwan Jung
     [not found]   ` <CGME20220214111149epcas2p1a1faeda037991885fd6f2f026fa44ec5@epcas2p1.samsung.com>
2022-02-14 11:08     ` [PATCH v2 1/2] usb: dwc3: Not set DWC3_EP_END_TRANSFER_PENDING in ep cmd fails Daehwan Jung
2022-02-14 11:29       ` Greg Kroah-Hartman
2022-02-15  6:58         ` Jung Daehwan
2022-02-15  7:37           ` Greg Kroah-Hartman
2022-02-15  8:20             ` Jung Daehwan
2022-02-14 18:44       ` Thinh Nguyen
2022-02-15  6:39         ` Jung Daehwan
2022-02-15 17:14           ` Thinh Nguyen
2022-02-17 20:05             ` Wesley Cheng
2022-02-17 23:43               ` Thinh Nguyen
2022-02-22 18:08                 ` Wesley Cheng
2022-02-23  2:59                   ` Thinh Nguyen
2022-02-24 21:45                     ` Wesley Cheng
2022-02-25  1:26                       ` Thinh Nguyen [this message]
2022-02-25  1:31                         ` Wesley Cheng
2022-02-25  1:44                           ` Thinh Nguyen
2022-02-28 22:53                             ` Wesley Cheng
2022-03-01  1:09                               ` Thinh Nguyen
2022-03-01  2:09                                 ` Wesley Cheng
2022-03-01  3:02                                   ` Thinh Nguyen
2022-03-04 21:58                                     ` Wesley Cheng
2022-03-05  0:53                                       ` Thinh Nguyen
2022-03-07 22:57                                         ` Wesley Cheng
2022-03-07 23:51                                           ` Thinh Nguyen
2022-03-08 19:20                                             ` Wesley Cheng
2022-02-18  4:44             ` Jung Daehwan
2022-02-23  2:11               ` Thinh Nguyen
     [not found]   ` <CGME20220214111149epcas2p29b9e39b84d7203572422531beb3c39ed@epcas2p2.samsung.com>
2022-02-14 11:08     ` [PATCH v2 2/2] usb: dwc3: Prevent cleanup cancelled requests at the same time Daehwan Jung
2022-02-14 11:30       ` Greg Kroah-Hartman

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=810de66c-7d73-fae0-9356-b06b48134ad6@synopsys.com \
    --to=thinh.nguyen@synopsys.com \
    --cc=balbi@kernel.org \
    --cc=dh10.jung@samsung.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=quic_jackp@quicinc.com \
    --cc=quic_wcheng@quicinc.com \
    --cc=wcheng@codeaurora.org \
    /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).