Skip to content

Conversation

@jfischer-no
Copy link
Contributor

Fixes for USB device support.

…FS devices

With the commit fe3c001 ("usb: device_next: disable high-speed USB
device descriptor if not used") there is no high-speed device descriptor
by default.

Signed-off-by: Johann Fischer <[email protected]>
(cherry picked from commit 569f4d6)
In both implementation, when comparing received data length take into
account that the buffer obtained from bt_buf_get_tx() stores the type at
the top. The buffer types are H:4 and in the TX path we need to check for
BT_HCI_H4_* types not BT_BUF_*.

In the legacy implementation, the hci_acl_pkt_len() function obtains the
length from the USB transaction buffer, which does not contain a buffer
type at the top.

In the new implementation, partially revert the changes and restore
hci_pkt_get_len(), this will be required for any further changes anyway.

Fixes commit f85d63a ("Bluetooth: Remove USB H4 mode support").

Signed-off-by: Johann Fischer <[email protected]>
(cherry picked from commit 96422f2)
…nsfer enqueue fail

Do not take semaphore if transfer enqueue fails.

Signed-off-by: Johann Fischer <[email protected]>
(cherry picked from commit d2e42c9)
…ng descriptor

The intention was to use the "interface-name" string property in the
interface string descriptor, but using the label property is acceptable
again. Therefore, allow the use of the DT label property string in the
interface string descriptor.

Follow exactly the same approach as in the CDC ACM implementation
introduced in the commit b079140
("usb: device_next: cdc_acm: allow setting the interface description").

Signed-off-by: Johann Fischer <[email protected]>
(cherry picked from commit 79a8073)
@sonarqubecloud
Copy link

Copy link
Contributor

@gchwier gchwier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested internally with USB3CV, all tests passed (it fixes webusb-next sample)

Copy link
Contributor

@Frodevan Frodevan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can verify that this fixes hci_usb on the nRF52840

@carlescufi carlescufi merged commit ead10fc into nrfconnect:main Jun 25, 2025
23 checks passed
@jfischer-no jfischer-no deleted the pr-device_next-for-sdk-zephyr branch June 25, 2025 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants