All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: Alan Stern <stern@rowland.harvard.edu>,
	Jassi Brar <jassisinghbrar@gmail.com>
Cc: Jaswinder Singh <jaswinder.singh@linaro.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	<stable@vger.kernel.org>
Subject: Re: [PATCH] usb: gadget: function: acm: return zlp for OUT setup
Date: Wed, 14 Oct 2015 13:32:09 -0500	[thread overview]
Message-ID: <87y4f59u8m.fsf@saruman.tx.rr.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1510141341320.1644-100000@iolanthe.rowland.org>

[-- Attachment #1: Type: text/plain, Size: 777 bytes --]


Hi,

Alan Stern <stern@rowland.harvard.edu> writes:
> On Wed, 14 Oct 2015, Jassi Brar wrote:
>
>> BTW, should the gadget stack ever queue a Non-ZLP as reply to some
>> setup request that has USB_DIR_IN not set?
>
> Yes.  If USB_DIR_IN is not set then the control transfer is OUT, so the
> gadget needs to queue a request to receive some data from the host.  
> That request will obviously need to be a non-ZLP.  In fact, it's hard
> to think of a situation where a gadget would ever want to submit a
> zero-length OUT request.  Isn't the UDC driver supposed to handle the
> status stage of a control-IN transfer automatically?

yes and no. :-) If USB_GADGET_DELAYED_STATUS is returned, we need to
wait for the gadget driver to queue a request.

-- 
balbi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

  reply	other threads:[~2015-10-14 18:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-14 14:56 [PATCH] usb: gadget: function: acm: return zlp for OUT setup jaswinder.singh
2015-10-14 15:12 ` Felipe Balbi
2015-10-14 15:33   ` Jassi Brar
2015-10-14 15:48     ` Felipe Balbi
2015-10-14 16:43       ` Jassi Brar
2015-10-14 17:10         ` Felipe Balbi
2015-10-15  3:27           ` Jassi Brar
2015-10-15 19:18             ` Felipe Balbi
2015-10-14 17:48         ` Alan Stern
2015-10-14 18:32           ` Felipe Balbi [this message]
2015-10-14 19:32             ` Alan Stern
2015-10-15  3:38           ` Jassi Brar
2015-10-15 14:29             ` Alan Stern
2015-10-15 14:51               ` Jassi Brar
2015-10-15 16:55                 ` Alan Stern

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=87y4f59u8m.fsf@saruman.tx.rr.com \
    --to=balbi@ti.com \
    --cc=jassisinghbrar@gmail.com \
    --cc=jaswinder.singh@linaro.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /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.