Page MenuHomeFreeBSD

bhyve: Fix language id of String Descriptors in usb mouse.
ClosedPublic

Authored by wanpengqian_gmail.com on Sep 18 2020, 12:59 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jun 26, 9:57 AM
Unknown Object (File)
Wed, Jun 24, 9:04 AM
Unknown Object (File)
Tue, Jun 16, 8:37 PM
Unknown Object (File)
Mon, Jun 15, 11:16 PM
Unknown Object (File)
Sun, Jun 14, 5:29 PM
Unknown Object (File)
Sun, Jun 14, 9:22 AM
Unknown Object (File)
May 15 2026, 5:18 PM
Unknown Object (File)
May 15 2026, 5:17 PM
Subscribers

Details

Summary

The language id of String Descriptors in usb mouse is
0x0904, while the spec require 0x0409 (English - United States)

Test Plan

From windows guest, using usb utility, USB Device Tree Viewer v3.4.0
check the String Descriptor 0

Without this patch, the String Descriptor 0 is

      -------------------- String Descriptors -------------------
             ------ String Descriptor 0 ------
bLength                  : 0x04 (4 bytes)
bDescriptorType          : 0x03 (String Descriptor)
Language ID[0]           : 0x0904 (unknown)
Data (HexDump)           : 04 03 04 09                                       ....
             ------ String Descriptor 1 ------
bLength                  : 0x0C (12 bytes)
bDescriptorType          : 0x03 (String Descriptor)
Language 0x0904          : "BHYVE"
Data (HexDump)           : 0C 03 42 00 48 00 59 00 56 00 45 00               ..B.H.Y.V.E.

After apply the patch

      -------------------- String Descriptors -------------------
             ------ String Descriptor 0 ------
bLength                  : 0x04 (4 bytes)
bDescriptorType          : 0x03 (String Descriptor)
Language ID[0]           : 0x0409 (English - United States)
Data (HexDump)           : 04 03 09 04                                       ....
             ------ String Descriptor 1 ------
bLength                  : 0x0C (12 bytes)
bDescriptorType          : 0x03 (String Descriptor)
Language 0x0409          : "BHYVE"
Data (HexDump)           : 0C 03 42 00 48 00 59 00 56 00 45 00               ..B.H.Y.V.E.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 33620
Build 30865: arc lint + arc unit