[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150630003416.GA11066@saruman.tx.rr.com>
Date: Mon, 29 Jun 2015 19:34:16 -0500
From: Felipe Balbi <balbi@...com>
To: John Youn <John.Youn@...opsys.com>
CC: "balbi@...com" <balbi@...com>,
Subbaraya Sundeep Bhatta <subbaraya.sundeep.bhatta@...inx.com>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"stable@...r.kernel.org" <stable@...r.kernel.org>,
Subbaraya Sundeep Bhatta <sbhatta@...inx.com>
Subject: Re: [PATCH v2 3/3] usb: dwc3: gadget: return error if command sent
to DEPCMD register fails
On Mon, Jun 29, 2015 at 11:59:42PM +0000, John Youn wrote:
> On 6/29/2015 2:48 PM, Felipe Balbi wrote:
> > Hi again,
> >
> > On Mon, Jun 29, 2015 at 04:47:01PM -0500, Felipe Balbi wrote:
> >> On Thu, May 21, 2015 at 03:46:48PM +0530, Subbaraya Sundeep Bhatta wrote:
> >>> We need to return error to caller if command is not sent to
> >>> controller succesfully.
> >>>
> >>> Signed-off-by: Subbaraya Sundeep Bhatta <sbhatta@...inx.com>
> >>> Fixes: 72246da40f37 (usb: Introduce DesignWare USB3 DRD Driver)
> >>> Cc: <stable@...r.kernel.org>
> >>> ---
> >>> v2 changes:
> >>> Added Fixes and Cc in commit message.
> >>
> >> I noticed that this breaks at least my AM437x silicon with DWC3 2.40a
> >> when used with g_zero and testusb. As of now, it could be that silicon
> >> is mis-behaving because I got a Transfer Complete before the failing Set
> >> Endpoint Transfer Resource command.
> >>
> >> In any case, can you run on your setup with g_zero and test.sh/testusb
> >> [1]/[2] just to verify that it really works for you ?
> >>
> >> Meanwhile, I'll continue testing on my end.
> >>
> >> cheers
> >>
> >> [1] https://gitorious.org/usb/usb-tools/source/47ef073d9b6c0eae816204c81374aafb795c6e40:testusb.c
> >> [2] https://gitorious.org/usb/usb-tools/source/47ef073d9b6c0eae816204c81374aafb795c6e40:test.sh
> >
> > Adding John here. John, any chance you could fire up dwc3 on HAPS and
> > see wether it works or fails for you ?
> >
>
> Sure. I'll try to get to it tomorrow.
Thanks a lot :-) If you want to get low latency traces from dwc3 you
can:
# mount -t debugfs none /sys/kernel/debug
# cd /sys/kernel/debug/tracing
# echo 1024 > buffer_size_kb
# echo 1 > events/dwc3/enable
then load g_zero and, on the host, run:
# testusb -t 9 -c 5000 -s 2048 -a
After it fails just read the trace file:
# cat trace
To me, it's failing after 5 iterations. It seems that DWC3 either
notifies transfer completion too early (before Transfer Resource is
actually freed up) or it's returning 1 on Set Endpoint Transfer Resource
by mistake.
cheers
ps: please send along result from trace :-) Mine's attached
--
balbi
View attachment "trace-output.txt" of type "text/plain" (185157 bytes)
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists