Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Jan 2020 15:52:17 +0100
From:      Hans Petter Selasky <hps@selasky.org>
To:        Wojciech Puchar <wojtek@puchar.net>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: raspberry pi zero and SLOW USB HID
Message-ID:  <9a1a3901-ce03-d445-dd9e-bbd775f5288a@selasky.org>
In-Reply-To: <alpine.BSF.2.20.2001131539550.36878@puchar.net>
References:  <alpine.BSF.2.20.2001131439440.2189@puchar.net> <9f8ae63f-abe5-27d9-e6bf-3d0cc1d3d4f3@selasky.org> <alpine.BSF.2.20.2001131539550.36878@puchar.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2020-01-13 15:44, Wojciech Puchar wrote:
>>
>> Can you check the USB speed used between PC and RPI-zero ? Is one 
>> perhaps High-Speed, while the other is, Full-Speed?
>>
>> If yes, try to connect a high-speed USB hub in between.
>>
>> Output from:
>> usbconfig
>>
>>
>> You can also check using "usbdump -i usbus0 -s 65536" to see the 
>> actual timing of the commands.
>>

Hi,

I think I understand now.

> device is the same hardware with the same firmware. What causes larger 
> delays?

What you see is likely a manifestion of:

#define DWC_OTG_HOST_TIMER_RATE 10 /* ms */

Which is because we want save a little power polling the DWC OTG.

To avoid this:

USB transfers must be double buffered! That means you must submit two 
IN-endpoint jobs, instead of just one. Then the driver will understand 
there is more work to do, and not go to idlewait!

--HPS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9a1a3901-ce03-d445-dd9e-bbd775f5288a>