>Number: 170267 >Category: kern >Synopsis: IXGBE_LE32_TO_CPUS is probably an unintentional no-op >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jul 30 04:10:10 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Rich Lowe >Release: CURRENT >Organization: >Environment: >Description: Fixing a bug in another system, using an ixgbe driver derived from yours, I've happened upon the fact that IXGBE_LE32_TO_CPUS appears to be a no-op.
On FreeBSD, it's defined to be le32dec(), which is a pure function, however the uses in ixgbe_common.c are as if it were side-effecting its argument: 3964 /* Pull in the rest of the buffer (bi is where we left off)*/ 3965 for (; bi <= dword_len; bi++) { 3966 buffer[bi] = IXGBE_READ_REG_ARRAY(hw, IXGBE_FLEX_MNG, bi); 3967 IXGBE_LE32_TO_CPUS(&buffer[bi]); 3968 } >How-To-Repeat: Read through ixgbe_common.c and ixgbe_osdep.h. I'm unsure if this causes practical problems (I don't have a big-endian system with this board). >Fix: Guessing suggests that: buffer[bi] = IXGBE_LE32_TO_CPUS(buffer[bi]); (there are two instances). Is what was intended. >Release-Note: >Audit-Trail: >Unformatted: _______________________________________________ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"