[Differential] D49156: Fix a logic error in ixgbe_read_mailbox_vf()

"kevlo (Kevin Lo)" <[email protected]>
Newsgroups gmane.os.freebsd.devel.net
Message-ID <[email protected]>
kevlo created this revision.
kevlo added a reviewer: kbowling.
Owners added a reviewer: O11: Intel Networking group.
Herald added subscribers: ae, imp.
kevlo requested review of this revision.

REVISION SUMMARY
  Fix logic error introduced in the commit 
  7234c3099947d202702e98d844ecd2d649c834d2 <https://reviews.freebsd.org/rG7234c3099947d202702e98d844ecd2d649c834d2>

REPOSITORY
  rG FreeBSD src repository

REVISION DETAIL
  https://reviews.freebsd.org/D49156

AFFECTED FILES
  sys/dev/ixgbe/ixgbe_mbx.c

CHANGE DETAILS

diff --git a/sys/dev/ixgbe/ixgbe_mbx.c b/sys/dev/ixgbe/ixgbe_mbx.c
--- a/sys/dev/ixgbe/ixgbe_mbx.c
+++ b/sys/dev/ixgbe/ixgbe_mbx.c
@@ -297,7 +297,7 @@
 	u32 vf_mailbox = IXGBE_READ_REG(hw, IXGBE_VFMAILBOX);
 
 	vf_mailbox |= hw->mbx.vf_mailbox;
-	hw->mbx.vf_mailbox |= vf_mailbox % IXGBE_VFMAILBOX_R2C_BITS;
+	hw->mbx.vf_mailbox |= vf_mailbox & IXGBE_VFMAILBOX_R2C_BITS;
 
 	return vf_mailbox;
 }



EMAIL PREFERENCES
  https://reviews.freebsd.org/settings/panel/emailpreferences/

To: kevlo, kbowling, O11 Intel Networking group
Cc: imp, ae, freebsd-net-list, erj, pstef, krzysztof.galazka_intel.com
D49156.151619.patch (text/x-patch, 398 B)
diff --git a/sys/dev/ixgbe/ixgbe_mbx.c b/sys/dev/ixgbe/ixgbe_mbx.c
--- a/sys/dev/ixgbe/ixgbe_mbx.c
+++ b/sys/dev/ixgbe/ixgbe_mbx.c
@@ -297,7 +297,7 @@
 	u32 vf_mailbox = IXGBE_READ_REG(hw, IXGBE_VFMAILBOX);
 
 	vf_mailbox |= hw->mbx.vf_mailbox;
-	hw->mbx.vf_mailbox |= vf_mailbox % IXGBE_VFMAILBOX_R2C_BITS;
+	hw->mbx.vf_mailbox |= vf_mailbox & IXGBE_VFMAILBOX_R2C_BITS;
 
 	return vf_mailbox;
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.