Index | Thread | Search

From:
Alexandre Ratchov <alex@caoua.org>
Subject:
Re: sys/xhci: suppoort USB3 speeds
To:
landry@openbsd.org, tech@openbsd.org, mglocker@openbsd.org
Date:
Fri, 28 Feb 2025 15:17:34 +0100

Download raw body.

Thread
On Fri, Feb 28, 2025 at 02:34:47PM +0100, Kirill A. Korinsky wrote:
> On Fri, 28 Feb 2025 10:20:04 +0100,
> Landry Breuil <landry@openbsd.org> wrote:
> > 
> > Le Thu, Feb 27, 2025 at 08:21:25PM +0100, Kirill A. Korinsky a écrit :
> > > tech@,
> > > 
> > > I'd like to add support of USB3 speeds to XHCI driver.
> > > 
> > > This diff was tested on Snapdragon SoC:
> > > 
> > > 	xhci0 at qcdwusb0, xHCI 1.10
> > > 	usb0 at xhci0: USB revision 3.0
> > > 	uhub0 at usb0 configuration 1 interface 0 "Generic xHCI root hub" rev 3.00/1.00 addr 1
> > > 
> > > I also used diff: https://marc.info/?l=openbsd-tech&m=174032299500347&w=2
> > > and switched Elgato Facecam Pro to isochronous mode with streaming
> > > 3840x2160 30fps with 33740 isoc frames / packets.
> > 
> > i see the intent is to make it work with cameras, but shouldnt just
> > adding support for USB3 speeds also benefit to transfer speeds for other
> > usb devices (eg usb keys) ?
> > 
> 
> Here two kind endpoints: bulk and isochronous. Bulk already works with USB3
> speed, and both patches is required only for isochronous.
> 
> Seems that only uvideo, utvfu, uaudio and ugen uses that endpoints. I see
> that wMaxPacketSize is used only in uvideo, utvfu and ugen.
> 

FWIW, wMaxPacketSize is used by uaudio(4) in uaudio_stream_open() line
2993 to verify that the desired audio samples-per-frame results in
packets not larger than wMaxPacketSize.

uaudio_attach() tries to handle USB_SPEED_SUPER, but I've haven't seen
any audio interfaces using usb 3 speeds yet.