Re: [PATCH] USB: musb: respect usb_request->zero in control requests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 10 Nov 2009, [utf-8] Daniel Glöckner wrote:

> In gadget mode the answer to a control request should be followed by
> a zero-length packet if the amount transferred is an exact multiple of
> the endpoint's packet size and the requests has its "zero" flag set.
> 
> This patch prevents the request from being immediately removed from the
> queue when a control IN transfer ends on a full packet and "zero" is set.
> The next time ep0_txstate is entered, a zero-length packet is queued and
> the request is removed as fifo_count is 0.

I don't understand the code, but your description is wrong.  The 
response to a control-IN request should _not_ be followed by a ZLP even 
if the amount transferred is an exact multiple of the maxpacket size 
and the "zero" flag is set, provided the length is equal to the wLength 
value in the setup packet.

ZLP's are used only to delimit _short_ transfers.  If the length is the 
same as what the host asked for, then it isn't short.

Alan Stern

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

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux