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

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


Jeff Kirsher says:

====================
Intel Wired LAN Driver Updates 2016-08-16

This series contains fixes to e1000e, igb, ixgbe and i40e.

Kshitiz Gupta provides a fix for igb to resolve the PHY delay compensation
math in several functions.

Jarod Wilson provides a fix for e1000e which had to broken up into 2
patches, first is prepares the driver for expanding the list of NICs
that have occasional ~10 hour clock jumps when being used for PTP.
Second patch actually fixes i218 silicon which has been experiencing
the clock jumps while using PTP.

Alex provides 2 patches for ixgbe now that he is back at Intel.  First
fixes setting VLNCTRL.VFE bit, which was left unchanged in earlier patches
which resulted in disabling VLAN filtering for all the VFs.  Second
corrects the support for disabling the VLAN tag filtering via the
feature bit.

Lastly, David fixes i40e which was causing a kernel panic when
non-contiguous traffic classes or traffic classes not starting with TC0,
were configured on a link partner switch.  To fix this, changed the
logic when determining the total number of TCs enabled.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 647f28c7 fbfe12c6
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -2032,7 +2032,8 @@ const struct e1000_info e1000_82574_info = {
				  | FLAG2_DISABLE_ASPM_L0S
				  | FLAG2_DISABLE_ASPM_L0S
				  | FLAG2_DISABLE_ASPM_L1
				  | FLAG2_DISABLE_ASPM_L1
				  | FLAG2_NO_DISABLE_RX
				  | FLAG2_NO_DISABLE_RX
				  | FLAG2_DMA_BURST,
				  | FLAG2_DMA_BURST
				  | FLAG2_CHECK_SYSTIM_OVERFLOW,
	.pba			= 32,
	.pba			= 32,
	.max_hw_frame_size	= DEFAULT_JUMBO,
	.max_hw_frame_size	= DEFAULT_JUMBO,
	.get_variants		= e1000_get_variants_82571,
	.get_variants		= e1000_get_variants_82571,
@@ -2053,7 +2054,8 @@ const struct e1000_info e1000_82583_info = {
				  | FLAG_HAS_CTRLEXT_ON_LOAD,
				  | FLAG_HAS_CTRLEXT_ON_LOAD,
	.flags2			= FLAG2_DISABLE_ASPM_L0S
	.flags2			= FLAG2_DISABLE_ASPM_L0S
				  | FLAG2_DISABLE_ASPM_L1
				  | FLAG2_DISABLE_ASPM_L1
				  | FLAG2_NO_DISABLE_RX,
				  | FLAG2_NO_DISABLE_RX
				  | FLAG2_CHECK_SYSTIM_OVERFLOW,
	.pba			= 32,
	.pba			= 32,
	.max_hw_frame_size	= DEFAULT_JUMBO,
	.max_hw_frame_size	= DEFAULT_JUMBO,
	.get_variants		= e1000_get_variants_82571,
	.get_variants		= e1000_get_variants_82571,
+1 −0
Original line number Original line Diff line number Diff line
@@ -452,6 +452,7 @@ s32 e1000e_get_base_timinca(struct e1000_adapter *adapter, u32 *timinca);
#define FLAG2_PCIM2PCI_ARBITER_WA         BIT(11)
#define FLAG2_PCIM2PCI_ARBITER_WA         BIT(11)
#define FLAG2_DFLT_CRC_STRIPPING          BIT(12)
#define FLAG2_DFLT_CRC_STRIPPING          BIT(12)
#define FLAG2_CHECK_RX_HWTSTAMP           BIT(13)
#define FLAG2_CHECK_RX_HWTSTAMP           BIT(13)
#define FLAG2_CHECK_SYSTIM_OVERFLOW       BIT(14)


#define E1000_RX_DESC_PS(R, i)	    \
#define E1000_RX_DESC_PS(R, i)	    \
	(&(((union e1000_rx_desc_packet_split *)((R).desc))[i]))
	(&(((union e1000_rx_desc_packet_split *)((R).desc))[i]))
+2 −1
Original line number Original line Diff line number Diff line
@@ -5885,7 +5885,8 @@ const struct e1000_info e1000_pch_lpt_info = {
				  | FLAG_HAS_JUMBO_FRAMES
				  | FLAG_HAS_JUMBO_FRAMES
				  | FLAG_APME_IN_WUC,
				  | FLAG_APME_IN_WUC,
	.flags2			= FLAG2_HAS_PHY_STATS
	.flags2			= FLAG2_HAS_PHY_STATS
				  | FLAG2_HAS_EEE,
				  | FLAG2_HAS_EEE
				  | FLAG2_CHECK_SYSTIM_OVERFLOW,
	.pba			= 26,
	.pba			= 26,
	.max_hw_frame_size	= 9022,
	.max_hw_frame_size	= 9022,
	.get_variants		= e1000_get_variants_ich8lan,
	.get_variants		= e1000_get_variants_ich8lan,
+39 −27
Original line number Original line Diff line number Diff line
@@ -4302,6 +4302,42 @@ void e1000e_reinit_locked(struct e1000_adapter *adapter)
	clear_bit(__E1000_RESETTING, &adapter->state);
	clear_bit(__E1000_RESETTING, &adapter->state);
}
}


/**
 * e1000e_sanitize_systim - sanitize raw cycle counter reads
 * @hw: pointer to the HW structure
 * @systim: cycle_t value read, sanitized and returned
 *
 * Errata for 82574/82583 possible bad bits read from SYSTIMH/L:
 * check to see that the time is incrementing at a reasonable
 * rate and is a multiple of incvalue.
 **/
static cycle_t e1000e_sanitize_systim(struct e1000_hw *hw, cycle_t systim)
{
	u64 time_delta, rem, temp;
	cycle_t systim_next;
	u32 incvalue;
	int i;

	incvalue = er32(TIMINCA) & E1000_TIMINCA_INCVALUE_MASK;
	for (i = 0; i < E1000_MAX_82574_SYSTIM_REREADS; i++) {
		/* latch SYSTIMH on read of SYSTIML */
		systim_next = (cycle_t)er32(SYSTIML);
		systim_next |= (cycle_t)er32(SYSTIMH) << 32;

		time_delta = systim_next - systim;
		temp = time_delta;
		/* VMWare users have seen incvalue of zero, don't div / 0 */
		rem = incvalue ? do_div(temp, incvalue) : (time_delta != 0);

		systim = systim_next;

		if ((time_delta < E1000_82574_SYSTIM_EPSILON) && (rem == 0))
			break;
	}

	return systim;
}

/**
/**
 * e1000e_cyclecounter_read - read raw cycle counter (used by time counter)
 * e1000e_cyclecounter_read - read raw cycle counter (used by time counter)
 * @cc: cyclecounter structure
 * @cc: cyclecounter structure
@@ -4312,7 +4348,7 @@ static cycle_t e1000e_cyclecounter_read(const struct cyclecounter *cc)
						     cc);
						     cc);
	struct e1000_hw *hw = &adapter->hw;
	struct e1000_hw *hw = &adapter->hw;
	u32 systimel, systimeh;
	u32 systimel, systimeh;
	cycle_t systim, systim_next;
	cycle_t systim;
	/* SYSTIMH latching upon SYSTIML read does not work well.
	/* SYSTIMH latching upon SYSTIML read does not work well.
	 * This means that if SYSTIML overflows after we read it but before
	 * This means that if SYSTIML overflows after we read it but before
	 * we read SYSTIMH, the value of SYSTIMH has been incremented and we
	 * we read SYSTIMH, the value of SYSTIMH has been incremented and we
@@ -4335,33 +4371,9 @@ static cycle_t e1000e_cyclecounter_read(const struct cyclecounter *cc)
	systim = (cycle_t)systimel;
	systim = (cycle_t)systimel;
	systim |= (cycle_t)systimeh << 32;
	systim |= (cycle_t)systimeh << 32;


	if ((hw->mac.type == e1000_82574) || (hw->mac.type == e1000_82583)) {
	if (adapter->flags2 & FLAG2_CHECK_SYSTIM_OVERFLOW)
		u64 time_delta, rem, temp;
		systim = e1000e_sanitize_systim(hw, systim);
		u32 incvalue;
		int i;


		/* errata for 82574/82583 possible bad bits read from SYSTIMH/L
		 * check to see that the time is incrementing at a reasonable
		 * rate and is a multiple of incvalue
		 */
		incvalue = er32(TIMINCA) & E1000_TIMINCA_INCVALUE_MASK;
		for (i = 0; i < E1000_MAX_82574_SYSTIM_REREADS; i++) {
			/* latch SYSTIMH on read of SYSTIML */
			systim_next = (cycle_t)er32(SYSTIML);
			systim_next |= (cycle_t)er32(SYSTIMH) << 32;

			time_delta = systim_next - systim;
			temp = time_delta;
			/* VMWare users have seen incvalue of zero, don't div / 0 */
			rem = incvalue ? do_div(temp, incvalue) : (time_delta != 0);

			systim = systim_next;

			if ((time_delta < E1000_82574_SYSTIM_EPSILON) &&
			    (rem == 0))
				break;
		}
	}
	return systim;
	return systim;
}
}


+25 −10
Original line number Original line Diff line number Diff line
@@ -4554,23 +4554,38 @@ static u8 i40e_get_iscsi_tc_map(struct i40e_pf *pf)
 **/
 **/
static u8 i40e_dcb_get_num_tc(struct i40e_dcbx_config *dcbcfg)
static u8 i40e_dcb_get_num_tc(struct i40e_dcbx_config *dcbcfg)
{
{
	int i, tc_unused = 0;
	u8 num_tc = 0;
	u8 num_tc = 0;
	int i;
	u8 ret = 0;


	/* Scan the ETS Config Priority Table to find
	/* Scan the ETS Config Priority Table to find
	 * traffic class enabled for a given priority
	 * traffic class enabled for a given priority
	 * and use the traffic class index to get the
	 * and create a bitmask of enabled TCs
	 * number of traffic classes enabled
	 */
	 */
	for (i = 0; i < I40E_MAX_USER_PRIORITY; i++) {
	for (i = 0; i < I40E_MAX_USER_PRIORITY; i++)
		if (dcbcfg->etscfg.prioritytable[i] > num_tc)
		num_tc |= BIT(dcbcfg->etscfg.prioritytable[i]);
			num_tc = dcbcfg->etscfg.prioritytable[i];
	}


	/* Traffic class index starts from zero so
	/* Now scan the bitmask to check for
	 * increment to return the actual count
	 * contiguous TCs starting with TC0
	 */
	 */
	return num_tc + 1;
	for (i = 0; i < I40E_MAX_TRAFFIC_CLASS; i++) {
		if (num_tc & BIT(i)) {
			if (!tc_unused) {
				ret++;
			} else {
				pr_err("Non-contiguous TC - Disabling DCB\n");
				return 1;
			}
		} else {
			tc_unused = 1;
		}
	}

	/* There is always at least TC0 */
	if (!ret)
		ret = 1;

	return ret;
}
}


/**
/**
Loading