From: Sergei Shtylyov Date: Sat, 21 Feb 2009 23:31:23 +0000 (-0800) Subject: USB: musb: be careful with 64K+ transfer lengths, host side X-Git-Tag: v2.6.29-rc7~22^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ecdb9acf343bbcf2bb2c287dc524ab709cfad7e;p=pandora-kernel.git USB: musb: be careful with 64K+ transfer lengths, host side Feeding 32-bit length cast down to 'u16' to min() to calculate the FIFO count in musb_host_tx() risks sending a short packet prematurely for transfer sizes over 64 KB. Similarly, although data transfer size shouldn't exceed 65535 bytes for the control endpoint, making musb_h_ep0_continue() more robust WRT URBs with possibly oversized buffer will not hurt either... Signed-off-by: Sergei Shtylyov Signed-off-by: David Brownell Cc: Felipe Balbi Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed