lkml.org 
[lkml]   [2008]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] USB: g_file_storage: fix handling zero-length packet
Date
On Saturday 06 September 2008, Alan Stern wrote:
> Secondly, the patch is not needed.  g_file_storage doesn't have to
> check whether the data size is a multiple of MaxPacketSize because the
> device controller driver already is supposed to make that check.

Exactly.

The only fuzziness here is what to do if the host misbehaves and
sends another IN packet when all its data has been sent, instead
of the OUT/STATUS packet. (Host error...)

Most peripheral controller hardware is well enough designed that
it can detect this and send a zero length packet rather than STALL
the transfer. It's polite to do so, because that host bug isn't
exactly unknown. (Some old versions of Linux did that...)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2008-09-07 06:37    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site