<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/uapi/linux/usb/tmc.h, branch v6.6.132</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.132</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.132'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2020-12-28T14:50:30+00:00</updated>
<entry>
<title>USB: usbtmc: Add separate USBTMC_IOCTL_GET_SRQ_STB</title>
<updated>2020-12-28T14:50:30+00:00</updated>
<author>
<name>Dave Penkler</name>
<email>dpenkler@gmail.com</email>
</author>
<published>2020-12-15T15:56:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d1d9defdc6d582119d29f5d88f810b72bb1837fa'/>
<id>urn:sha1:d1d9defdc6d582119d29f5d88f810b72bb1837fa</id>
<content type='text'>
This new ioctl only returns the status byte (STB) that was originally
sent by the device due to a service request (SRQ) condition.

This ioctl checks the srq_asserted bit of the associated file
descriptor. If set, the srq_asserted bit is reset and the cached
STB with original SRQ information is returned. Otherwise the ioctl
returns the error code ENOMSG.

This ioctl is useful to support non USBTMC-488 compliant devices.
Time sensitive applications can read the cached STB without incurring
the cost of an urb transaction over the bus.

Tested-by: Jian-Wei Wu &lt;jian-wei_wu@keysight.com&gt;
Reviewed-by: Guido Kiener &lt;guido.kiener@rohde-schwarz.com&gt;
Signed-off-by: Dave Penkler &lt;dpenkler@gmail.com&gt;
Link: https://lore.kernel.org/r/20201215155621.9592-4-dpenkler@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: usbtmc: Add USBTMC_IOCTL_GET_STB</title>
<updated>2020-12-28T14:50:30+00:00</updated>
<author>
<name>Dave Penkler</name>
<email>dpenkler@gmail.com</email>
</author>
<published>2020-12-15T15:56:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c9784e23c1020e63d6dba5e10ca8bf3d8b85c19c'/>
<id>urn:sha1:c9784e23c1020e63d6dba5e10ca8bf3d8b85c19c</id>
<content type='text'>
This new ioctl reads the status byte (STB) from the device and returns
the STB unmodified to the application. The srq_asserted bit is not taken
into account and not changed.

This ioctl is useful to support non USBTMC-488 compliant devices.

Tested-by: Jian-Wei Wu &lt;jian-wei_wu@keysight.com&gt;
Reviewed-by: Guido Kiener &lt;guido.kiener@rohde-schwarz.com&gt;
Signed-off-by: Dave Penkler &lt;dpenkler@gmail.com&gt;
Link: https://lore.kernel.org/r/20201215155621.9592-3-dpenkler@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: usbtmc: Add ioctl USBTMC_IOCTL_API_VERSION</title>
<updated>2018-09-20T11:04:02+00:00</updated>
<author>
<name>Guido Kiener</name>
<email>guido@kiener-muenchen.de</email>
</author>
<published>2018-09-12T08:51:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e013477bc20763e28d95d74e5ca97411194984ec'/>
<id>urn:sha1:e013477bc20763e28d95d74e5ca97411194984ec</id>
<content type='text'>
Add ioctl USBTMC_IOCTL_API_VERSION to get current API version
of usbtmc driver.

This is to allow an instrument library to determine whether
the driver API is compatible with the implementation.

The API may change in future versions. Therefore the macro
USBTMC_API_VERSION should be incremented when changing tmc.h
with new flags, ioctls or when changing a significant behavior
of the driver.

Signed-off-by: Guido Kiener &lt;guido.kiener@rohde-schwarz.com&gt;
Reviewed-by: Steve Bayless &lt;steve_bayless@keysight.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: usbtmc: Add ioctl USBTMC_IOCTL_AUTO_ABORT</title>
<updated>2018-09-20T11:04:02+00:00</updated>
<author>
<name>Guido Kiener</name>
<email>guido@kiener-muenchen.de</email>
</author>
<published>2018-09-12T08:51:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ec34d08eff71b6cc69bacd70906cf9ff0d8c87a4'/>
<id>urn:sha1:ec34d08eff71b6cc69bacd70906cf9ff0d8c87a4</id>
<content type='text'>
Add ioctl USBTMC_IOCTL_AUTO_ABORT to configure auto_abort for
each specific file handle.

Signed-off-by: Guido Kiener &lt;guido.kiener@rohde-schwarz.com&gt;
Reviewed-by: Steve Bayless &lt;steve_bayless@keysight.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: usbtmc: add ioctl USBTMC_IOCTL_MSG_IN_ATTR</title>
<updated>2018-09-20T11:04:02+00:00</updated>
<author>
<name>Guido Kiener</name>
<email>guido@kiener-muenchen.de</email>
</author>
<published>2018-09-12T08:50:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8409e96f012a777ad9ca2050d567d766e43ec343'/>
<id>urn:sha1:8409e96f012a777ad9ca2050d567d766e43ec343</id>
<content type='text'>
add ioctl USBTMC_IOCTL_MSG_IN_ATTR that returns the specific
bmTransferAttributes field of the last DEV_DEP_MSG_IN Bulk-IN
header. This header is received by the read() function. The
meaning of the (u8) bitmap bmTransferAttributes is:

Bit 0 = EOM flag is set when the last transfer of a USBTMC
message is received.

Bit 1 = is set when the last byte is a termchar (e.g. '\n').
Note that this bit is always zero when the device does not support
the termchar feature or when termchar detection is not enabled
(see ioctl USBTMC_IOCTL_CONFIG_TERMCHAR).

Signed-off-by: Guido Kiener &lt;guido.kiener@rohde-schwarz.com&gt;
Reviewed-by: Steve Bayless &lt;steve_bayless@keysight.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: usbtmc: Add ioctl USBTMC488_IOCTL_WAIT_SRQ</title>
<updated>2018-09-20T11:04:02+00:00</updated>
<author>
<name>Guido Kiener</name>
<email>guido@kiener-muenchen.de</email>
</author>
<published>2018-09-12T08:50:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=739240a9f6ac4d4c841081029874b3521744e490'/>
<id>urn:sha1:739240a9f6ac4d4c841081029874b3521744e490</id>
<content type='text'>
Wait until an SRQ (service request) is received on the interrupt pipe
or until the given period of time is expired. In contrast to the
poll() function this ioctl does not return when other (a)synchronous
I/O operations fail with EPOLLERR.

Signed-off-by: Guido Kiener &lt;guido.kiener@rohde-schwarz.com&gt;
Reviewed-by: Steve Bayless &lt;steve_bayless@keysight.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: usbtmc: Add ioctl USBTMC_IOCTL_CLEANUP_IO</title>
<updated>2018-09-20T11:04:02+00:00</updated>
<author>
<name>Guido Kiener</name>
<email>guido@kiener-muenchen.de</email>
</author>
<published>2018-09-12T08:50:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=987b81998b41563113f714009e7e748e1211026d'/>
<id>urn:sha1:987b81998b41563113f714009e7e748e1211026d</id>
<content type='text'>
The ioctl USBTMC_IOCTL_CLEANUP_IO kills all submitted urbs to OUT
and IN bulk, and clears all received data from IN bulk. Internal
transfer counters and error states are reset.

An application should use this ioctl after an asnychronous transfer
was canceled and/or error handling has finished.

Signed-off-by: Guido Kiener &lt;guido.kiener@rohde-schwarz.com&gt;
Reviewed-by: Steve Bayless &lt;steve_bayless@keysight.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: usbtmc: Add ioctl USBTMC_IOCTL_CANCEL_IO</title>
<updated>2018-09-20T11:04:02+00:00</updated>
<author>
<name>Guido Kiener</name>
<email>guido@kiener-muenchen.de</email>
</author>
<published>2018-09-12T08:50:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=46ecc9d54efc11bf99689901f867854d264cbc0b'/>
<id>urn:sha1:46ecc9d54efc11bf99689901f867854d264cbc0b</id>
<content type='text'>
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 &lt;guido.kiener@rohde-schwarz.com&gt;
Reviewed-by: Steve Bayless &lt;steve_bayless@keysight.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: usbtmc: Add ioctl for vendor specific read</title>
<updated>2018-09-20T11:04:02+00:00</updated>
<author>
<name>Guido Kiener</name>
<email>guido@kiener-muenchen.de</email>
</author>
<published>2018-09-12T08:50:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bb99794a4792068cb4bfd40e99e0f9d8fe7872fa'/>
<id>urn:sha1:bb99794a4792068cb4bfd40e99e0f9d8fe7872fa</id>
<content type='text'>
The USBTMC_IOCTL_READ call provides for generic synchronous and
asynchronous reads on bulk IN to implement vendor specific library
routines.

Depending on transfer_size the function submits one or more urbs (up
to 16) each with a size of up to 4kB.

The flag USBTMC_FLAG_IGNORE_TRAILER can be used when the transmission
size is already known. Then the function does not truncate the
transfer_size to a multiple of 4 kB, but does reserve extra space
to receive the final short or zero length packet. Note that the
instrument is allowed to send up to wMaxPacketSize - 1 bytes at the
end of a message to avoid sending a zero length packet.

With flag USBTMC_FLAG_ASYNC the ioctl is non blocking. When no
received data is available, the read function submits as many urbs as
needed to receive transfer_size bytes. However the number of flying
urbs (=4kB) is limited to 16 even with subsequent calls of this ioctl.

Returns -EAGAIN when non blocking and no data is received.
Signals EPOLLIN | EPOLLRDNORM when asynchronous urbs are ready to
be read.

In non blocking mode the usbtmc_message.message pointer may be NULL
and the ioctl just submits urbs to initiate receiving data. However if
data is already available due to a previous non blocking call the ioctl
will return -EINVAL when the message pointer is NULL.

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: Guido Kiener &lt;guido.kiener@rohde-schwarz.com&gt;
Reviewed-by: Steve Bayless &lt;steve_bayless@keysight.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: usbtmc: Add ioctl USBTMC_IOCTL_WRITE_RESULT</title>
<updated>2018-09-20T11:04:02+00:00</updated>
<author>
<name>Guido Kiener</name>
<email>guido@kiener-muenchen.de</email>
</author>
<published>2018-09-12T08:50:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b14984518ee60ef7662aa6520b76ae6046e08857'/>
<id>urn:sha1:b14984518ee60ef7662aa6520b76ae6046e08857</id>
<content type='text'>
ioctl USBTMC_IOCTL_WRITE_RESULT copies current out_transfer_size
to given __u32 pointer and returns current out_status of the last
(asnynchronous) USBTMC_IOCTL_WRITE call.

Signed-off-by: Guido Kiener &lt;guido.kiener@rohde-schwarz.com&gt;
Reviewed-by: Steve Bayless &lt;steve_bayless@keysight.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
