From: Felipe Balbi <balbi@kernel.org>
To: Jerry Zhang <zhangjerry@google.com>,
Michal Nazarewicz <mina86@mina86.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org, jerryxzha@gmail.com
Subject: usb: gadget: f_fs: Only return delayed status when len is 0
Date: Thu, 19 Jul 2018 08:48:32 +0300 [thread overview]
Message-ID: <87wotr7p3j.fsf@linux.intel.com> (raw)
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>
next reply other threads:[~2018-07-19 5:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-19 5:48 Felipe Balbi [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-07-20 13:57 usb: gadget: f_fs: Only return delayed status when len is 0 Greg Kroah-Hartman
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=87wotr7p3j.fsf@linux.intel.com \
--to=balbi@kernel.org \
--cc=gregkh@linuxfoundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.