summaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/usb
diff options
context:
space:
mode:
authorGuido Kiener2018-09-12 10:50:55 +0200
committerGreg Kroah-Hartman2018-09-20 13:04:02 +0200
commit46ecc9d54efc11bf99689901f867854d264cbc0b (patch)
tree0aed4f5b315265e2f77d31ebc915055e04b75552 /include/uapi/linux/usb
parentusb: usbtmc: Add ioctl for vendor specific read (diff)
downloadkernel-qcow2-linux-46ecc9d54efc11bf99689901f867854d264cbc0b.tar.gz
kernel-qcow2-linux-46ecc9d54efc11bf99689901f867854d264cbc0b.tar.xz
kernel-qcow2-linux-46ecc9d54efc11bf99689901f867854d264cbc0b.zip
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>
Diffstat (limited to 'include/uapi/linux/usb')
-rw-r--r--include/uapi/linux/usb/tmc.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/uapi/linux/usb/tmc.h b/include/uapi/linux/usb/tmc.h
index f0fd0d4334ec..42e275d1d385 100644
--- a/include/uapi/linux/usb/tmc.h
+++ b/include/uapi/linux/usb/tmc.h
@@ -97,6 +97,9 @@ struct usbtmc_message {
#define USBTMC488_IOCTL_LOCAL_LOCKOUT _IO(USBTMC_IOC_NR, 21)
#define USBTMC488_IOCTL_TRIGGER _IO(USBTMC_IOC_NR, 22)
+/* Cancel and cleanup asynchronous calls */
+#define USBTMC_IOCTL_CANCEL_IO _IO(USBTMC_IOC_NR, 35)
+
/* Driver encoded usb488 capabilities */
#define USBTMC488_CAPABILITY_TRIGGER 1
#define USBTMC488_CAPABILITY_SIMPLE 2