On Fri, 31 Oct 2014, Peter Stuge wrote:

> Breton M. Saunders wrote:
> > Are zero length transfers from a device to the PC on a bulk endpoint 
> > sensible?
> 
> I don't see how they could be.
> 
> If the device has no data to send it responds with a NAK handshake.
> 
> If the device has data to send it responds with the data.

But what if the host expects to receive data and the device has no data 
to send?  In that case the device must send a zero-length packet.  
Otherwise the host will hang, waiting for data that the device will 
never send.

This is required behavior, for example, during the data phase of a 
bulk-only mass-storage transfer.  The specification states that under 
certain circumstances, the device _must_ send a zero-length packet on 
its bulk-IN endpoint.

Alan Stern

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

Reply via email to