[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]>
This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rG5c7087c349fc: ixgbe: Fix a logic error in ixgbe_read_mailbox_vf() (authored by kevlo).

REPOSITORY
  rG FreeBSD src repository

CHANGES SINCE LAST UPDATE
  https://reviews.freebsd.org/D49156?vs=151619&id=151664

CHANGES SINCE LAST ACTION
  https://reviews.freebsd.org/D49156/new/

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.151664.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.