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

ioctl USBTMC_IOCTL_CANCEL_IO stops and kills all flying urbs of
last USBTMC_IOCTL_READ and USBTMC_IOCTL_WRITE function calls.
A subsequent call to USBTMC_IOCTL_READ or
USBTMC_IOCTL_WRITE_RESULT returns -ECANCELED with
information about current transferred data.

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