Hi,

jaswinder.si...@linaro.org writes:
> From: Jassi Brar <jaswinder.si...@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: signature.asc
Description: PGP signature

Reply via email to