]> git.karo-electronics.de Git - karo-tx-linux.git/commit
USB: usbtmc: repeat usb_bulk_msg until whole message is transfered
authorAndre Herms <andre.herms@tec-venture.de>
Thu, 19 Nov 2009 17:14:49 +0000 (18:14 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 18 Dec 2009 21:43:36 +0000 (13:43 -0800)
commit0e8bd42b299f811fd38b5f1117127db741113b04
tree660c0fe2ea54d037c91be96afbf30d4bf679e3ee
parent2e8ca1b618a6df647e0557317a8c0fc7f17c5988
USB: usbtmc: repeat usb_bulk_msg until whole message is transfered

commit ec412b92dbe3ea839716853eea058d1bcc5e6ca4 upstream.

usb_bulk_msg() transfers only bytes up to the maximum packet size.
It must be repeated by the usbtmc driver until all bytes of a TMC message
are transfered.

Without this patch, ETIMEDOUT is reported when writing TMC messages
larger than the maximum USB bulk size and the transfer remains incomplete.
The user will notice that the device hangs and must be reset by either closing
the application or pulling the plug.

Signed-off-by: Andre Herms <andre.herms@tec-venture.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/class/usbtmc.c