Date: Wed, 17 Oct 2018 01:59:45 +0000 (UTC) From: Navdeep Parhar <np@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r339402 - stable/11/sys/dev/cxgbe Message-ID: <201810170159.w9H1xjps090973@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: np Date: Wed Oct 17 01:59:45 2018 New Revision: 339402 URL: https://svnweb.freebsd.org/changeset/base/339402 Log: MFC r334987: cxgbe(4): Remove homemade version of htobe32 from the driver. It was needed only for ia64 where it was implemented as a call to bswapXX, which was always a real function. htobeXX with a constant argument is calculated at compile-time everywhere else. Modified: stable/11/sys/dev/cxgbe/osdep.h stable/11/sys/dev/cxgbe/t4_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/osdep.h ============================================================================== --- stable/11/sys/dev/cxgbe/osdep.h Wed Oct 17 01:49:43 2018 (r339401) +++ stable/11/sys/dev/cxgbe/osdep.h Wed Oct 17 01:59:45 2018 (r339402) @@ -65,11 +65,8 @@ typedef uint64_t __be64; #if BYTE_ORDER == BIG_ENDIAN #define __BIG_ENDIAN_BITFIELD -#define htobe32_const(x) (x) #elif BYTE_ORDER == LITTLE_ENDIAN #define __LITTLE_ENDIAN_BITFIELD -#define htobe32_const(x) (((x) >> 24) | (((x) >> 8) & 0xff00) | \ - ((((x) & 0xffffff) << 8) & 0xff0000) | ((((x) & 0xff) << 24) & 0xff000000)) #else #error "Must set BYTE_ORDER" #endif Modified: stable/11/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_main.c Wed Oct 17 01:49:43 2018 (r339401) +++ stable/11/sys/dev/cxgbe/t4_main.c Wed Oct 17 01:59:45 2018 (r339402) @@ -3064,7 +3064,7 @@ struct fw_info { .fw_mod_name = "t4fw", .fw_hdr = { .chip = FW_HDR_CHIP_T4, - .fw_ver = htobe32_const(FW_VERSION(T4)), + .fw_ver = htobe32(FW_VERSION(T4)), .intfver_nic = FW_INTFVER(T4, NIC), .intfver_vnic = FW_INTFVER(T4, VNIC), .intfver_ofld = FW_INTFVER(T4, OFLD), @@ -3080,7 +3080,7 @@ struct fw_info { .fw_mod_name = "t5fw", .fw_hdr = { .chip = FW_HDR_CHIP_T5, - .fw_ver = htobe32_const(FW_VERSION(T5)), + .fw_ver = htobe32(FW_VERSION(T5)), .intfver_nic = FW_INTFVER(T5, NIC), .intfver_vnic = FW_INTFVER(T5, VNIC), .intfver_ofld = FW_INTFVER(T5, OFLD), @@ -3096,7 +3096,7 @@ struct fw_info { .fw_mod_name = "t6fw", .fw_hdr = { .chip = FW_HDR_CHIP_T6, - .fw_ver = htobe32_const(FW_VERSION(T6)), + .fw_ver = htobe32(FW_VERSION(T6)), .intfver_nic = FW_INTFVER(T6, NIC), .intfver_vnic = FW_INTFVER(T6, VNIC), .intfver_ofld = FW_INTFVER(T6, OFLD),
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810170159.w9H1xjps090973>