diff options
| author | Guido Kiener <[email protected]> | 2018-09-12 10:51:03 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2018-09-20 13:04:02 +0200 |
| 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 <[email protected]>
Reviewed-by: Steve Bayless <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions