Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a39221ce authored by Sabrina Dubroca's avatar Sabrina Dubroca Committed by Jeff Kirsher
Browse files

ixgbe: fix masking of bits read from IXGBE_VXLANCTRL register



In ixgbe_clear_udp_tunnel_port(), we read the IXGBE_VXLANCTRL register
and then try to mask some bits out of the value, using the logical
instead of bitwise and operator.

Fixes: a21d0822 ("ixgbe: add support for geneve Rx offload")
Signed-off-by: default avatarSabrina Dubroca <sd@queasysnail.net>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent e0f06bba
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -4881,7 +4881,7 @@ static void ixgbe_clear_udp_tunnel_port(struct ixgbe_adapter *adapter, u32 mask)
				IXGBE_FLAG_GENEVE_OFFLOAD_CAPABLE)))
				IXGBE_FLAG_GENEVE_OFFLOAD_CAPABLE)))
		return;
		return;


	vxlanctrl = IXGBE_READ_REG(hw, IXGBE_VXLANCTRL) && ~mask;
	vxlanctrl = IXGBE_READ_REG(hw, IXGBE_VXLANCTRL) & ~mask;
	IXGBE_WRITE_REG(hw, IXGBE_VXLANCTRL, vxlanctrl);
	IXGBE_WRITE_REG(hw, IXGBE_VXLANCTRL, vxlanctrl);


	if (mask & IXGBE_VXLANCTRL_VXLAN_UDPPORT_MASK)
	if (mask & IXGBE_VXLANCTRL_VXLAN_UDPPORT_MASK)