On Fri Dec 5 11:34:57 2025 +0000, Rémi Bernon wrote:
Could we just make port_path a UINT64? Using an array only to parse it, or does the format matter for something? I thought about that, but it would generate huge numbers depending on the endianness. In most cases only the first level is used, filling the others with zeroes. I chose 8 byte array, since the USB3 spec defines max 7 levels of chained ports, and memcmp, memcpy, etc. are well optimized to deal with 64bit buffers.
I have an implementation of IOCTL_HID_GET_INDEXED_STRING (still not ready for upstream), which relies on matching bus_num/port_path on the device instances of both winebus.sys and wineusb.sys. Since wineusb.sys uses libusb, that needs a byte array to retrieve the port path, decided to follow the same logic in winebus.sys as well. Still no problem implementing it as UINT64 if we decide to do so. Although, the byte array gives us the flexibility to easily expand it further, if the USB spec requires that in the future. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9687#note_124975