usb: usbtmc: Add ioctl USBTMC_IOCTL_CLEANUP_IO
authorGuido Kiener <guido@kiener-muenchen.de>
Wed, 12 Sep 2018 08:50:56 +0000 (10:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Sep 2018 11:04:02 +0000 (13:04 +0200)
commit987b81998b41563113f714009e7e748e1211026d
treee7b4239e0a855080277791ab6af127655a06f1ed
parent46ecc9d54efc11bf99689901f867854d264cbc0b
usb: usbtmc: Add ioctl USBTMC_IOCTL_CLEANUP_IO

The ioctl USBTMC_IOCTL_CLEANUP_IO kills all submitted urbs to OUT
and IN bulk, and clears all received data from IN bulk. Internal
transfer counters and error states are reset.

An application should use this ioctl after an asnychronous transfer
was canceled and/or error handling has finished.

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
include/uapi/linux/usb/tmc.h