提交 5c595791 编写于 作者: J Jakub Kicinski

Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue

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.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
...@@ -226,7 +226,7 @@ bool i40e_alloc_rx_buffers_zc(struct i40e_ring *rx_ring, u16 count) ...@@ -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; rx_desc->wb.qword1.status_error_len = 0;
i40e_release_rx_desc(rx_ring, ntu); i40e_release_rx_desc(rx_ring, ntu);
return count == nb_buffs ? true : false; return count == nb_buffs;
} }
/** /**
......
...@@ -399,7 +399,7 @@ bool ice_alloc_rx_bufs_zc(struct ice_rx_ring *rx_ring, u16 count) ...@@ -399,7 +399,7 @@ bool ice_alloc_rx_bufs_zc(struct ice_rx_ring *rx_ring, u16 count)
rx_desc->wb.status_error0 = 0; rx_desc->wb.status_error0 = 0;
ice_release_rx_desc(rx_ring, ntu); ice_release_rx_desc(rx_ring, ntu);
return count == nb_buffs ? true : false; return count == nb_buffs;
} }
/** /**
......
...@@ -577,16 +577,15 @@ static void igb_set_i2c_data(void *data, int state) ...@@ -577,16 +577,15 @@ static void igb_set_i2c_data(void *data, int state)
struct e1000_hw *hw = &adapter->hw; struct e1000_hw *hw = &adapter->hw;
s32 i2cctl = rd32(E1000_I2CPARAMS); s32 i2cctl = rd32(E1000_I2CPARAMS);
if (state) if (state) {
i2cctl |= E1000_I2C_DATA_OUT; i2cctl |= E1000_I2C_DATA_OUT | E1000_I2C_DATA_OE_N;
else } else {
i2cctl &= ~E1000_I2C_DATA_OE_N;
i2cctl &= ~E1000_I2C_DATA_OUT; i2cctl &= ~E1000_I2C_DATA_OUT;
}
i2cctl &= ~E1000_I2C_DATA_OE_N;
i2cctl |= E1000_I2C_CLK_OE_N;
wr32(E1000_I2CPARAMS, i2cctl); wr32(E1000_I2CPARAMS, i2cctl);
wrfl(); wrfl();
} }
/** /**
...@@ -603,8 +602,7 @@ static void igb_set_i2c_clk(void *data, int state) ...@@ -603,8 +602,7 @@ static void igb_set_i2c_clk(void *data, int state)
s32 i2cctl = rd32(E1000_I2CPARAMS); s32 i2cctl = rd32(E1000_I2CPARAMS);
if (state) { if (state) {
i2cctl |= E1000_I2C_CLK_OUT; i2cctl |= E1000_I2C_CLK_OUT | E1000_I2C_CLK_OE_N;
i2cctl &= ~E1000_I2C_CLK_OE_N;
} else { } else {
i2cctl &= ~E1000_I2C_CLK_OUT; i2cctl &= ~E1000_I2C_CLK_OUT;
i2cctl &= ~E1000_I2C_CLK_OE_N; i2cctl &= ~E1000_I2C_CLK_OE_N;
...@@ -3116,12 +3114,21 @@ static void igb_init_mas(struct igb_adapter *adapter) ...@@ -3116,12 +3114,21 @@ static void igb_init_mas(struct igb_adapter *adapter)
**/ **/
static s32 igb_init_i2c(struct igb_adapter *adapter) static s32 igb_init_i2c(struct igb_adapter *adapter)
{ {
struct e1000_hw *hw = &adapter->hw;
s32 status = 0; s32 status = 0;
s32 i2cctl;
/* I2C interface supported on i350 devices */ /* I2C interface supported on i350 devices */
if (adapter->hw.mac.type != e1000_i350) if (adapter->hw.mac.type != e1000_i350)
return 0; 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. /* Initialize the i2c bus which is controlled by the registers.
* This bus will use the i2c_algo_bit structure that implements * This bus will use the i2c_algo_bit structure that implements
* the protocol through toggling of the 4 bits in the register. * the protocol through toggling of the 4 bits in the register.
......
...@@ -66,9 +66,9 @@ static s32 ixgbevf_reset_hw_vf(struct ixgbe_hw *hw) ...@@ -66,9 +66,9 @@ static s32 ixgbevf_reset_hw_vf(struct ixgbe_hw *hw)
{ {
struct ixgbe_mbx_info *mbx = &hw->mbx; struct ixgbe_mbx_info *mbx = &hw->mbx;
u32 timeout = IXGBE_VF_INIT_TIMEOUT; u32 timeout = IXGBE_VF_INIT_TIMEOUT;
s32 ret_val = IXGBE_ERR_INVALID_MAC_ADDR;
u32 msgbuf[IXGBE_VF_PERMADDR_MSG_LEN]; u32 msgbuf[IXGBE_VF_PERMADDR_MSG_LEN];
u8 *addr = (u8 *)(&msgbuf[1]); u8 *addr = (u8 *)(&msgbuf[1]);
s32 ret_val;
/* Call adapter stop to disable tx/rx and clear interrupts */ /* Call adapter stop to disable tx/rx and clear interrupts */
hw->mac.ops.stop_adapter(hw); hw->mac.ops.stop_adapter(hw);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册