]> asedeno.scripts.mit.edu Git - linux.git/commit
usb: usbtmc: Support Read Status Byte with SRQ per file
authorGuido Kiener <guido@kiener-muenchen.de>
Wed, 18 Jul 2018 08:45:34 +0000 (10:45 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Jul 2018 06:22:15 +0000 (08:22 +0200)
commit4f3c8d6eddc272b386464524235440a418ed2029
tree2a6bcbd4f499ec765e710d9c0f8b18366b9181e8
parent04b453c859d3be8f3f992f929bfa2957db184e4b
usb: usbtmc: Support Read Status Byte with SRQ per file

Add 'struct usbtmc_file_data' for each file handle to cache last
srq_byte (=Status Byte with SRQ) received by usbtmc_interrupt(..)

usbtmc488_ioctl_read_stb returns cached srq_byte when available for
each file handle to avoid race conditions of concurrent applications.

SRQ now sets EPOLLPRI instead of EPOLLIN since EPOLLIN is now reserved
for asynchronous reads

Tested-by: Dave Penkler <dpenkler@gmail.com>
Reviewed-by: Steve Bayless <steve_bayless@keysight.com>
Signed-off-by: Guido Kiener <guido.kiener@rohde-schwarz.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/class/usbtmc.c