diff options
author | Guido Kiener <guido@kiener-muenchen.de> | 2018-09-12 04:51:03 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-09-20 07:04:02 -0400 |
commit | dfee02ac4bce6374c9769fe31f20794309341fa0 (patch) | |
tree | 5f924c7ac748180382df93fcbd5e4c16f17e0e29 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | d7604ff0dc018f21d0363a8ebd424bf84cf41020 (diff) |
usb: usbtmc: Fix ioctl USBTMC_IOCTL_CLEAR
Remove calculation of max_size (=wMaxPacketSize) and wrong
condition (actual == max_size) in while loop. A device clear
should always flush the complete Bulk-IN FIFO.
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 nonbraked requests slow down the response time of
devices.
Use USBTMC_BUFSIZE (4k) instead of USBTMC_SIZE_IOBUFFER (2k).
Using USBTMC_SIZE_IOBUFFER is deprecated.
Check only bit 0 (field bmClear) of the CHECK_CLEAR_STATUS
response, since other bits are reserved and can change in
future versions.
Signed-off-by: Guido Kiener <guido.kiener@rohde-schwarz.com>
Reviewed-by: Steve Bayless <steve_bayless@keysight.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions