Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing values in libusb_speed and libusb_supported_speed enums #1354

Open
fabiensanglard opened this issue Nov 29, 2023 · 3 comments
Open
Labels
core Related to common codes enhancement New features

Comments

@fabiensanglard
Copy link

fabiensanglard commented Nov 29, 2023

I have noticed that enum libusb_speed does not support speed beyond 10000Mbps.

enum libusb_speed {
	/** The OS doesn't report or know the device speed. */
	LIBUSB_SPEED_UNKNOWN = 0,

	/** The device is operating at low speed (1.5MBit/s). */
	LIBUSB_SPEED_LOW = 1,

	/** The device is operating at full speed (12MBit/s). */
	LIBUSB_SPEED_FULL = 2,

	/** The device is operating at high speed (480MBit/s). */
	LIBUSB_SPEED_HIGH = 3,

	/** The device is operating at super speed (5000MBit/s). */
	LIBUSB_SPEED_SUPER = 4,

	/** The device is operating at super speed plus (10000MBit/s). */
	LIBUSB_SPEED_SUPER_PLUS = 5
};

Likewise, enum libusb_supported_speed has not support beyond 5000Mbps.

enum libusb_supported_speed {
	/** Low speed operation supported (1.5MBit/s). */
	LIBUSB_LOW_SPEED_OPERATION = (1 << 0),

	/** Full speed operation supported (12MBit/s). */
	LIBUSB_FULL_SPEED_OPERATION = (1 << 1),

	/** High speed operation supported (480MBit/s). */
	LIBUSB_HIGH_SPEED_OPERATION = (1 << 2),

	/** Superspeed operation supported (5000MBit/s). */
	LIBUSB_SUPER_SPEED_OPERATION = (1 << 3)
};

Is it an oversight or something libusb has no access to?

@tormodvolden
Copy link
Contributor

See also #680

@mcuee mcuee added enhancement New features core Related to common codes labels Nov 30, 2023
@fabiensanglard
Copy link
Author

I have made more testing with another setting. The configuration I used was:

Mac M1 -> Caldigit TS4+ -> Pixel 6

Reported speed (via libusb_get_device_speed): LIBUSB_SPEED_SUPER_PLUS = 10,000

Reported max supported (via libusb_ss_usb_device_capability_descriptor): LIBUSB_SUPER_SPEED_OPERATION = 5,000

The numbers indicate a speed superior to the maximum supported speed. Which make no sense.

@fabiensanglard
Copy link
Author

It looks like there is already a PR to solve this issue: #1298

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Related to common codes enhancement New features
Projects
None yet
Development

No branches or pull requests

3 participants