svn commit: r334987 - head/sys/dev/cxgbe
Navdeep Parhar
np at FreeBSD.org
Tue Jun 12 06:46:04 UTC 2018
Author: np
Date: Tue Jun 12 06:46:03 2018
New Revision: 334987
URL: https://svnweb.freebsd.org/changeset/base/334987
Log:
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.
MFC after: 1 week
Sponsored by: Chelsio Communications
Modified:
head/sys/dev/cxgbe/osdep.h
head/sys/dev/cxgbe/t4_main.c
Modified: head/sys/dev/cxgbe/osdep.h
==============================================================================
--- head/sys/dev/cxgbe/osdep.h Tue Jun 12 03:44:34 2018 (r334986)
+++ head/sys/dev/cxgbe/osdep.h Tue Jun 12 06:46:03 2018 (r334987)
@@ -67,11 +67,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: head/sys/dev/cxgbe/t4_main.c
==============================================================================
--- head/sys/dev/cxgbe/t4_main.c Tue Jun 12 03:44:34 2018 (r334986)
+++ head/sys/dev/cxgbe/t4_main.c Tue Jun 12 06:46:03 2018 (r334987)
@@ -3213,7 +3213,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),
@@ -3229,7 +3229,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),
@@ -3245,7 +3245,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),
More information about the svn-src-head
mailing list