Re: [PATCH 0/6] thunderbolt: property: Fix property parsing on big-endian
From: Mika Westerberg
Date: Mon May 25 2026 - 05:35:53 EST
Hi,
On Sun, May 24, 2026 at 03:06:42PM +0200, Thomas Weißschuh wrote:
> The parsing logic currently only works on little-endian.
> Also make it work on big-endian.
I'm all in making it more portable. Do you have big-endian hardware with
USB4 support or you are just doing so to cover some future hardware? Also
how did you test this?
> The first four patches are necessary to make the parsing work on
> big-endian machines. The remaining ones are some trivial cleanups.
>
> Based on thunderbolt/fixes.
I suggest basing on my next branch because these are really not
regressions, rather you are "improving" the code (and I prefer to keep
these longer in linux-next so that we could catch any unintended
side-effects).
> Signed-off-by: Thomas Weißschuh <linux@xxxxxxxxxxxxxx>
> ---
> Thomas Weißschuh (6):
> thunderbolt: test: Make root_directory independent of host byte order
> thunderbolt: property: Unify format_dwdata()/parse_dwdata()
> thunderbolt: property: Make format_dwdata() work on big-endian systems
> thunderbolt: property: Convert byte order of numeric fields
> thunderbolt: property: Unify parse_dwdata()/format_dwdata()
> thunderbolt: property: Make entry key modifications more visible
>
> drivers/thunderbolt/property.c | 93 ++++++++++++++++++------------------
> drivers/thunderbolt/test.c | 106 ++++++++++++++++++++---------------------
> 2 files changed, 100 insertions(+), 99 deletions(-)
> ---
> base-commit: 6ff00aaa856d16015e5bafbcf89e3998fd4a7c2b
> change-id: 20260524-thunderbolt-big-endian-9f012cfc062b
>
> Best regards,
> --
> Thomas Weißschuh <linux@xxxxxxxxxxxxxx>