linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Felipe Balbi <balbi@kernel.org>
Cc: Jerry Zhang <zhangjerry@google.com>,
	Michal Nazarewicz <mina86@mina86.com>,
	linux-usb@vger.kernel.org, jerryxzha@gmail.com
Subject: usb: gadget: f_fs: Only return delayed status when len is 0
Date: Fri, 20 Jul 2018 15:57:04 +0200	[thread overview]
Message-ID: <20180720135704.GA460@kroah.com> (raw)

On Thu, Jul 19, 2018 at 08:48:32AM +0300, Felipe Balbi wrote:
> 
> Hi,
> 
> Jerry Zhang <zhangjerry@google.com> writes:
> > Commit 1b9ba000 ("Allow function drivers to pause control
> > transfers") states that USB_GADGET_DELAYED_STATUS is only
> > supported if data phase is 0 bytes.
> >
> > It seems that when the length is not 0 bytes, there is no
> > need to explicitly delay the data stage since the transfer
> > is not completed until the user responds. However, when the
> > length is 0, there is no data stage and the transfer is
> > finished once setup() returns, hence there is a need to
> > explicitly delay completion.
> >
> > This manifests as the following bugs:
> >
> > Prior to 946ef68ad4e4 ('Let setup() return
> > USB_GADGET_DELAYED_STATUS'), when setup is 0 bytes, ffs
> > would require user to queue a 0 byte request in order to
> > clear setup state. However, that 0 byte request was actually
> > not needed and would hang and cause errors in other setup
> > requests.
> >
> > After the above commit, 0 byte setups work since the gadget
> > now accepts empty queues to ep0 to clear the delay, but all
> > other setups hang.
> >
> > Fixes: 946ef68ad4e4 ("Let setup() return USB_GADGET_DELAYED_STATUS")
> > Signed-off-by: Jerry Zhang <zhangjerry@google.com>
> 
> Greg, can you pick this one manually?
> 
> Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>

Yes, I'll pick it up, thanks.

greg k-h
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

             reply	other threads:[~2018-07-20 13:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-20 13:57 Greg Kroah-Hartman [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-07-19  5:48 usb: gadget: f_fs: Only return delayed status when len is 0 Felipe Balbi
2018-07-18 22:57 Jerry Zhang
2018-07-02 19:48 Jerry Zhang

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=20180720135704.GA460@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=balbi@kernel.org \
    --cc=jerryxzha@gmail.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=mina86@mina86.com \
    --cc=zhangjerry@google.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).