Date: Fri, 25 Aug 2023 07:17:53 GMT From: Kevin Bowling <kbowling@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 42d73e9ec146 - stable/13 - ixgbe: define IXGBE_LE32_TO_CPUS Message-ID: <202308250717.37P7Hrjh074539@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=42d73e9ec1464a4ebc26d32201def571550e9ba9 commit 42d73e9ec1464a4ebc26d32201def571550e9ba9 Author: Kevin Bowling <kbowling@FreeBSD.org> AuthorDate: 2023-08-14 01:47:09 +0000 Commit: Kevin Bowling <kbowling@FreeBSD.org> CommitDate: 2023-08-25 07:17:23 +0000 ixgbe: define IXGBE_LE32_TO_CPUS Richard Lowe notes in PR 170267 IXGBE_LE32_TO_CPUS was previously directly defined as le32dec() which is a pure function but the shared code is expecting an in place conversion. In SVN r282289 its assignment was removed altogether. There was some deliberation in the PR on what to define this as, we just need to do the update in place which is easy enough. The uintptr_t casts in the shared code were from a DPDK sync and are unwanted with our new ixgbe_osdep.h implementation. PR: 170267 Reported by: Richard Lowe <richlowe@richlowe.net> (cherry picked from commit bef7d49101cdf28830a648f63ff00998fbe54715) --- sys/dev/ixgbe/ixgbe_common.c | 4 ++-- sys/dev/ixgbe/ixgbe_osdep.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_common.c b/sys/dev/ixgbe/ixgbe_common.c index 91c12eadd1e3..6c1396ad964f 100644 --- a/sys/dev/ixgbe/ixgbe_common.c +++ b/sys/dev/ixgbe/ixgbe_common.c @@ -4640,7 +4640,7 @@ s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u32 *buffer, /* first pull in the header so we know the buffer length */ for (bi = 0; bi < dword_len; bi++) { buffer[bi] = IXGBE_READ_REG_ARRAY(hw, IXGBE_FLEX_MNG, bi); - IXGBE_LE32_TO_CPUS((uintptr_t)&buffer[bi]); + IXGBE_LE32_TO_CPUS(&buffer[bi]); } /* @@ -4676,7 +4676,7 @@ s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u32 *buffer, /* Pull in the rest of the buffer (bi is where we left off) */ for (; bi <= dword_len; bi++) { buffer[bi] = IXGBE_READ_REG_ARRAY(hw, IXGBE_FLEX_MNG, bi); - IXGBE_LE32_TO_CPUS((uintptr_t)&buffer[bi]); + IXGBE_LE32_TO_CPUS(&buffer[bi]); } rel_out: diff --git a/sys/dev/ixgbe/ixgbe_osdep.h b/sys/dev/ixgbe/ixgbe_osdep.h index 92942cbab103..7aabfea66484 100644 --- a/sys/dev/ixgbe/ixgbe_osdep.h +++ b/sys/dev/ixgbe/ixgbe_osdep.h @@ -134,7 +134,7 @@ enum { #define IXGBE_CPU_TO_LE16 htole16 #define IXGBE_CPU_TO_LE32 htole32 #define IXGBE_LE32_TO_CPU le32toh -#define IXGBE_LE32_TO_CPUS(x) +#define IXGBE_LE32_TO_CPUS(x) *(x) = le32dec(x) #define IXGBE_CPU_TO_BE16 htobe16 #define IXGBE_CPU_TO_BE32 htobe32 #define IXGBE_BE32_TO_CPU be32toh
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202308250717.37P7Hrjh074539>