Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Feb 2025 14:31:10 +0000
From:      "kevlo (Kevin Lo)" <phabric-noreply@FreeBSD.org>
To:        Phabricator <phabric-noreply@FreeBSD.org>
Cc:        freebsd-net@freebsd.org
Subject:   [Differential] D49156: Fix a logic error in ixgbe_read_mailbox_vf()
Message-ID:  <40c3fd7c24c3ac2c71453944bb1d3421@localhost.localdomain>
In-Reply-To: <differential-rev-PHID-DREV-ja6gkbasd6v4f4bpf67k-req@reviews.freebsd.org>
References:  <differential-rev-PHID-DREV-ja6gkbasd6v4f4bpf67k-req@reviews.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
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

[-- Attachment #2 --]
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;
 }


Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?40c3fd7c24c3ac2c71453944bb1d3421>