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
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
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
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 2827969ccc11..821f3e47b6b3 100644
--- a/drivers/usb/class/usbtmc.c
+++ b
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 dc4f7706b4c2..2827969ccc11 100644
--- a/drivers/usb/class/usbtmc.c
+++ b/drivers/usb/class
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
: 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 26d5af413009..e5ea2d822ae3 100644
--- a/drivers/usb
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
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
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
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
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
s to avoid 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
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
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 | 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 67cdf5df90d7..fe140d400e1d 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
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
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 a6482e850532..ddc2e4b78a3b 100644
--- a/drivers/usb/class/usbtmc.c
+++ b/drivers/usb/class
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
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
er.
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 (23):
usb: usbtmc: Add support for 32 bit compat applications
usb: usbtmc: Add ioctl for generic requests on control
usb: usbtmc: Add ioctl for ve
32 bit applications can only call ioctl functions on 64 bit systems
when the field .compat_ioctl is defined for file operations.
Tested-by: Dave Penkler
Signed-off-by: Guido Kiener
Reviewed-by: Steve Bayless
---
drivers/usb/class/usbtmc.c | 4
1 file changed, 4 insertions(+)
diff --git
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
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
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 ddc2e4b78a3b..9a6312a49b55 100644
--- a/drivers/usb/class/usbtmc.c
+++ b
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
instead 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 ---
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
er.
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 (22):
usb: usbtmc: Add ioctl for generic requests on control
usb: usbtmc: Add ioctl for vendor specific write
usb: usbtmc: Add ioctl USBTMC_IOCTL
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
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
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
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
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
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
s to avoid 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
: 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
instead 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 ---
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
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
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
instead 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 ---
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
s to avoid 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
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
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
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
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
: 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
usb: usbtmc: 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)
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
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
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 5b6cdb1237ab..ad3932ca4d8d 100644
--- a/drivers/usb/class/usbtmc.c
+++ b/drivers/usb/class
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
Reviewed-by: Steve Bayless
---
drivers/usb/class/usbtmc.c | 336 ++-
include/uapi/linux/usb/tmc.h | 2 +
2 files
t/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: usbtmc: Add ioctl for gen
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
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
Reviewed-by: Steve
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
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
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
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 ad3932ca4d8d..b9e505cbe6b4 100644
--- a/drivers/usb/class/usbtmc.c
+++ b
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
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
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
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
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
: 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 c476b53b6237..26a779d0c89b 100644
--- a/drivers/usb
.
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 0d8aa4bc3fa7..dc6c04fdfdff 100644
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
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 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
instead 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 ---
s to avoid 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
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
From: Guido Kiener
Fix uninitialized symbol 'actual' in function usbtmc_read.
When symbol 'actual' is not initialized and usb_bulk_msg() fails,
the subsequent kernel debug message shows a random value.
Signed-off-by: Guido Kiener
Fixes: d7604ff0dc01 ("usb: usb
101 - 200 of 209 matches
Mail list logo