Commit 5c595791 authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files
Tony Nguyen says:

====================
40GbE Intel Wired LAN Driver Updates 2021-10-29

This series contains updates to i40e, ice, igb, and ixgbevf drivers.

Yang Li simplifies return statements of bool values for i40e and ice.

Jan Kundrát corrects problems with I2C bit-banging for igb.

Colin Ian King removes unneeded variable initialization for ixgbevf.
====================

Link: https://lore.kernel.org/r/20211029164641.2714265-1-anthony.l.nguyen@intel.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents ba064e4c 1b9abade
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -226,7 +226,7 @@ bool i40e_alloc_rx_buffers_zc(struct i40e_ring *rx_ring, u16 count)
	rx_desc->wb.qword1.status_error_len = 0;
	i40e_release_rx_desc(rx_ring, ntu);

	return count == nb_buffs ? true : false;
	return count == nb_buffs;
}

/**
+1 −1
Original line number Diff line number Diff line
@@ -399,7 +399,7 @@ bool ice_alloc_rx_bufs_zc(struct ice_rx_ring *rx_ring, u16 count)
	rx_desc->wb.status_error0 = 0;
	ice_release_rx_desc(rx_ring, ntu);

	return count == nb_buffs ? true : false;
	return count == nb_buffs;
}

/**
+15 −8
Original line number Diff line number Diff line
@@ -577,16 +577,15 @@ static void igb_set_i2c_data(void *data, int state)
	struct e1000_hw *hw = &adapter->hw;
	s32 i2cctl = rd32(E1000_I2CPARAMS);

	if (state)
		i2cctl |= E1000_I2C_DATA_OUT;
	else
	if (state) {
		i2cctl |= E1000_I2C_DATA_OUT | E1000_I2C_DATA_OE_N;
	} else {
		i2cctl &= ~E1000_I2C_DATA_OE_N;
		i2cctl &= ~E1000_I2C_DATA_OUT;
	}

	i2cctl &= ~E1000_I2C_DATA_OE_N;
	i2cctl |= E1000_I2C_CLK_OE_N;
	wr32(E1000_I2CPARAMS, i2cctl);
	wrfl();

}

/**
@@ -603,8 +602,7 @@ static void igb_set_i2c_clk(void *data, int state)
	s32 i2cctl = rd32(E1000_I2CPARAMS);

	if (state) {
		i2cctl |= E1000_I2C_CLK_OUT;
		i2cctl &= ~E1000_I2C_CLK_OE_N;
		i2cctl |= E1000_I2C_CLK_OUT | E1000_I2C_CLK_OE_N;
	} else {
		i2cctl &= ~E1000_I2C_CLK_OUT;
		i2cctl &= ~E1000_I2C_CLK_OE_N;
@@ -3116,12 +3114,21 @@ static void igb_init_mas(struct igb_adapter *adapter)
 **/
static s32 igb_init_i2c(struct igb_adapter *adapter)
{
	struct e1000_hw *hw = &adapter->hw;
	s32 status = 0;
	s32 i2cctl;

	/* I2C interface supported on i350 devices */
	if (adapter->hw.mac.type != e1000_i350)
		return 0;

	i2cctl = rd32(E1000_I2CPARAMS);
	i2cctl |= E1000_I2CBB_EN
		| E1000_I2C_CLK_OUT | E1000_I2C_CLK_OE_N
		| E1000_I2C_DATA_OUT | E1000_I2C_DATA_OE_N;
	wr32(E1000_I2CPARAMS, i2cctl);
	wrfl();

	/* Initialize the i2c bus which is controlled by the registers.
	 * This bus will use the i2c_algo_bit structure that implements
	 * the protocol through toggling of the 4 bits in the register.
+1 −1
Original line number Diff line number Diff line
@@ -66,9 +66,9 @@ static s32 ixgbevf_reset_hw_vf(struct ixgbe_hw *hw)
{
	struct ixgbe_mbx_info *mbx = &hw->mbx;
	u32 timeout = IXGBE_VF_INIT_TIMEOUT;
	s32 ret_val = IXGBE_ERR_INVALID_MAC_ADDR;
	u32 msgbuf[IXGBE_VF_PERMADDR_MSG_LEN];
	u8 *addr = (u8 *)(&msgbuf[1]);
	s32 ret_val;

	/* Call adapter stop to disable tx/rx and clear interrupts */
	hw->mac.ops.stop_adapter(hw);