[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0b9e353b-2560-4884-b826-6ff26b933888@rowland.harvard.edu>
Date: Thu, 11 Apr 2024 12:21:46 -0400
From: Alan Stern <stern@...land.harvard.edu>
To: Marcello Sylvester Bauer <sylv@...v.io>
Cc: linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Marcello Sylvester Bauer <marcello.bauer@...ements.com>,
Matthias Stoeckl <matthias.stoeckl@...unet.com>,
Uwe Kleine-Koenig <u.kleine-koenig@...gutronix.de>
Subject: Re: [PATCH v1 2/2] usb: gadget: dummy_hcd: Set transfer interval to
1 microframe
On Thu, Apr 11, 2024 at 05:22:11PM +0200, Marcello Sylvester Bauer wrote:
> Currently, the transfer polling interval is set to 1ms, which is the
> frame rate of full-speed and low-speed USB. The USB 2.0 specification
> introduces microframes (125 microseconds) to improve the timing
> precision of data transfers.
>
> Reducing the transfer interval to 1 microframe increases data throughput
> for high-speed and super-speed USB communication
>
> Signed-off-by: Marcello Sylvester Bauer <marcello.bauer@...ements.com>
> Signed-off-by: Marcello Sylvester Bauer <sylv@...v.io>
> ---
> drivers/usb/gadget/udc/dummy_hcd.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/usb/gadget/udc/dummy_hcd.c b/drivers/usb/gadget/udc/dummy_hcd.c
> index dab559d8ee8c..f37b0d8386c1 100644
> --- a/drivers/usb/gadget/udc/dummy_hcd.c
> +++ b/drivers/usb/gadget/udc/dummy_hcd.c
> @@ -50,6 +50,8 @@
> #define POWER_BUDGET 500 /* in mA; use 8 for low-power port testing */
> #define POWER_BUDGET_3 900 /* in mA */
>
> +#define DUMMY_TIMER_INT_NSECS 125000 /* 1 microframe */
If the is_super_speed and is_high_speed module parameters are both false
then the timer should run at 1-ms intervals. So this needs to be
something that can be adjusted at runtime, not a constant.
Alan Stern
Powered by blists - more mailing lists