From: Felipe Balbi <balbi@ti.com>
To: <jaswinder.singh@linaro.org>, <linux-usb@vger.kernel.org>
Cc: <stable@vger.kernel.org>, Jassi Brar <jaswinder.singh@linaro.org>
Subject: Re: [PATCH] usb: gadget: function: acm: return zlp for OUT setup
Date: Wed, 14 Oct 2015 10:12:44 -0500 [thread overview]
Message-ID: <87mvvlbi1f.fsf@saruman.tx.rr.com> (raw)
In-Reply-To: <1444834590-25759-1-git-send-email-jassisinghbrar@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 819 bytes --]
Hi,
jaswinder.singh@linaro.org writes:
> From: Jassi Brar <jaswinder.singh@linaro.org>
>
> We must return 0 for any OUT setup request, otherwise
> protocol error may occur.
have you seen any such errors ? composite.c treats >=0 as success:
if (value >= 0 && value != USB_GADGET_DELAYED_STATUS) {
req->length = value;
req->context = cdev;
req->zero = value < w_length;
value = composite_ep0_queue(cdev, req, GFP_ATOMIC);
if (value < 0) {
DBG(cdev, "ep_queue --> %d\n", value);
req->status = 0;
composite_setup_complete(gadget->ep0, req);
}
} else if ....
We actually NEED to return w_length to cope with the need for ZLPs. Care
to describe what problems you have seen and which UDC you were using,
what's the exact scenario. How have you tested this ?
--
balbi
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]
next prev parent reply other threads:[~2015-10-14 15:12 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 [this message]
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
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=87mvvlbi1f.fsf@saruman.tx.rr.com \
--to=balbi@ti.com \
--cc=jaswinder.singh@linaro.org \
--cc=linux-usb@vger.kernel.org \
--cc=stable@vger.kernel.org \
/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