usb: usbtmc: Optimize usbtmc_read
authorGuido Kiener <guido@kiener-muenchen.de>
Wed, 12 Sep 2018 08:51:02 +0000 (10:51 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Sep 2018 11:04:02 +0000 (13:04 +0200)
commitd7604ff0dc018f21d0363a8ebd424bf84cf41020
tree0d8a2df29688432ec20fc25190c6c547c09dcd5e
parent4d5e18d9ed93fcdf1bd625aac80048f6cd0063bc
usb: usbtmc: Optimize usbtmc_read

Use new usbtmc_generic_read function to maximize bandwidth
during long data transfer. Also fix reading of zero length
packet (ZLP) or trailing short packet.
The maximum input transfer size is limited to INT_MAX (=2GB).
Also remove redundant return in send_request_dev_dep_msg_in().

Signed-off-by: Guido Kiener <guido.kiener@rohde-schwarz.com>
Reviewed-by: Steve Bayless <steve_bayless@keysight.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/class/usbtmc.c