History log of /linux-master/tools/usb/testusb.c
Revision Date Author Comments
# 5ea5746d 07-Jul-2022 Bryan O'Donoghue <bryan.odonoghue@linaro.org>

tools: usb: testusb: Add super-plus speed reporting

Add the ability to detect and print the USB speed as "super-plus" if/when
the kernel reports that speed.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Link: https://lore.kernel.org/r/20220708115859.2095714-4-bryan.odonoghue@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 7fbcd99e 07-Jul-2022 Bryan O'Donoghue <bryan.odonoghue@linaro.org>

tools: usb: testusb: Add super speed reporting

Add the ability to detect and print the USB speed as "super" if/when the
kernel reports that speed.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Link: https://lore.kernel.org/r/20220708115859.2095714-3-bryan.odonoghue@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# b067fc28 07-Jul-2022 Bryan O'Donoghue <bryan.odonoghue@linaro.org>

tools: usb: testusb: Add wireless speed reporting

Add the ability to detect and print the USB speed as "wireless" if/when the
kernel reports that speed.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Link: https://lore.kernel.org/r/20220708115859.2095714-2-bryan.odonoghue@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# ef94b266 23-Mar-2022 Haowen Bai <baihaowen@meizu.com>

testusb: Fix warning comparing pointer to 0

Avoid pointer type value compared with 0 to make code clear.

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
Link: https://lore.kernel.org/r/1648088171-30912-1-git-send-email-baihaowen@meizu.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# f81c08f8 02-Sep-2021 Faizel K B <faizel.kb@dicortech.com>

usb: testusb: Fix for showing the connection speed

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/011 test 6, 2.594610 secs
/dev/bus/usb/001/011 test 7, 2.905459 secs
/dev/bus/usb/001/011 test 8, 2.795193 secs
/dev/bus/usb/001/011 test 9, 8.372651 secs
/dev/bus/usb/001/011 test 10, 6.919731 secs
/dev/bus/usb/001/011 test 11, 16.372687 secs
/dev/bus/usb/001/011 test 12, 16.375233 secs
/dev/bus/usb/001/011 test 13, 2.977457 secs
/dev/bus/usb/001/011 test 14 --> 22 (Invalid argument)
/dev/bus/usb/001/011 test 17, 0.148826 secs
/dev/bus/usb/001/011 test 18, 0.068718 secs
/dev/bus/usb/001/011 test 19, 0.125992 secs
/dev/bus/usb/001/011 test 20, 0.127477 secs
/dev/bus/usb/001/011 test 21 --> 22 (Invalid argument)
/dev/bus/usb/001/011 test 24, 4.133763 secs
/dev/bus/usb/001/011 test 27, 2.140066 secs
/dev/bus/usb/001/011 test 28, 2.120713 secs
/dev/bus/usb/001/011 test 29, 0.507762 secs

Signed-off-by: Faizel K B <faizel.kb@dicortech.com>
Link: https://lore.kernel.org/r/20210902114444.15106-1-faizel.kb@dicortech.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 74ba9207 20-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 61

Based on 1 normalized pattern(s):

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version this program is distributed in the
hope that it will be useful but without any warranty without even
the implied warranty of merchantability or fitness for a particular
purpose see the gnu general public license for more details you
should have received a copy of the gnu general public license along
with this program if not write to the free software foundation inc
675 mass ave cambridge ma 02139 usa

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 441 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
Reviewed-by: Richard Fontana <rfontana@redhat.com>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190520071858.739733335@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# a7ea58f3 25-Apr-2017 Felipe Balbi <felipe.balbi@linux.intel.com>

tools: usb: testusb: update default vary for superspeed

Currently, default vary will not accomodate superspeed endpoints
causing unexpected babble errors in the IN direction. Let's update
default 'vary' parameter so that we can maintain a "short-less"
transfer as hinted at the comment.

Reported-by: Ammy Yi <ammy.yi@intel.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>


# 9e44d194 31-Aug-2015 Peter Chen <peter.chen@freescale.com>

tools: usb: testusb: change the default value for length from 512 to 1024

For ctrl out test, it needs length > vary, so in order to run it with
default parameters, we do this change.

Acked-by: Michal Nazarewicz <mina86@mina86.com>
Cc: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>


# 0f286379 31-Aug-2015 Peter Chen <peter.chen@freescale.com>

tools: usb: testusb: change the help text

The 'length' is the transfer length, not the packet size, so
change the help text.

Acked-by: Michal Nazarewicz <mina86@mina86.com>
Cc: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>


# 9742aecd 08-Feb-2013 Sergei Shtylyov <sshtylyov@dev.rtsoft.ru>

testusb: remove all mentions of 'usbfs'

Commit 8a424bf40d772fedacc91862ecc86f10541fabb3 (tools/usb: remove last USBFS
user) removed 'usbfs' files from the source but retained mentions of 'usbfs'
all over the place, most importantly in the misleading error messages printed
in case USB device files are not there. Remove all the mentions of 'usbfs'
for good now!

Signed-off-by: Sergei Shtylyov <sshtylyov@dev.rtsoft.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 2c449e38 20-Dec-2012 Sasha Levin <sasha.levin@oracle.com>

tools/usb: remove unneeded 'continue' and simplify condition

Basically remove unneeded code. Since that 'continue' is at the end
of the for() there's no need for it.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 8a424bf4 10-Sep-2012 Sebastian Andrzej Siewior <bigeasy@linutronix.de>

tools/usb: remove last USBFS user

In commit fb28d58b ("USB: remove CONFIG_USB_DEVICEFS") USBFS got
removed. Since it is gone we can stop using it in testusb and try udev
nodes right away.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 7e54e978 22-May-2012 Du, ChangbinX <changbinx.du@intel.com>

testusb: expose looping forever option "l" to user

The testusb.c tool has support for looping forever implemented, which
may be useful for stress test, yet it is not exposed to the user, so
even though the code is there, it cannot be used. This commit adds
"l" to the set of options handled by the application which enables
the feature.

Also, I collate help information for each command line option to make
it easier to use for novice.

Signed-off-by: Du Changbin <changbinx.du@intel.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# f6fe916e 14-May-2012 Du, ChangbinX <changbinx.du@intel.com>

USB: testusb: add path /dev/bus/usb to default search paths for usbfs

As real device-nodes managed by udev whose nodes lived in /dev/bus/usb
are mostly used today, let testusb tool use that directory as one default
path make tool be more convenient to use.

Signed-off-by: Du Changbin <changbinx.du@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 54b8360f 13-Jan-2012 Michal Nazarewicz <mina86@mina86.com>

usb: gadget: update Michal Nazarewicz's email address

The m.nazarewicz@samsung.com email address is no longer valid,
so this commit replaces it with mina86@mina86.com which is
employer-agnostic and thus should be valid for foreseeable
feature.

Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>


# 5bc9661c 04-May-2010 Michal Nazarewicz <m.nazarewicz@samsung.com>

USB: testusb: testusb compatibility with FunctionFS gadget

The FunctionFS gadget may provide the source/sink interface
not as the first interface (with id == 0) but some different
interface hence a code to find the interface number is
required.

(Note that you will still configure the gadget to report
idProduct == 0xa4a4 (an "echo 0xa4a4
>/sys/module/g_ffs/parameters/usb_product" should suffice) or
configure host to handle 0x0525:0xa4ac devices using the
usbtest driver.)

Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 2201d6b1 04-May-2010 David Brownell <dbrownell@users.sourceforge.net>

USB: testusb: an USB testing application

The testusb program just issues ioctls to perform the tests
implemented by the kernel driver. It can generate a variety
of transfer patterns; you should make sure to test both regular
streaming and mixes of transfer sizes (including short transfers).

For more information on how this can be used and on USB testing
refer to <URL:http://www.linux-usb.org/usbtest/>.

Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>