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

Commit 4236e2a1 authored by David S. Miller's avatar David S. Miller
Browse files


Jeff Kirsher says:

====================
Intel Wired LAN Driver Updates 2015-09-30

This series contains updates to i40e and i40evf only.

Vasily Averin provides a couple of rtnl lock/unlock fixes for both i40e
and i40evf.

Shannon provides several updates and fixes, first fixes up a type clash
in i40e_aq_rc_to_posix(), where the error codes are signed values, so we
need to treat them as such.  Then fixes up a padding issue where an
extra byte is added in i40e_aqc_get_cee_dcb_cfg_v1_resp to directly
acknowledge the padding.  Updated i40e to keep debugfs register read
and writes from accessing outside of the io-remapped space.  Added
support and device id for another 20 GbE device.

Jesse fixes the transmit hand workaround code for ARM that was causing
Tx hangs to still occur occasionally when there really was no hang.  Then
fixed the receive dropped counter to show up in netstat interface.
Refactor the interrupt enable function since it was always making the
caller add the base_vector from the VSI struct which is already passed
to the function.  Fix kbuild warnings found in 0day build infrastructure
by adding a harmless cast to a dev_info(), also fix 32 bit build
warnings found by sparse.

Greg fixed a configuration error that results if a port VLAN is set
for a VF before the VF driver is loaded, so that when the VF driver is
loaded the port VLAN is ignored.

Mitch fixes the use of QOS field consistently in
i40e_ndo_set_vf_port_vlan().  Modified the init timing of the driver
to increase stability on load/unload and SR-IOV enable/disable cycles.

Anjali updates i40e to not collect VEB stats if they are disabled in the
hardware for performance reasons.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 28117b08 9c70d7ce
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -71,7 +71,6 @@
#define I40E_MAX_VEB          16

#define I40E_MAX_NUM_DESCRIPTORS      4096
#define I40E_MAX_REGISTER     0x800000
#define I40E_MAX_CSR_SPACE (4 * 1024 * 1024 - 64 * 1024)
#define I40E_DEFAULT_NUM_DESCRIPTORS  512
#define I40E_REQ_DESCRIPTOR_MULTIPLE  32
@@ -326,6 +325,7 @@ struct i40e_pf {
#define I40E_FLAG_OUTER_UDP_CSUM_CAPABLE	BIT_ULL(33)
#define I40E_FLAG_128_QP_RSS_CAPABLE		BIT_ULL(34)
#define I40E_FLAG_WB_ON_ITR_CAPABLE		BIT_ULL(35)
#define I40E_FLAG_VEB_STATS_ENABLED		BIT_ULL(37)
#define I40E_FLAG_MULTIPLE_TCP_UDP_RSS_PCTYPE	BIT_ULL(38)
#define I40E_FLAG_VEB_MODE_ENABLED		BIT_ULL(40)

@@ -408,6 +408,8 @@ struct i40e_pf {
	/* These are only valid in NPAR modes */
	u32 npar_max_bw;
	u32 npar_min_bw;

	u32 ioremap_len;
};

struct i40e_mac_filter {
+6 −3
Original line number Diff line number Diff line
@@ -109,9 +109,10 @@ struct i40e_adminq_info {

/**
 * i40e_aq_rc_to_posix - convert errors to user-land codes
 * aq_rc: AdminQ error code to convert
 * aq_ret: AdminQ handler error code can override aq_rc
 * aq_rc: AdminQ firmware error code to convert
 **/
static inline int i40e_aq_rc_to_posix(u32 aq_ret, u16 aq_rc)
static inline int i40e_aq_rc_to_posix(int aq_ret, int aq_rc)
{
	int aq_to_posix[] = {
		0,           /* I40E_AQ_RC_OK */
@@ -143,8 +144,10 @@ static inline int i40e_aq_rc_to_posix(u32 aq_ret, u16 aq_rc)
	if (aq_ret == I40E_ERR_ADMIN_QUEUE_TIMEOUT)
		return -EAGAIN;

	if (aq_rc >= ARRAY_SIZE(aq_to_posix))
	if (aq_rc >= (sizeof(aq_to_posix) / sizeof((aq_to_posix)[0])) ||
	    aq_rc < 0)
		return -ERANGE;

	return aq_to_posix[aq_rc];
}

+11 −2
Original line number Diff line number Diff line
@@ -2074,6 +2074,15 @@ I40E_CHECK_CMD_LENGTH(i40e_aqc_lldp_start);
#define I40E_AQC_CEE_ISCSI_STATUS_MASK	(0x7 << I40E_AQC_CEE_ISCSI_STATUS_SHIFT)
#define I40E_AQC_CEE_FIP_STATUS_SHIFT	0x10
#define I40E_AQC_CEE_FIP_STATUS_MASK	(0x7 << I40E_AQC_CEE_FIP_STATUS_SHIFT)

/* struct i40e_aqc_get_cee_dcb_cfg_v1_resp was originally defined with
 * word boundary layout issues, which the Linux compilers silently deal
 * with by adding padding, making the actual struct larger than designed.
 * However, the FW compiler for the NIC is less lenient and complains
 * about the struct.  Hence, the struct defined here has an extra byte in
 * fields reserved3 and reserved4 to directly acknowledge that padding,
 * and the new length is used in the length check macro.
 */
struct i40e_aqc_get_cee_dcb_cfg_v1_resp {
	u8	reserved1;
	u8	oper_num_tc;
@@ -2081,9 +2090,9 @@ struct i40e_aqc_get_cee_dcb_cfg_v1_resp {
	u8	reserved2;
	u8	oper_tc_bw[8];
	u8	oper_pfc_en;
	u8	reserved3;
	u8	reserved3[2];
	__le16	oper_app_prio;
	u8	reserved4;
	u8	reserved4[2];
	__le16	tlv_status;
};

+1 −5
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@ static i40e_status i40e_set_mac_type(struct i40e_hw *hw)
		case I40E_DEV_ID_QSFP_C:
		case I40E_DEV_ID_10G_BASE_T:
		case I40E_DEV_ID_20G_KR2:
		case I40E_DEV_ID_20G_KR2_A:
			hw->mac.type = I40E_MAC_XL710;
			break;
		case I40E_DEV_ID_SFP_X722:
@@ -441,9 +442,6 @@ static i40e_status i40e_aq_get_set_rss_lut(struct i40e_hw *hw,
					I40E_AQC_SET_RSS_LUT_TABLE_TYPE_SHIFT) &
					I40E_AQC_SET_RSS_LUT_TABLE_TYPE_MASK));

	cmd_resp->addr_high = cpu_to_le32(high_16_bits((u64)lut));
	cmd_resp->addr_low = cpu_to_le32(lower_32_bits((u64)lut));

	status = i40e_asq_send_command(hw, &desc, lut, lut_size, NULL);

	return status;
@@ -518,8 +516,6 @@ static i40e_status i40e_aq_get_set_rss_key(struct i40e_hw *hw,
					  I40E_AQC_SET_RSS_KEY_VSI_ID_SHIFT) &
					  I40E_AQC_SET_RSS_KEY_VSI_ID_MASK));
	cmd_resp->vsi_id |= cpu_to_le16((u16)I40E_AQC_SET_RSS_KEY_VSI_VALID);
	cmd_resp->addr_high = cpu_to_le32(high_16_bits((u64)key));
	cmd_resp->addr_low = cpu_to_le32(lower_32_bits((u64)key));

	status = i40e_asq_send_command(hw, &desc, key, key_size, NULL);

+6 −6
Original line number Diff line number Diff line
@@ -1495,9 +1495,9 @@ static ssize_t i40e_dbg_command_write(struct file *filp,
		}

		/* check the range on address */
		if (address >= I40E_MAX_REGISTER) {
			dev_info(&pf->pdev->dev, "read reg address 0x%08x too large\n",
				 address);
		if (address > (pf->ioremap_len - sizeof(u32))) {
			dev_info(&pf->pdev->dev, "read reg address 0x%08x too large, max=0x%08lx\n",
				 address, (unsigned long int)(pf->ioremap_len - sizeof(u32)));
			goto command_write_done;
		}

@@ -1514,9 +1514,9 @@ static ssize_t i40e_dbg_command_write(struct file *filp,
		}

		/* check the range on address */
		if (address >= I40E_MAX_REGISTER) {
			dev_info(&pf->pdev->dev, "write reg address 0x%08x too large\n",
				 address);
		if (address > (pf->ioremap_len - sizeof(u32))) {
			dev_info(&pf->pdev->dev, "write reg address 0x%08x too large, max=0x%08lx\n",
				 address, (unsigned long int)(pf->ioremap_len - sizeof(u32)));
			goto command_write_done;
		}
		wr32(&pf->hw, address, value);
Loading