usb: wusbcore: fix short transfers
authorThomas Pugliese <thomas.pugliese@gmail.com>
Mon, 9 Dec 2013 19:10:41 +0000 (13:10 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Dec 2013 21:26:35 +0000 (13:26 -0800)
commit7005234c18f233d3613b09e9ce4b6ce6977bf246
tree6612b7a847c145ff7b27ab469c2dc6f885f28bc1
parente0e6a356a0b41375b729c511caa99d3ec019640e
usb: wusbcore: fix short transfers

If a URB is broken up into multiple transfer segments and a short
transfer occurs in any segment other than the last, the URB will
currently get stuck in the driver forever.  This patch adds a check for
a short transfer and cleans up any pending segments so the URB can
complete properly.

Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/wusbcore/wa-xfer.c