|
From: Tim R. <ti...@pr...> - 2014-01-02 18:49:26
|
Alan Stern wrote: > > But if the byte count is a multiple of 512 then sending a short packet > will involve an extra, unnecessary transfer. For example, suppose the > byte count is 614400. You send that many bytes (broken up into 1200 > 512-byte packets) and then send a short packet containing 0 bytes. > > The host receives the 1200 packets of data and realizes the transfer > has ended, because the byte count has been fulfilled. So then the host > starts the next transfer. But this one ends immediately, because it is > terminated when the 0-byte packet arrives. This causes extra trouble > for the host. That's an excellent point. If the device follows the short packet religion consistently, then the host driver/application needs to send requests that are larger than expected. So, if I expected 614,400 bytes, I'd send a 700k byte buffer. -- Tim Roberts, ti...@pr... Providenza & Boekelheide, Inc. |