Steven Slupsky <sslupsky@...>
There were two recent issues (#23444, #24103) that identified a byte ordering issue with the hwinfo API. A PR (#24203) has been submitted to clarify the hwinfo API identifier data structure. This clarification has resulted in changes to the sam0 and nordic drivers. Moreover, some components that depend on the hwinfo api may have implemented work arounds for this issue. Issue #24103 identified the USB identifier was affected and issue #23444 identified Bluetooth may be affected.
A summary of the commit is provided below. Please note other drivers may be affected by this issue.
The identifier data structure for hwinfo drivers is clarified. Drivers are responsible for ensuring that the identifier data structure is a sequence of bytes. The returned ID value is not supposed to be interpreted based on vendor-specific assumptions of byte order and should express the identifier as a raw byte sequence.
The changes have an impact on users that use the hwinfo API to identify their devices.
The sam0 driver byte swaps each 32 bit word of the 128 bit identifier to big endian. The nordic driver byte swaps the entire 64 bit word to big endian.