diff options
author | Guido Kiener <guido@kiener-muenchen.de> | 2018-09-12 10:50:55 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-09-20 13:04:02 +0200 |
commit | 46ecc9d54efc11bf99689901f867854d264cbc0b (patch) | |
tree | 0aed4f5b315265e2f77d31ebc915055e04b75552 /drivers/usb/class | |
parent | bb99794a4792068cb4bfd40e99e0f9d8fe7872fa (diff) | |
download | linux-riscv-46ecc9d54efc11bf99689901f867854d264cbc0b.tar.gz linux-riscv-46ecc9d54efc11bf99689901f867854d264cbc0b.tar.bz2 linux-riscv-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 'drivers/usb/class')
-rw-r--r-- | drivers/usb/class/usbtmc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c index 45ccdd087d6f..0d8aa4bc3fa7 100644 --- a/drivers/usb/class/usbtmc.c +++ b/drivers/usb/class/usbtmc.c @@ -2126,6 +2126,10 @@ static long usbtmc_ioctl(struct file *file, unsigned int cmd, unsigned long arg) case USBTMC488_IOCTL_TRIGGER: retval = usbtmc488_ioctl_trigger(file_data); break; + + case USBTMC_IOCTL_CANCEL_IO: + retval = usbtmc_ioctl_cancel_io(file_data); + break; } skip_io_on_zombie: |