Zitat von Greg KH <gre...@linuxfoundation.org>:
On Thu, May 17, 2018 at 07:03:26PM +0200, Guido Kiener wrote:
- 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
Zitat von Greg KH <gre...@linuxfoundation.org>:
On Thu, May 17, 2018 at 07:03:24PM +0200, Guido Kiener wrote:
The working group "VISA for Linux" of the IVI Foundation
www.ivifoundation.org specifies common rules, shared libraries and
drivers to implement the specifica
Zitat von Greg KH <gre...@linuxfoundation.org>:
On Thu, May 17, 2018 at 07:03:28PM +0200, Guido Kiener wrote:
- add USBTMC488_IOCTL_TRIGGER to send TRIGGER Bulk-OUT header
according to Subclass USB488 Specification
The usbtmc trigger command is equivalent to the IEEE 488 GET
Zitat von Greg KH :
@@ -122,7 +141,7 @@ static int usbtmc_open(struct inode *inode,
struct file *filp)
{
struct usb_interface *intf;
struct usbtmc_device_data *data;
- int retval = 0;
+ struct usbtmc_file_data *file_data;
intf
Zitat von Greg KH <gre...@linuxfoundation.org>:
On Fri, May 18, 2018 at 02:48:11PM +, gu...@kiener-muenchen.de wrote:
Zitat von Greg KH <gre...@linuxfoundation.org>:
> On Thu, May 17, 2018 at 07:03:30PM +0200, Guido Kiener wrote:
> > +/*
> >
> Zitat von Greg KH <gre...@linuxfoundation.org>:
> >
> > > On Thu, May 17, 2018 at 07:03:30PM +0200, Guido Kiener wrote:
> > > > +/*
> > > > + * usbtmc_message->flags:
> > > > + */
> > > > +#define USBTMC_FLAG_ASYNC 0x0001
&g
Zitat von Oliver Neukum <oneu...@suse.com>:
Am Montag, den 21.05.2018, 21:00 + schrieb guido@kiener-
muenchen.de:
I looked for a race here, but I do not find a race between open and release,
since a refcount of "file_data->data->kref" is always hold by
usbtmc_probe/
Zitat von Oliver Neukum <oneu...@suse.com>:
Am Donnerstag, den 17.05.2018, 19:03 +0200 schrieb Guido Kiener:
+ retval = usb_bulk_msg(data->usb_dev,
+ usb_sndbulkpipe(data->usb_dev,
+ da
Zitat von Oliver Neukum <oneu...@suse.com>:
Am Donnerstag, den 17.05.2018, 19:03 +0200 schrieb Guido Kiener:
+static int usbtmc488_ioctl_wait_srq(struct usbtmc_file_data *file_data,
+ unsigned int __user *arg)
+{
+ struct usbtmc_device_data
Zitat von Greg KH <gre...@linuxfoundation.org>:
On Fri, May 18, 2018 at 03:02:10PM +, gu...@kiener-muenchen.de wrote:
Zitat von Greg KH <gre...@linuxfoundation.org>:
> On Thu, May 17, 2018 at 07:03:31PM +0200, Guido Kiener wrote:
> > @@ -2420,8 +2476,8 @@ static in
Zitat von Greg KH <gre...@linuxfoundation.org>:
On Thu, May 17, 2018 at 07:03:30PM +0200, Guido Kiener wrote:
- ioctl USBTMC_IOCTL_WRITE sends an (a)synchronous generic message
to bulk OUT. The message is split into chunks of 4k (page size).
Message size is aligned to 32 bit boun
Zitat von Greg KH <gre...@linuxfoundation.org>:
On Thu, May 17, 2018 at 07:03:30PM +0200, Guido Kiener wrote:
+/*
+ * usbtmc_message->flags:
+ */
+#define USBTMC_FLAG_ASYNC 0x0001
+#define USBTMC_FLAG_APPEND 0x0002
+#define USBTMC_FLAG_IGNORE_TRAILER
Zitat von Greg KH <gre...@linuxfoundation.org>:
On Thu, May 17, 2018 at 07:03:27PM +0200, Guido Kiener wrote:
Add ioctls USBTMC_IOCTL_GET_TIMEOUT / USBTMC_IOCTL_SET_TIMEOUT to
get/set I/O timeout for specific file handle.
Different operations on an instrument can take different l
Zitat von Greg KH <gre...@linuxfoundation.org>:
On Thu, May 17, 2018 at 07:03:31PM +0200, Guido Kiener wrote:
@@ -2420,8 +2476,8 @@ static int usbtmc_probe(struct usb_interface *intf,
retcode = usb_register_dev(intf, _class);
if (retcode) {
- dev_er
Zitat von Greg KH <gre...@linuxfoundation.org>:
On Fri, May 18, 2018 at 02:48:11PM +, gu...@kiener-muenchen.de wrote:
Zitat von Greg KH <gre...@linuxfoundation.org>:
> On Thu, May 17, 2018 at 07:03:30PM +0200, Guido Kiener wrote:
> > +/*
> >
Zitat von Greg KH <gre...@linuxfoundation.org>:
On Fri, May 18, 2018 at 11:52:36AM +, gu...@kiener-muenchen.de wrote:
Zitat von Greg KH <gre...@linuxfoundation.org>:
> On Thu, May 17, 2018 at 07:03:26PM +0200, Guido Kiener wrote:
> > - Add 'struct usbtmc_file_data'
Zitat von Greg KH <gre...@linuxfoundation.org>:
On Thu, May 17, 2018 at 07:03:29PM +0200, Guido Kiener wrote:
Add USBTMC_IOCTL_CTRL_REQUEST to send arbitrary requests on the
control pipe. Used by specific applications of IVI Foundation,
Inc. to implement VISA API functions: viUsbCon
Zitat von Andy Shevchenko <andy.shevche...@gmail.com>:
On Thu, May 17, 2018 at 8:03 PM, Guido Kiener
<gu...@kiener-muenchen.de> wrote:
Add ioctls USBTMC_IOCTL_GET_TIMEOUT / USBTMC_IOCTL_SET_TIMEOUT to
get/set I/O timeout for specific file handle.
+static int usbtmc_ioctl
Zitat von Oliver Neukum <oneu...@suse.com>:
Am Donnerstag, den 24.05.2018, 12:59 + schrieb guido@kiener-
muenchen.de:
Zitat von Oliver Neukum <oneu...@suse.com>:
> Am Donnerstag, den 17.05.2018, 19:03 +0200 schrieb Guido Kiener:
> > +static int usbtmc488_
Zitat von Greg KH :
On Mon, Jul 30, 2018 at 10:04:30AM +0200, Guido Kiener wrote:
The working group "VISA for Linux" of the IVI Foundation
www.ivifoundation.org specifies common rules, shared libraries and
drivers to implement the specification of "VPP-4.3: The VISA Li
Zitat von Greg KH :
On Wed, Jul 18, 2018 at 10:45:41AM +0200, Guido Kiener wrote:
Add USBTMC_IOCTL_CTRL_REQUEST to send arbitrary requests on the
control pipe. Used by specific applications of IVI Foundation,
Inc. to implement VISA API functions: viUsbControlIn/Out.
The maximum length
Zitat von Greg KH :
On Sat, Jul 21, 2018 at 11:11:55AM +, gu...@kiener-muenchen.de wrote:
Zitat von Greg KH :
> On Wed, Jul 18, 2018 at 10:45:41AM +0200, Guido Kiener wrote:
> > Add USBTMC_IOCTL_CTRL_REQUEST to send arbitrary requests on the
> > control pipe. U
Zitat von Greg KH :
On Tue, Jul 24, 2018 at 11:05:29AM +0200, Guido Kiener wrote:
Add USBTMC_IOCTL_CTRL_REQUEST to send arbitrary requests on the
control pipe. Used by specific applications of IVI Foundation,
Inc. to implement VISA API functions: viUsbControlIn/Out.
The maximum length
Zitat von Greg KH :
On Tue, Jul 24, 2018 at 11:05:29AM +0200, Guido Kiener wrote:
+struct usbtmc_ctrlrequest {
+ struct usbtmc_request req;
+ __u64 data; /* pointer to user space */
+} __attribute__ ((packed));
Hint, this structure could just be:
struct
/10554819/
Regards,
Guido
And I still have to make an official fix, isn't it?
Yes, you need to send a "real" patch for anyone to be able to pick it
up.
I sent the patch series: https://patchwork.kernel.org/cover/10612963/
Anything else I can do to relieve my bad conscience?
Regards,
Guido
e. I need to push out my testing branch now, 0-day seems
to be stalled :(
Big sorry! There is a superflous kmalloc line 1270 til 1272.
Shall I send the fix?
Regards
Guido
rnal build system?
And I still have to make an official fix, isn't it?
Guido
Hello again.
On lun, 2016-03-21 at 09:36 -0400, Greg KH wrote:
> On Sun, Mar 20, 2016 at 06:57:30PM +0100, Guido Trentalancia wrote:
> >
> > Hello Greg !
> >
> > On dom, 2016-03-20 at 10:34 -0700, Greg KH wrote:
> > >
> > > On Sun, Mar 20,
] hub 6-0:1.0: unable to enumerate USB device on port 2
*** NOTE: Device is permanently disabled at this point ***
I don't know whether my analysis is correct (and therefore the proposed
solution appropriate), as reproducing the problem is very difficult...
Regards,
Guido
Add an option
Hello Greg !
On dom, 2016-03-20 at 10:34 -0700, Greg KH wrote:
> On Sun, Mar 20, 2016 at 06:09:57PM +0100, Guido Trentalancia wrote:
> >
> > [ 1295.575679] usb 6-2: FTDI USB Serial Device converter now
> > attached
> > to ttyUSB1
> > [ 1302.204285] usb usb6-
study on typical duration of EMI
inside buildings... In the meanwhile, I believe 1000 milliseconds (plus
configurability) to be safe.
Regards,
Guido
Il 21 marzo 2016 16:42:14 CET, Guido Trentalancia <gu...@trentalancia.net> ha
scritto:
>Hello Alan,
>
>thanks for getting back on th
e patch so that it correctly
documents Documentation/kernel-parameters.txt.
Regards,
Guido
Il 21 marzo 2016 09:52:39 CET, Oliver Neukum <oneu...@suse.com> ha scritto:
>On Sun, 2016-03-20 at 18:09 +0100, Guido Trentalancia wrote:
>> Hello.
>>
>> Considering that EM interferen
Hello Alan,
thanks for getting back on this...
Il 21 marzo 2016 16:01:17 CET, Alan Stern <st...@rowland.harvard.edu> ha
scritto:
>On Sun, 20 Mar 2016, Guido Trentalancia wrote:
>
>> Hello.
>>
>> Considering that EM interference can last for a while (gene
ance?
3. Do you have any plans to modify/evolve the USBTMC driver moving
forward?
4. Do you know of any other differences between the Linux USBTMC driver
and the Windows USBTMC driver?
We are looking forward to your comments. Please let us know if some of you
would like to participate to the next W
gol" quirk, which simply uses
> a single read request for the entire buffer. (I don't know why the
> driver author thought this shouldn't be done for every device.)
Thank you for the hint! I think that all T instruments should be able to
send the entire buffer and I hope the "rigol quirk&qu
ders are filled up or analyzed in
user mode. This allows VISA vendors to be more flexible to maintain their
applications. The specification is here:
http://ivifoundation.org/downloads/Protocol%20Specifications/Ivi-6%202_USBTMC_2010-03-23.pdf
At the moment I'm still not sure about the right way to g
All T instruments should also work with rigol_quirk = 1 code path.
So remove unnecessary code in rigol_quirk = 0 code path to simplify the driver.
Tested-by: Dave Penkler <dpenk...@gmail.com>
Reviewed-by: Steve Bayless <steve_bayl...@keysight.com>
Signed-off-by: Guido Kiener <gui
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 <guido.kie...@ro
OUT and
IN bulk, and clears all received data from IN bulk. Internal
transfer counters and error states are reset.
- Flush flying urbs when file handle is closed or device is
suspended.
Signed-off-by: Guido Kiener <guido.kie...@rohde-schwarz.com>
Reviewed-by: Steve Bayless <steve_bayl...@
Insert a sleep of 50 ms between subsequent CHECK_CLEAR_STATUS
control requests to avoid stressing the instrument with repeated
requests.
Some instruments need time to cleanup internal I/O buffers.
Polling and repeated requests slow down the response time of
devices.
Signed-off-by: Guido Kiener
different or wrong tag ids.
Signed-off-by: Guido Kiener <guido.kie...@rohde-schwarz.com>
Reviewed-by: Steve Bayless <steve_bayl...@keysight.com>
---
drivers/usb/class/usbtmc.c | 151 ++-
include/uapi/linux/usb/tmc.h | 2 +
2 files changed, 81 inser
- add ioctl USBTMC_IOCTL_API_VERSION to get current API version
- add info message to show API version
- replace USBTMC_TIMEOUT macros with common used USB_CTRL_GET_TIMEOUT
or USB_CTRL_SET_TIMEOUT macros.
- delete some superfluous code lines.
- update ioctl-number.txt
Signed-off-by: Guido
zero when the device does not support
termchar feature or when termchar detection is not enabled
(see ioctl USBTMC_IOCTL_CONFIG_TERMCHAR).
Signed-off-by: Guido Kiener <guido.kie...@rohde-schwarz.com>
Reviewed-by: Steve Bayless <steve_bayl...@keysight.com>
---
drivers/usb/class/usbt
The ioctls USBTMC_IOCTL_SET_OUT_HALT or USBTMC_IOCTL_SET_IN_HALT
send a SET_FEATURE(HALT) request to the corresponding OUT or IN pipe.
Useful for testing devices and client applications: The ioctls force
the device to simulate the error state at the specified pipe.
Signed-off-by: Guido Kiener
e usbtmc driver
The following collaborative patches meet the requirements of the IVI
Foundation to implement the library based on the usbtmc driver.
Improvements in the data transfer rate of over 130 MByte/s for
usb 3.x connections have been measured.
Guido Kiener, Dave Penkler, Steve Bayless (12):
01
of ETIME
Tested-by: Dave Penkler <dpenk...@gmail.com>
Reviewed-by: Steve Bayless <steve_bayl...@keysight.com>
Signed-off-by: Guido Kiener <guido.kie...@rohde-schwarz.com>
---
drivers/usb/class/usbtmc.c | 176 -
1 file changed, 136 insertion
Add USBTMC_IOCTL_CTRL_REQUEST to send arbitrary requests on the
control pipe. Used by specific applications of IVI Foundation,
Inc. to implement VISA API functions: viUsbControlIn/Out.
Signed-off-by: Guido Kiener <guido.kie...@rohde-schwarz.com>
Reviewed-by: Steve Bayless <s
Attributes' of REQUEST_DEV_DEP_MSG_IN BULK-OUT header.
Allows enabling/disabling of terminating a read on reception of
term_char individually for each read request.
Reviewed-by: Steve Bayless <steve_bayl...@keysight.com>
Signed-off-by: Dave Penkler <dpenk...@gmail.com>
Signed-off-by: Guido Kien
Dave Penkler <dpenk...@gmail.com>
Signed-off-by: Guido Kiener <guido.kie...@rohde-schwarz.com>
---
drivers/usb/class/usbtmc.c | 58 +---
include/uapi/linux/usb/tmc.h | 2 ++
2 files changed, 56 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/
) of the CHECK_CLEAR_STATUS
response, since other bits are reserved and can change in
future versions.
Signed-off-by: Guido Kiener
Reviewed-by: Steve Bayless
---
drivers/usb/class/usbtmc.c | 46 +++---
1 file changed, 18 insertions(+), 28 deletions(-)
diff --git a/drivers/usb/class
-by: Guido Kiener
Reviewed-by: Steve Bayless
---
drivers/usb/class/usbtmc.c | 222 ++---
1 file changed, 105 insertions(+), 117 deletions(-)
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c
index 6d5f514b3081..11225c6d6c69 100644
--- a/drivers/usb
Signed-off-by: Guido Kiener
Reviewed-by: Steve Bayless
---
drivers/usb/class/usbtmc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c
index 785eee3a6b89..6aef3447adcc 100644
--- a/drivers/usb/class/usbtmc.c
+++ b
As all the properties of the usbtmc driver can now be
controlled on a per file descriptor basis by ioctl functions
the sysfs interface is of limited use.
We are not aware about applications that are using the sysfs
parameter TermChar, TermCharEnabled or auto_abort.
Signed-off-by: Guido Kiener
Signed-off-by: Guido Kiener
Reviewed-by: Steve Bayless
---
drivers/usb/class/usbtmc.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c
index 81144c0c4772..785eee3a6b89 100644
--- a/drivers/usb/class/usbtmc.c
+++ b/drivers/usb/class
Remove redundant code and fix debug messages.
Signed-off-by: Guido Kiener
Reviewed-by: Steve Bayless
---
drivers/usb/class/usbtmc.c | 25 -
1 file changed, 8 insertions(+), 17 deletions(-)
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c
index
Reserve a suitable range of ioctl numbers for USBTMC driver.
Signed-off-by: Guido Kiener
Reviewed-by: Steve Bayless
---
Documentation/ioctl/ioctl-number.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/ioctl/ioctl-number.txt
b/Documentation/ioctl/ioctl
tmc: Add ioctls to set/get usb timeout
usb: usbtmc: use consistent timeout error
usb: usbtmc: Support Read Status Byte with SRQ per file
V1: usb: usbtmc: Remove rigol_quirk (accepted)
https://patchwork.kernel.org/patch/10407097/
Guido Kiener, Dave Penkler, Steve Bayless (22):
usb:
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
Reviewed-by: Steve Bayless
when changing tmc.h
with new flags, ioctls or when changing a significant behavior
of the driver.
Signed-off-by: Guido Kiener
Reviewed-by: Steve Bayless
---
drivers/usb/class/usbtmc.c | 9 +
include/uapi/linux/usb/tmc.h | 1 +
2 files changed, 10 insertions(+)
diff --git a/drivers/usb
Use common timeout macro USB_CTRL_GET_TIMEOUT (=5s) for all
usb_control_msg() function calls.
The macro USBTMC_TIMEOUT should only be used as default value for
Bulk IN/OUT transfers.
Signed-off-by: Guido Kiener
Reviewed-by: Steve Bayless
---
drivers/usb/class/usbtmc.c | 8
1 file
is already available due to a previous non blocking call the ioctl
will return -EINVAL when the message pointer is NULL.
Signed-off-by: Guido Kiener
Reviewed-by: Steve Bayless
---
drivers/usb/class/usbtmc.c | 336 ++-
include/uapi/linux/usb/tmc.h | 2 +
2 files
.
Signed-off-by: Guido Kiener
Reviewed-by: Steve Bayless
---
drivers/usb/class/usbtmc.c | 19 +++
include/uapi/linux/usb/tmc.h | 1 +
2 files changed, 20 insertions(+)
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c
index e78176ef0e42..b8a4140bd161 100644
Add ioctl USBTMC_IOCTL_AUTO_ABORT to configure auto_abort for
each specific file handle.
Signed-off-by: Guido Kiener
Reviewed-by: Steve Bayless
---
drivers/usb/class/usbtmc.c | 23 ---
include/uapi/linux/usb/tmc.h | 1 +
2 files changed, 17 insertions(+), 7 deletions
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
Reviewed-by: Steve
Use new usbtmc_generic_write function to maximize bandwidth
during long data transfer.
The maximum output transfer size is limited to INT_MAX (=2GB).
Signed-off-by: Guido Kiener
Reviewed-by: Steve Bayless
---
drivers/usb/class/usbtmc.c | 176 +++--
1 file
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
Reviewed-by: Steve Bayless
---
drivers/usb/class/usbtmc.c | 25
of USBTMC_TIMEOUT.
Check only bit 0 (field bmAbortBulkIn) of the
CHECK_ABORT_BULK_IN_STATUS response, since other bits are reserved
and can change in future versions.
Signed-off-by: Guido Kiener
Reviewed-by: Steve Bayless
---
drivers/usb/class/usbtmc.c | 139 -
1 file
.
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.
Signed-off-by: Guido Kiener
Reviewed-by: Steve
Add USBTMC_IOCTL_CTRL_REQUEST to send arbitrary requests on the
control pipe. Used by specific applications of IVI Foundation,
Inc. to implement VISA API functions: viUsbControlIn/Out.
The maximum length of control request is set to 4k.
Signed-off-by: Guido Kiener
Reviewed-by: Steve Bayless
Submitted urbs are not allowed when system is suspended.
Thus the submitted urb waiting at interrupt pipe is killed
during suspend callback and submitted again when system resumes.
Signed-off-by: Guido Kiener
Reviewed-by: Steve Bayless
---
drivers/usb/class/usbtmc.c | 16 +++-
1
stressing
the instrument with repeated requests.
Use common macro USB_CTRL_GET_TIMEOUT instead of USBTMC_TIMEOUT.
Signed-off-by: Guido Kiener
Reviewed-by: Steve Bayless
---
drivers/usb/class/usbtmc.c | 16
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/class
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
Signed-off-by: Guido Kiener
Reviewed-by: Steve Bayless
---
drivers/usb/class/usbtmc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c
index 785eee3a6b89..6aef3447adcc 100644
--- a/drivers/usb/class/usbtmc.c
+++ b
) of the CHECK_CLEAR_STATUS
response, since other bits are reserved and can change in
future versions.
Signed-off-by: Guido Kiener
Reviewed-by: Steve Bayless
---
drivers/usb/class/usbtmc.c | 46 +++---
1 file changed, 18 insertions(+), 28 deletions(-)
diff --git a/drivers/usb/class
Use common timeout macro USB_CTRL_GET_TIMEOUT (=5s) for all
usb_control_msg() function calls.
The macro USBTMC_TIMEOUT should only be used as default value for
Bulk IN/OUT transfers.
Signed-off-by: Guido Kiener
Reviewed-by: Steve Bayless
---
drivers/usb/class/usbtmc.c | 8
1 file
Use new usbtmc_generic_write function to maximize bandwidth
during long data transfer.
The maximum output transfer size is limited to INT_MAX (=2GB).
Signed-off-by: Guido Kiener
Reviewed-by: Steve Bayless
---
drivers/usb/class/usbtmc.c | 176 +++--
1 file
As all the properties of the usbtmc driver can now be
controlled on a per file descriptor basis by ioctl functions
the sysfs interface is of limited use.
We are not aware about applications that are using the sysfs
parameter TermChar, TermCharEnabled or auto_abort.
Signed-off-by: Guido Kiener
Remove redundant code and fix debug messages.
Signed-off-by: Guido Kiener
Reviewed-by: Steve Bayless
---
drivers/usb/class/usbtmc.c | 25 -
1 file changed, 8 insertions(+), 17 deletions(-)
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c
index
stressing
the instrument with repeated requests.
Use common macro USB_CTRL_GET_TIMEOUT instead of USBTMC_TIMEOUT.
Signed-off-by: Guido Kiener
Reviewed-by: Steve Bayless
---
drivers/usb/class/usbtmc.c | 16
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/class
-by: Guido Kiener
Reviewed-by: Steve Bayless
---
drivers/usb/class/usbtmc.c | 222 ++---
1 file changed, 105 insertions(+), 117 deletions(-)
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c
index 6d5f514b3081..11225c6d6c69 100644
--- a/drivers/usb
when changing tmc.h
with new flags, ioctls or when changing a significant behavior
of the driver.
Signed-off-by: Guido Kiener
Reviewed-by: Steve Bayless
---
drivers/usb/class/usbtmc.c | 9 +
include/uapi/linux/usb/tmc.h | 1 +
2 files changed, 10 insertions(+)
diff --git a/drivers/usb
Signed-off-by: Guido Kiener
Reviewed-by: Steve Bayless
---
drivers/usb/class/usbtmc.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c
index 81144c0c4772..785eee3a6b89 100644
--- a/drivers/usb/class/usbtmc.c
+++ b/drivers/usb/class
of USBTMC_TIMEOUT.
Check only bit 0 (field bmAbortBulkIn) of the
CHECK_ABORT_BULK_IN_STATUS response, since other bits are reserved
and can change in future versions.
Signed-off-by: Guido Kiener
Reviewed-by: Steve Bayless
---
drivers/usb/class/usbtmc.c | 139 -
1 file
Reserve a suitable range of ioctl numbers for USBTMC driver.
Signed-off-by: Guido Kiener
Reviewed-by: Steve Bayless
---
Documentation/ioctl/ioctl-number.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/ioctl/ioctl-number.txt
b/Documentation/ioctl/ioctl
Add USBTMC_IOCTL_CTRL_REQUEST to send arbitrary requests on the
control pipe. Used by specific applications of IVI Foundation,
Inc. to implement VISA API functions: viUsbControlIn/Out.
The maximum length of control request is set to 4k.
Signed-off-by: Guido Kiener
Reviewed-by: Steve Bayless
Add ioctl USBTMC_IOCTL_AUTO_ABORT to configure auto_abort for
each specific file handle.
Signed-off-by: Guido Kiener
Reviewed-by: Steve Bayless
---
drivers/usb/class/usbtmc.c | 23 ---
include/uapi/linux/usb/tmc.h | 1 +
2 files changed, 17 insertions(+), 7 deletions
is already available due to a previous non blocking call the ioctl
will return -EINVAL when the message pointer is NULL.
Signed-off-by: Guido Kiener
Reviewed-by: Steve Bayless
---
drivers/usb/class/usbtmc.c | 336 ++-
include/uapi/linux/usb/tmc.h | 2 +
2 files
.
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.
Signed-off-by: Guido Kiener
Reviewed-by: Steve
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
Reviewed-by: Steve Bayless
ents in the data transfer rate of over 130 MByte/s for
usb 3.x connections have been measured.
Guido Kiener, Dave Penkler, Steve Bayless (22):
usb: usbtmc: Add ioctl for generic requests on control
usb: usbtmc: Add ioctl for vendor specific write
usb: usbtmc: Add ioctl USBTMC_IOCTL_WRITE_R
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
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
Reviewed-by: Steve
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
Reviewed-by: Steve Bayless
---
drivers/usb/class/usbtmc.c | 25
Submitted urbs are not allowed when system is suspended.
Thus the submitted urb waiting at interrupt pipe is killed
during suspend callback and submitted again when system resumes.
Signed-off-by: Guido Kiener
Reviewed-by: Steve Bayless
---
drivers/usb/class/usbtmc.c | 16 +++-
1
.
Signed-off-by: Guido Kiener
Reviewed-by: Steve Bayless
---
drivers/usb/class/usbtmc.c | 19 +++
include/uapi/linux/usb/tmc.h | 1 +
2 files changed, 20 insertions(+)
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c
index e78176ef0e42..b8a4140bd161 100644
-off-by: Dave Penkler
Signed-off-by: Guido Kiener
---
drivers/usb/class/usbtmc.c | 28 +++-
include/uapi/linux/usb/tmc.h | 2 ++
2 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c
index 38fc7abdc00c
is already available due to a previous non blocking call the ioctl
will return -EINVAL when the message pointer is NULL.
Signed-off-by: Guido Kiener
Reviewed-by: Steve Bayless
---
drivers/usb/class/usbtmc.c | 369 ++-
include/uapi/linux/usb/tmc.h | 2 +
2 files
ents in the data transfer rate of over 130 MByte/s for
usb 3.x connections have been measured.
Guido Kiener, Dave Penkler, Steve Bayless (29):
01 Support Read Status Byte with SRQ per file
02 Use consistent timeout error
03 Add ioctls to set/get usb timeout
04 Add ioctl for trigger
05 Add i
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
Reviewed-by: Steve
1 - 100 of 182 matches
Mail list logo