]> git.baikalelectronics.ru Git - kernel.git/commit
net: cdc_mbim: send ZLP after max sized NTBs
authorBjørn Mork <bjorn@mork.no>
Mon, 21 Jan 2013 05:50:39 +0000 (05:50 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Jan 2013 19:21:17 +0000 (14:21 -0500)
commit9f3b7fe0e4b34b3df41ccb9dd4b2cf473e10f625
tree00d6ceae423e5d20aa353c78c2ecfa98d25f1af8
parent6974e64ec5d4b0a47deee6db0748b08cbcb1aa63
net: cdc_mbim: send ZLP after max sized NTBs

We normally avoid sending ZLPs by padding NTBs with a zero byte
if the NTB is shorter than dwNtbOutMaxSize, resulting in a short
USB packet instead of a ZLP.  But in the case where the NTB length
is exactly dwNtbOutMaxSize and this is an exact multiplum of
wMaxPacketSize, then we must send a ZLP.

This fixes an issue seen on a Sierra Wireless MC7710 device
where the transmission would fail whenever we ended up padding
the NTBs to max size.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/cdc_mbim.c