• Guido Kiener's avatar
    usb: usbtmc: Add ioctl for vendor specific write · 4ddc645f
    Guido Kiener authored
    The new ioctl USBTMC_IOCTL_WRITE sends a generic message to bulk OUT.
    This ioctl is used for vendor specific or asynchronous I/O as well.
    
    The message is split into chunks of 4k (page size).
    Message size is aligned to 32 bit boundaries.
    
    With flag USBTMC_FLAG_ASYNC the ioctl is non blocking.
    With flag USBTMC_FLAG_APPEND additional urbs are queued and
    out_status/out_transfer_size is not reset. EPOLLOUT | EPOLLWRNORM
    is signaled when all submitted urbs are completed.
    
    Flush flying urbs when file handle is closed or device is
    suspended or reset.
    
    This ioctl does not support compatibility for 32 bit
    applications running on 64 bit systems. However all other
    convenient ioctls of the USBTMC driver can still be used in 32
    bit applications as well. Note that 32 bit applications running
    on 32 bit target systems are not affected by this limitation.
    Signed-off-by: default avatarGuido Kiener <guido.kiener@rohde-schwarz.com>
    Reviewed-by: default avatarSteve Bayless <steve_bayless@keysight.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    4ddc645f
usbtmc.c 51.1 KB