usb: testusb: Fix for showing the connection speed
Faizel K B authored
[ Upstream commit f81c08f8 ]

testusb' application which uses 'usbtest' driver reports 'unknown speed'
from the function 'find_testdev'. The variable 'entry->speed' was not
updated from  the application. The IOCTL mentioned in the FIXME comment can
only report whether the connection is low speed or not. Speed is read using
the IOCTL USBDEVFS_GET_SPEED which reports the proper speed grade.  The
call is implemented in the function 'handle_testdev' where the file
descriptor was availble locally. Sample output is given below where 'high
speed' is printed as the connected speed.

sudo ./testusb -a
high speed      /dev/bus/usb/001/011    0
/dev/bus/usb/001/011 test 0,    0.000015 secs
/dev/bus/usb/001/011 test 1,    0.194208 secs
/dev/bus/usb/001/011 test 2,    0.077289 secs
/dev/bus/usb/001/011 test 3,    0.170604 secs
/dev/bus/usb/001/011 test 4,    0.108335 secs
/dev/bus/usb/001/011 test 5,    2.788076 secs
/dev/bus/usb/001/01...
0bf8cf94
Name Last commit Last update
..
accounting tools/accounting/getdelays.c: fix netlink attribute length
arch ia64: tools: remove duplicate definition of ia64_mf() on ia64
build tools: build: Use HOSTLDFLAGS with fixdep
cgroup cgroups: fix cgroup_event_listener error handling
firewire tools/firewire: nosy-dump: check for allocation failure
gpio tools: gpio-hammer: Avoid potential overflow in main
hv Tools: hv: kvp: eliminate 'may be used uninitialized' warning
iio iio: iio-utils: Fix possible incorrect mask calculation
include tools lib: Fix builds when glibc contains strlcpy()
kvm/kvm_stat tweewide: Fix most Shebang lines
laptop tools: move laptops dslm tool from Documentation
lguest tools/lguest: Don't bork the terminal in case of wrong args
lib tools lib traceevent: Fix memory leak in process_dynamic_array_len
net tools: bpf_jit_disasm: check for klogctl failure
nfsd NFSD: Added fault injection script
objtool objtool: Don't fail on missing symbol table
pcmcia tools: move pcmcia crc32hash tool from Documentation
perf perf probe-file: Delete namelist in del_events() on the error path
power cpupower: avoid multiple definition with gcc -fno-common
scripts tools: Let O= makes handle a relative path with -C option
spi Merge remote-tracking branches 'spi/topic/ti-qspi', 'spi/topic/tools', 'spi/topic/txx9' and 'spi/topic/xlp' into spi-next
testing selftests/powerpc: Fix "no_handler" EBB selftest
thermal/tmon tools/thermal: tmon: fix for segfault
time tools: add script to test udelay
usb usb: testusb: Fix for showing the connection speed
virtio ptr_ring: fix up after recent ptr_ring changes
vm tools/vm/page-types.c: fix "defined but not used" warning
Makefile tools/gpio: add install section