Linux USB
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@kernel.org>
To: "faizel.kb" <faizel.kb@dicortech.com>
Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org
Subject: Re: [PATCH] usb: testusb: Fix for showing the connection speed
Date: Wed, 01 Sep 2021 08:49:41 +0300	[thread overview]
Message-ID: <87eea8deuz.fsf@kernel.org> (raw)
In-Reply-To: <20210831174742.105621-1-faizel.kb@dicortech.com>


"faizel.kb" <faizel.kb@dicortech.com> writes:

> '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.kb <faizel.kb@dicortech.com>

Acked-by: Felipe Balbi <balbi@kernel.org>


-- 
balbi

  reply	other threads:[~2021-09-01  5:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-31 17:47 [PATCH] usb: testusb: Fix for showing the connection speed faizel.kb
2021-09-01  5:49 ` Felipe Balbi [this message]
2021-09-01  5:56 ` Greg KH
2021-09-01 18:13   ` Faizel K B
2021-09-01 18:24     ` Greg KH
2021-09-02  8:33       ` Faizel K B
2021-09-02  8:42         ` Greg KH
2021-09-02  8:58           ` Faizel K B

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87eea8deuz.fsf@kernel.org \
    --to=balbi@kernel.org \
    --cc=faizel.kb@dicortech.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox