Re: usb transfer length

2018-02-26 Thread Oliver Neukum
Am Montag, den 26.02.2018, 16:41 +0200 schrieb Ran Shalit:
> Hello,
> 
> When performing usb transfer we request for maximum size of transfer,
> yet another size of message (shorter or longer) might be sent from
> device to host.
> 
> Are both cases (shorter/longer) legal in usb standard  ?

No. Shorter is OK, longer is not. Remember that USB transfers
are packaged. A transfer is divided into packages. A transfer is
terminated prematurely if a package is not filled to capacity.
I would suggest you get an introductory book and read the kernel's
documentation on the API. Short transfers are described.

HTH
Oliver

--
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


usb transfer length

2018-02-26 Thread Ran Shalit
Hello,

When performing usb transfer we request for maximum size of transfer,
yet another size of message (shorter or longer) might be sent from
device to host.

Are both cases (shorter/longer) legal in usb standard  ?

In case both are legal:
If it is shorter, I guess there is no issue at all.
If it is longer - the host must perform transfer for the remaining of
the message. Is that correct ?

Thank you,
ranran
--
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