Re: [PATCH 02/12] usb: usbtmc: Support Read Status Byte with SRQ per file handle

2018-05-18 Thread guido
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

Re: [PATCH 00/12] usb: usbtmc: Changes needed for compatible IVI/VISA library

2018-05-18 Thread guido
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

Re: [PATCH 04/12] usb: usbtmc: Add ioctls for trigger, EOM bit and TermChar

2018-05-18 Thread guido
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

Re: [PATCH 02/12] usb: usbtmc: Support Read Status Byte with SRQ per file handle

2018-05-21 Thread guido
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

Re: [PATCH 06/12] usb: usbtmc: Add vendor specific/asynchronous read/write ioctls

2018-05-21 Thread guido
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: > > +/* > >

Re: [PATCH 06/12] usb: usbtmc: Add vendor specific/asynchronous read/write ioctls

2018-05-22 Thread guido
> 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

Re: [PATCH 02/12] usb: usbtmc: Support Read Status Byte with SRQ per file handle

2018-05-24 Thread guido
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/

Re: [PATCH 04/12] usb: usbtmc: Add ioctls for trigger, EOM bit and TermChar

2018-05-24 Thread guido
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

Re: [PATCH 07/12] usb: usbtmc: Add ioctl USBTMC488_IOCTL_WAIT_SRQ

2018-05-24 Thread guido
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

Re: [PATCH 07/12] usb: usbtmc: Add ioctl USBTMC488_IOCTL_WAIT_SRQ

2018-05-18 Thread guido
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

Re: [PATCH 06/12] usb: usbtmc: Add vendor specific/asynchronous read/write ioctls

2018-05-18 Thread guido
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

Re: [PATCH 06/12] usb: usbtmc: Add vendor specific/asynchronous read/write ioctls

2018-05-18 Thread guido
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

Re: [PATCH 03/12] usb: usbtmc: Add ioctls to set/get usb timeout

2018-05-18 Thread guido
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

Re: [PATCH 07/12] usb: usbtmc: Add ioctl USBTMC488_IOCTL_WAIT_SRQ

2018-05-18 Thread guido
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

Re: [PATCH 06/12] usb: usbtmc: Add vendor specific/asynchronous read/write ioctls

2018-05-18 Thread guido
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: > > +/* > >

Re: [PATCH 02/12] usb: usbtmc: Support Read Status Byte with SRQ per file handle

2018-05-18 Thread guido
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'

Re: [PATCH 05/12] usb: usbtmc: Add ioctl for generic requests on control pipe

2018-05-18 Thread guido
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

Re: [PATCH 03/12] usb: usbtmc: Add ioctls to set/get usb timeout

2018-05-18 Thread guido
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

Re: [PATCH 07/12] usb: usbtmc: Add ioctl USBTMC488_IOCTL_WAIT_SRQ

2018-05-28 Thread guido
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_

Re: [PATCH v4 00/22] usb: usbtmc: Changes needed for compatible IVI/VISA library

2018-07-30 Thread guido
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

Re: [PATCH v2 08/29] usb: usbtmc: Add ioctl for generic requests on control

2018-07-21 Thread guido
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

Re: [PATCH v2 08/29] usb: usbtmc: Add ioctl for generic requests on control

2018-07-24 Thread guido
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

Re: [PATCH v3 02/23] usb: usbtmc: Add ioctl for generic requests on control

2018-07-24 Thread guido
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

Re: [PATCH v3 02/23] usb: usbtmc: Add ioctl for generic requests on control

2018-07-24 Thread guido
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

Re: [PATCH v5 00/22] usb: usbtmc: Changes needed for compatible IVI/VISA library

2018-09-05 Thread guido
/10554819/ Regards, Guido

Re: fixes for ioctl() of usbtmc in testing tree

2018-09-28 Thread 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

Re: fixes for ioctl() of usbtmc in testing tree

2018-09-24 Thread 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

Re: fixes for ioctl() of usbtmc in testing tree

2018-09-24 Thread guido
rnal build system? And I still have to make an official fix, isn't it? Guido

[PATCH v2] usb: Wait before re-enabling a port that has been disabled due to EMI

2016-03-23 Thread Guido Trentalancia
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,

[PATCH] usb: Wait before re-enabling a port that has been disabled due to EMI

2016-03-20 Thread Guido Trentalancia
] 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

Re: [PATCH] usb: Wait before re-enabling a port that has been disabled due to EMI

2016-03-20 Thread Guido Trentalancia
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-

Re: [PATCH] usb: Wait before re-enabling a port that has been disabled due to EMI

2016-03-21 Thread Guido Trentalancia
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

Re: [PATCH] usb: Wait before re-enabling a port that has been disabled due to EMI

2016-03-21 Thread Guido Trentalancia
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

Re: [PATCH] usb: Wait before re-enabling a port that has been disabled due to EMI

2016-03-21 Thread Guido Trentalancia
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

usb: usbtmc: Questions of the IVI Foundation

2017-05-15 Thread Guido . Kiener
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

Re: usb: usbtmc: Questions of the IVI Foundation

2017-05-17 Thread Guido . Kiener
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

Re: usb: usbtmc: Questions of the IVI Foundation

2017-05-16 Thread Guido . Kiener
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

[PATCH 01/12] usb: usbtmc: Remove rigol_quirk

2018-05-17 Thread Guido Kiener
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

[PATCH 07/12] usb: usbtmc: Add ioctl USBTMC488_IOCTL_WAIT_SRQ

2018-05-17 Thread Guido Kiener
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

[PATCH 06/12] usb: usbtmc: Add vendor specific/asynchronous read/write ioctls

2018-05-17 Thread Guido Kiener
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...@

[PATCH 09/12] usb: usbtmc: Fix ioctl USBTMC_IOCTL_CLEAR

2018-05-17 Thread Guido Kiener
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

[PATCH 11/12] usb: usbtmc: Add ioctls to abort with specific tags

2018-05-17 Thread 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

[PATCH 12/12] usb: usbtmc: Add ioctl to return API version of usbtmc driver

2018-05-17 Thread Guido Kiener
- 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

[PATCH 08/12] usb: usbtmc: Optimize read/write and add ioctls for auto_abort

2018-05-17 Thread Guido Kiener
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

[PATCH 10/12] usb: usbtmc: Add test functions to set HALT Feature (Stall)

2018-05-17 Thread Guido Kiener
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

[PATCH 00/12] usb: usbtmc: Changes needed for compatible IVI/VISA library

2018-05-17 Thread 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

[PATCH 02/12] usb: usbtmc: Support Read Status Byte with SRQ per file handle

2018-05-17 Thread Guido Kiener
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

[PATCH 05/12] usb: usbtmc: Add ioctl for generic requests on control pipe

2018-05-17 Thread Guido Kiener
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

[PATCH 04/12] usb: usbtmc: Add ioctls for trigger, EOM bit and TermChar

2018-05-17 Thread Guido Kiener
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

[PATCH 03/12] usb: usbtmc: Add ioctls to set/get usb timeout

2018-05-17 Thread Guido Kiener
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/

[PATCH v5 13/22] usb: usbtmc: Fix ioctl USBTMC_IOCTL_CLEAR

2018-08-03 Thread Guido Kiener
) 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

[PATCH v5 12/22] usb: usbtmc: Optimize usbtmc_read

2018-08-03 Thread Guido Kiener
-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

[PATCH v5 21/22] usb: usbtmc: Fix split quoted string in debug message

2018-08-03 Thread 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

[PATCH v5 22/22] usb: usbtmc: Remove sysfs group TermChar and auto_abort

2018-08-03 Thread Guido Kiener
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

[PATCH v5 20/22] usb: usbtmc: Remove redundant macro USBTMC_SIZE_IOBUFFER

2018-08-03 Thread 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

[PATCH v5 19/22] usb: usbtmc: Remove redundant code

2018-08-03 Thread 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

[PATCH v5 18/22] usb: usbtmc: Update ioctl-number.txt

2018-08-03 Thread Guido Kiener
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

[PATCH v5 00/22] usb: usbtmc: Changes needed for compatible IVI/VISA library

2018-08-03 Thread Guido Kiener
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:

[PATCH v5 08/22] usb: usbtmc: Add ioctl USBTMC488_IOCTL_WAIT_SRQ

2018-08-03 Thread Guido Kiener
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

[PATCH v5 17/22] usb: usbtmc: Add ioctl USBTMC_IOCTL_API_VERSION

2018-08-03 Thread Guido Kiener
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

[PATCH v5 16/22] usb: usbtmc: Replace USBTMC_TIMEOUT macros for control messages

2018-08-03 Thread Guido Kiener
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

[PATCH v5 04/22] usb: usbtmc: Add ioctl for vendor specific read

2018-08-03 Thread Guido Kiener
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

[PATCH v5 06/22] usb: usbtmc: Add ioctl USBTMC_IOCTL_CLEANUP_IO

2018-08-03 Thread Guido Kiener
. 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

[PATCH v5 10/22] usb: usbtmc: Add ioctl USBTMC_IOCTL_AUTO_ABORT

2018-08-03 Thread Guido Kiener
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

[PATCH v5 09/22] usb: usbtmc: add ioctl USBTMC_IOCTL_MSG_IN_ATTR

2018-08-03 Thread 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

[PATCH v5 11/22] usb: usbtmc: Optimize usbtmc_write

2018-08-03 Thread Guido Kiener
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

[PATCH v5 03/22] usb: usbtmc: Add ioctl USBTMC_IOCTL_WRITE_RESULT

2018-08-03 Thread Guido Kiener
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

[PATCH v5 14/22] usb: usbtmc: Fix ioctl USBTMC_IOCTL_ABORT_BULK_IN

2018-08-03 Thread Guido Kiener
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

[PATCH v5 02/22] usb: usbtmc: Add ioctl for vendor specific write

2018-08-03 Thread Guido Kiener
. 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

[PATCH v5 01/22] usb: usbtmc: Add ioctl for generic requests on control

2018-08-03 Thread Guido Kiener
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

[PATCH v5 07/22] usb: usbtmc: Fix suspend/resume

2018-08-03 Thread Guido Kiener
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

[PATCH v5 15/22] usb: usbtmc: Fix ioctl USBTMC_IOCTL_ABORT_BULK_OUT

2018-08-03 Thread Guido Kiener
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

[PATCH v5 05/22] usb: usbtmc: Add ioctl USBTMC_IOCTL_CANCEL_IO

2018-08-03 Thread Guido Kiener
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

[PATCH v4 21/22] usb: usbtmc: Fix split quoted string in debug message

2018-07-30 Thread 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

[PATCH v4 13/22] usb: usbtmc: Fix ioctl USBTMC_IOCTL_CLEAR

2018-07-30 Thread Guido Kiener
) 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

[PATCH v4 16/22] usb: usbtmc: Replace USBTMC_TIMEOUT macros for control messages

2018-07-30 Thread Guido Kiener
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

[PATCH v4 11/22] usb: usbtmc: Optimize usbtmc_write

2018-07-30 Thread Guido Kiener
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

[PATCH v4 22/22] usb: usbtmc: Remove sysfs group TermChar and auto_abort

2018-07-30 Thread Guido Kiener
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

[PATCH v4 19/22] usb: usbtmc: Remove redundant code

2018-07-30 Thread 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

[PATCH v4 15/22] usb: usbtmc: Fix ioctl USBTMC_IOCTL_ABORT_BULK_OUT

2018-07-30 Thread Guido Kiener
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

[PATCH v4 12/22] usb: usbtmc: Optimize usbtmc_read

2018-07-30 Thread Guido Kiener
-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

[PATCH v4 17/22] usb: usbtmc: Add ioctl USBTMC_IOCTL_API_VERSION

2018-07-30 Thread Guido Kiener
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

[PATCH v4 20/22] usb: usbtmc: Remove redundant macro USBTMC_SIZE_IOBUFFER

2018-07-30 Thread 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

[PATCH v4 14/22] usb: usbtmc: Fix ioctl USBTMC_IOCTL_ABORT_BULK_IN

2018-07-30 Thread Guido Kiener
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

[PATCH v4 18/22] usb: usbtmc: Update ioctl-number.txt

2018-07-30 Thread Guido Kiener
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

[PATCH v4 01/22] usb: usbtmc: Add ioctl for generic requests on control

2018-07-30 Thread Guido Kiener
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

[PATCH v4 10/22] usb: usbtmc: Add ioctl USBTMC_IOCTL_AUTO_ABORT

2018-07-30 Thread Guido Kiener
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

[PATCH v4 04/22] usb: usbtmc: Add ioctl for vendor specific read

2018-07-30 Thread Guido Kiener
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

[PATCH v4 02/22] usb: usbtmc: Add ioctl for vendor specific write

2018-07-30 Thread Guido Kiener
. 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

[PATCH v4 08/22] usb: usbtmc: Add ioctl USBTMC488_IOCTL_WAIT_SRQ

2018-07-30 Thread Guido Kiener
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

[PATCH v4 00/22] usb: usbtmc: Changes needed for compatible IVI/VISA library

2018-07-30 Thread Guido Kiener
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

[PATCH v4 05/22] usb: usbtmc: Add ioctl USBTMC_IOCTL_CANCEL_IO

2018-07-30 Thread Guido Kiener
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

[PATCH v4 09/22] usb: usbtmc: add ioctl USBTMC_IOCTL_MSG_IN_ATTR

2018-07-30 Thread 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

[PATCH v4 03/22] usb: usbtmc: Add ioctl USBTMC_IOCTL_WRITE_RESULT

2018-07-30 Thread Guido Kiener
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

[PATCH v4 07/22] usb: usbtmc: Fix suspend/resume

2018-07-30 Thread Guido Kiener
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

[PATCH v4 06/22] usb: usbtmc: Add ioctl USBTMC_IOCTL_CLEANUP_IO

2018-07-30 Thread Guido Kiener
. 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

[PATCH v2 05/29] usb: usbtmc: Add ioctl for EOM bit

2018-07-18 Thread Guido Kiener
-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

[PATCH v2 11/29] usb: usbtmc: Add ioctl for vendor specific read

2018-07-18 Thread Guido Kiener
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

[PATCH v2 00/29] usb: usbtmc: Changes needed for compatible IVI/VISA library

2018-07-18 Thread Guido Kiener
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

[PATCH v2 16/29] usb: usbtmc: add ioctl USBTMC_IOCTL_MSG_IN_ATTR

2018-07-18 Thread 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

  1   2   >