Page MenuHomeFreeBSD

USBExperimental
ActivePublic

Details

Description

Groups related to USB stuff.

Recent Activity

Yesterday

farhan_farhan.codes updated the diff for D49884: Porting athn from OpenBSD.
Sat, Dec 5, 8:23 PM · wireless, USB, network

Wed, Dec 2

wulf added a comment to D60846: hid: avoid 32-bit overflow when computing report size.

It is wrong to cap report size to 0.5Gb. It is even worse then integer wrapping as results in larger size of allocated buffers. 2^16 bytes sounds better here.

Wed, Dec 2, 4:44 PM · USB

Tue, Dec 1

adrian added a comment to D60846: hid: avoid 32-bit overflow when computing report size.

neat! @wulf what do you think?

Tue, Dec 1, 4:15 PM · USB
ojanerif_amd.com updated the diff for D60846: hid: avoid 32-bit overflow when computing report size.

Switched to ckd_mul()/ckd_add() from sys/ckdint.h. Also fixed the same wrap in the byte rounding and in the hmt pos + size check.

Tue, Dec 1, 2:59 PM · USB

Mon, Nov 30

adrian added inline comments to D60846: hid: avoid 32-bit overflow when computing report size.
Mon, Nov 30, 3:27 PM · USB
adrian added a project to D60846: hid: avoid 32-bit overflow when computing report size: USB.

(not entirely USB as HID is more expansive than just that, but still.. tagged with USB to look at.)

Mon, Nov 30, 3:25 PM · USB

Sat, Nov 7

seuros closed D61278: xhci: only set the slot context parent hub fields on xHCI 1.2.
Sat, Nov 7, 9:56 AM · drivers, USB
ngie accepted D61278: xhci: only set the slot context parent hub fields on xHCI 1.2.

Seems straightforward to me too.

Sat, Nov 7, 4:35 AM · drivers, USB
adrian accepted D61278: xhci: only set the slot context parent hub fields on xHCI 1.2.
Sat, Nov 7, 4:32 AM · drivers, USB
aokblast accepted D61278: xhci: only set the slot context parent hub fields on xHCI 1.2.
Sat, Nov 7, 4:29 AM · drivers, USB

Fri, Nov 6

seuros removed a reviewer for D61278: xhci: only set the slot context parent hub fields on xHCI 1.2: • hselasky.
Fri, Nov 6, 11:36 PM · drivers, USB
adrian added a comment to D61278: xhci: only set the slot context parent hub fields on xHCI 1.2.

This looks fine to me. I wonder who else we should tag. @aokblast ?

Fri, Nov 6, 11:19 PM · drivers, USB
adrian added projects to D61278: xhci: only set the slot context parent hub fields on xHCI 1.2: USB, drivers.
Fri, Nov 6, 11:18 PM · drivers, USB

Nov 4 2026

adrian closed D61065: cp2112: Check status errors and bound I2C waits.
Nov 4 2026, 7:12 PM · USB, drivers
adrian accepted D61065: cp2112: Check status errors and bound I2C waits.
Nov 4 2026, 6:13 PM · USB, drivers
ptudor_ptudor.net updated the diff for D61065: cp2112: Check status errors and bound I2C waits.

Thanks, I've added LUMANATE (0x1009) to usbdevs and used USB_VENDOR_LUMANATE in both the HID quirk and cp2112_devs. The updated diff has full context.

Nov 4 2026, 8:45 AM · USB, drivers
wulf accepted D61065: cp2112: Check status errors and bound I2C waits.
Nov 4 2026, 5:17 AM · USB, drivers
ptudor_ptudor.net updated the diff for D61065: cp2112: Check status errors and bound I2C waits.

Thanks, I've removed the two comments and changed the timeout to USB_DEFAULT_TIMEOUT * SBT_1MS (five seconds). Each report wait and status loop retains its own absolute deadline.

Nov 4 2026, 12:55 AM · USB, drivers

Nov 3 2026

wulf added inline comments to D61065: cp2112: Check status errors and bound I2C waits.
Nov 3 2026, 6:33 PM · USB, drivers
wulf added inline comments to D61065: cp2112: Check status errors and bound I2C waits.
Nov 3 2026, 6:22 PM · USB, drivers
adrian added a comment to D61065: cp2112: Check status errors and bound I2C waits.

This /looks/ fine to me, but there's too much commenting for what's really self evident stuff.

Nov 3 2026, 5:56 PM · USB, drivers

Nov 2 2026

aokblast closed D52347: usb: support SSP and SSPx2 xHCI.
Nov 2 2026, 3:03 AM · USB
aokblast closed D57204: usb: Add support for SSP and SSPx2 hubs.
Nov 2 2026, 3:03 AM · USB
aokblast closed D57203: usb: Add SSPlus device capability descriptor.
Nov 2 2026, 3:03 AM · USB
aokblast closed D57202: usb: Implement usbd_req_get_bos_descriptor helper.
Nov 2 2026, 3:03 AM · USB
aokblast closed D57201: usb: Add get_ext_port_status helper function.
Nov 2 2026, 3:03 AM · USB
aokblast closed D57200: usb: Add extended port status struct.
Nov 2 2026, 3:03 AM · USB
aokblast closed D57199: usb: Add usb_bos_foreach helper.
Nov 2 2026, 3:03 AM · USB
aokblast closed D57198: usb: support SSP/SSPx2 devices in all-speed consumers.
Nov 2 2026, 3:03 AM · USB
aokblast closed D57197: usbdump: Support SSP and SSPx2 speed display.
Nov 2 2026, 3:03 AM · USB
aokblast closed D57196: usbconfig: Add SSPx2 support.
Nov 2 2026, 3:03 AM · USB
aokblast closed D57195: libusb: Add SSP and SSPx2 enum support.
Nov 2 2026, 3:03 AM · USB
aokblast closed D57194: usb: Add SSP and SSPx2 speed and move USB_*_MAX into enum.
Nov 2 2026, 3:03 AM · USB

Oct 31 2026

adrian added a reviewer for D61065: cp2112: Check status errors and bound I2C waits: wulf.

@wulf any comments re: i2c'ness?

Oct 31 2026, 9:08 PM · USB, drivers

Oct 9 2026

obiwac closed D49453: USB4 initial work on suspend routine.
Oct 9 2026, 5:34 PM · USB
ngie accepted D49453: USB4 initial work on suspend routine.
Oct 9 2026, 4:51 PM · USB
obiwac updated the diff for D49453: USB4 initial work on suspend routine.

refer to bug

Oct 9 2026, 10:45 AM · USB
ngie added a comment to D49453: USB4 initial work on suspend routine.

If you could mention the bug (once) in the code, that would be helpful and I'm happy to provide a ship-it.

Oct 9 2026, 4:49 AM · USB

Oct 7 2026

obiwac added inline comments to D49453: USB4 initial work on suspend routine.
Oct 7 2026, 12:47 PM · USB
obiwac updated the diff for D49453: USB4 initial work on suspend routine.

Polling only for tSetSR now, instead of tSetSR 100 times. Note that Linux waits about 10 times tSetSR, but on my hardware just tSetSR works perfectly fine, and this is to-spec.

Oct 7 2026, 12:46 PM · USB

Oct 2 2026

ngie added a comment to D49453: USB4 initial work on suspend routine.

My concerns are about the TODOs needing documentation in Bugzilla/the wiki. TODOs without followup issues clutter up source code, except for the person who has the context: in this case, you (while you remember what the TODOs mean).

Oct 2 2026, 4:03 PM · USB

Sep 14 2026

obiwac added inline comments to D49453: USB4 initial work on suspend routine.
Sep 14 2026, 4:24 PM · USB
obiwac updated the diff for D49453: USB4 initial work on suspend routine.

rebase + respond to comments

Sep 14 2026, 4:24 PM · USB

Sep 6 2026

bz added a comment to D57194: usb: Add SSP and SSPx2 speed and move USB_*_MAX into enum.

I do not see any changes to usb_transfer.c in the stack.
That likely means usbd_get_std_packet_size() array accesses may get out of bounds accesses?
If I am right, this should be addressed somewhere before this or other bits go in.

It is in https://reviews.freebsd.org/D57198.

Sep 6 2026, 4:15 PM · USB

Sep 5 2026

aokblast added a comment to D57194: usb: Add SSP and SSPx2 speed and move USB_*_MAX into enum.
In D57194#1363739, @bz wrote:
In D57194#1311193, @bz wrote:

Fantasic! You are solving one of my local TODOs :)

Can you make all these USB changes belonging together a stack in Phabricator?
It's a bit hard to grasp which all are there or belong together.
I'd be happy to at least scroll through them even if I cannot review them all in detail most likely.

% git show 9dbb804f59533d7d539200367394e4013714b02c
commit 9dbb804f59533d7d539200367394e4013714b02c
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: Mon Feb 9 01:11:41 2026 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: Sun May 24 15:53:58 2026 +0000

    TODO usb: add USB_SPEED_SUPER_PLUS to enum usb_dev_speed
    
    While nothing in our native USB stack uses the USB 3.1 "SUPERSPEED+"
    setting yet, a LinuxKPI based wireless driver does check for it.
    
    TODO: The arrays in usbd_get_std_packet_size() likely need to be updated.
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      3 days

diff --git sys/dev/usb/usb.h sys/dev/usb/usb.h
index 3e972f876c6a..f07eb9adfe40 100644
--- sys/dev/usb/usb.h
+++ sys/dev/usb/usb.h
@@ -755,8 +755,9 @@ enum usb_dev_speed {
        USB_SPEED_FULL,
        USB_SPEED_HIGH,
        USB_SPEED_SUPER,
+       USB_SPEED_SUPER_PLUS,
 };
-#define        USB_SPEED_MAX   (USB_SPEED_SUPER+1)
+#define        USB_SPEED_MAX   (USB_SPEED_SUPER_PLUS+1)
 
 /*
  * The "USB_REV" macros defines all the supported USB revisions.

Hi bz@, Thanks for your reply. I might not know what is the correct way to do so. But I think in the stack tab, all of my patches can be seen in here.

CleanShot 2026-05-25 at 15.23.44.png (1,508×866 px, 227 KB)

I do not see any changes to usb_transfer.c in the stack.
That likely means usbd_get_std_packet_size() array accesses may get out of bounds accesses?
If I am right, this should be addressed somewhere before this or other bits go in.

Sep 5 2026, 11:35 PM · USB
bz added a reviewer for D57320: usb: Refactor functions need lock: USB.
Sep 5 2026, 9:46 PM · USB
bz added inline comments to D56891: usb_hub: Trigger only chaged port on enumeration.
Sep 5 2026, 9:45 PM · USB
bz added a comment to D57194: usb: Add SSP and SSPx2 speed and move USB_*_MAX into enum.
In D57194#1311193, @bz wrote:

Fantasic! You are solving one of my local TODOs :)

Can you make all these USB changes belonging together a stack in Phabricator?
It's a bit hard to grasp which all are there or belong together.
I'd be happy to at least scroll through them even if I cannot review them all in detail most likely.

% git show 9dbb804f59533d7d539200367394e4013714b02c
commit 9dbb804f59533d7d539200367394e4013714b02c
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: Mon Feb 9 01:11:41 2026 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: Sun May 24 15:53:58 2026 +0000

    TODO usb: add USB_SPEED_SUPER_PLUS to enum usb_dev_speed
    
    While nothing in our native USB stack uses the USB 3.1 "SUPERSPEED+"
    setting yet, a LinuxKPI based wireless driver does check for it.
    
    TODO: The arrays in usbd_get_std_packet_size() likely need to be updated.
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      3 days

diff --git sys/dev/usb/usb.h sys/dev/usb/usb.h
index 3e972f876c6a..f07eb9adfe40 100644
--- sys/dev/usb/usb.h
+++ sys/dev/usb/usb.h
@@ -755,8 +755,9 @@ enum usb_dev_speed {
        USB_SPEED_FULL,
        USB_SPEED_HIGH,
        USB_SPEED_SUPER,
+       USB_SPEED_SUPER_PLUS,
 };
-#define        USB_SPEED_MAX   (USB_SPEED_SUPER+1)
+#define        USB_SPEED_MAX   (USB_SPEED_SUPER_PLUS+1)
 
 /*
  * The "USB_REV" macros defines all the supported USB revisions.

Hi bz@, Thanks for your reply. I might not know what is the correct way to do so. But I think in the stack tab, all of my patches can be seen in here.

CleanShot 2026-05-25 at 15.23.44.png (1,508×866 px, 227 KB)

Sep 5 2026, 9:41 PM · USB
bz requested changes to D57196: usbconfig: Add SSPx2 support.
Sep 5 2026, 9:38 PM · USB
bz accepted D57195: libusb: Add SSP and SSPx2 enum support.
Sep 5 2026, 9:36 PM · USB