stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Huang Rui <ray.huang@amd.com>
To: Felipe Balbi <balbi@ti.com>
Cc: Linux USB Mailing List <linux-usb@vger.kernel.org>,
	David Cohen <david.a.cohen@linux.intel.com>,
	Subbaraya Sundeep Bhatta <subbaraya.sundeep.bhatta@xilinx.com>,
	Andy Gross <agross@codeaurora.org>, Kukjin Kim <kgene@kernel.org>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	John Youn <John.Youn@synopsys.com>, <stable@vger.kernel.org>,
	John Youn <johnyoun@synopsys.com>
Subject: Re: [PATCH] usb: dwc3: Reset the transfer resource index on SET_INTERFACE
Date: Wed, 22 Jul 2015 18:03:06 +0800	[thread overview]
Message-ID: <20150722100306.GD8121@hr-slim.amd.com> (raw)
In-Reply-To: <1437488958-2272-1-git-send-email-balbi@ti.com>

On Tue, Jul 21, 2015 at 09:29:17AM -0500, Felipe Balbi wrote:
> From: John Youn <John.Youn@synopsys.com>
> 
> This fixes an issue introduced in commit b23c843992b6 (usb: dwc3:
> gadget: fix DEPSTARTCFG for non-EP0 EPs) that made sure we would
> only use DEPSTARTCFG once per SetConfig.
> 
> The trick is that we should use one DEPSTARTCFG per SetConfig *OR*
> SetInterface. SetInterface was completely missed from the original
> patch.
> 
> This problem became aparent after commit 76e838c9f776 (usb: dwc3:
> gadget: return error if command sent to DEPCMD register fails)
> added checking of the return status of device endpoint commands.
> 
> 'Set Endpoint Transfer Resource' command was caught failing
> occasionally. This is because the Transfer Resource
> Index was not getting reset during a SET_INTERFACE request.
> 
> Finally, to fix the issue, was we have to do is make sure that
> our start_config_issued flag gets reset whenever we receive a
> SetInterface request.
> 
> To verify the problem (and its fix), all we have to do is run
> test 9 from testusb with 'testusb -t 9 -s 2048 -a -c 5000'.
> 
> Fixes: b23c843992b6 (usb: dwc3: gadget: fix DEPSTARTCFG for non-EP0 EPs)
> Cc: <stable@vger.kernel.org> # v3.2+
> Signed-off-by: John Youn <johnyoun@synopsys.com>
> Signed-off-by: Felipe Balbi <balbi@ti.com>

Felipe, I've verified it in my side. :)

ray@hr-slim:~/linux-usb$ sudo ./tools/usb/testusb -D /dev/bus/usb/002/004 -t 9 -s 2048 -a -c 5000
unknown speed   /dev/bus/usb/002/004    0
/dev/bus/usb/002/004 test 9,   15.300784 secs

Tested-by: Huang Rui <ray.huang@amd.com>

      parent reply	other threads:[~2015-07-22 11:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-21 14:29 [PATCH] usb: dwc3: Reset the transfer resource index on SET_INTERFACE Felipe Balbi
2015-07-21 14:29 ` Felipe Balbi
2015-07-22 12:59   ` Subbaraya Sundeep Bhatta
2015-07-22 10:03 ` Huang Rui [this message]

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=20150722100306.GD8121@hr-slim.amd.com \
    --to=ray.huang@amd.com \
    --cc=John.Youn@synopsys.com \
    --cc=agross@codeaurora.org \
    --cc=balbi@ti.com \
    --cc=david.a.cohen@linux.intel.com \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=johnyoun@synopsys.com \
    --cc=kgene@kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=subbaraya.sundeep.bhatta@xilinx.com \
    /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).