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

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


Jeff Kirsher says:

====================
Intel Wired LAN Driver Updates 2015-10-13

This series contains updates to i40e, i40evf, ixgbe and fm10k.

Carolyn cleans up ndo_bridge_getlink() by flagging a parameter as
__always_unused, since it is never used.  Adds a member to the nvm_info
struct to store OEM version info to be output either by OID or ethtool.

Neerav cleans up a remaining bit shift to use BIT() macro.

Mitch fixes the i40evf driver to properly handle calls to its
ndo_set_mac_address() method.  It did not properly check to see if the
override would be allowed by the PF driver, and it never removed the old
address from its filter list.  Cleaned up the use of
i40e_enable_vf_mappings() in i40e_alloc_vfs(), since it is just redundant
since we already call it by i40e_reset_vf().  Fixed a possible panic
in some circumstances where the firmware may fail to allocate a VSI for
a VF by checking the return value from i40e_alloc_vf_res() and don't
try to configure the device further if it failed.

Greg fixes the parsing of CEE App TLVs so the caller does not have to
consider whether the App came from a CEE or IEEE DCBx negotiation.

Shannon moves the device ids into a standalone file due to the desire
to write user-land drivers (and other requests) without needing the rest
of the include files.

Catherine adds the ability to save the module information from
get_phy_capabilities() to be used to determine which speeds the module
supports.  Also cleaned up the PHY structure by removing unused members
and add the ability to store the PHY capabilities reported by the
firmware.

Emil modifies ixgbe to ensure that flow control packets initiated by the
VF are dropped and reported as spoofed.

Jacob cleans up the fm10k driver to avoid buffer overflow by using
sprintf(), so convert to using snprintf().  Also fixed the use of an
enum as a boolean, so check for the actual value of NETREG_UNINITIALIZED
in case it ever changes from the current value of zero.

v2: Dropped patch 11 of the original series, which added functions that
    were never used.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 4b418bff b4a5127b
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -176,7 +176,7 @@ void fm10k_dbg_q_vector_init(struct fm10k_q_vector *q_vector)
		return;
		return;


	/* Generate a folder for each q_vector */
	/* Generate a folder for each q_vector */
	sprintf(name, "q_vector.%03d", q_vector->v_idx);
	snprintf(name, sizeof(name), "q_vector.%03d", q_vector->v_idx);


	q_vector->dbg_q_vector = debugfs_create_dir(name, interface->dbg_intfc);
	q_vector->dbg_q_vector = debugfs_create_dir(name, interface->dbg_intfc);
	if (!q_vector->dbg_q_vector)
	if (!q_vector->dbg_q_vector)
@@ -186,7 +186,7 @@ void fm10k_dbg_q_vector_init(struct fm10k_q_vector *q_vector)
	for (i = 0; i < q_vector->tx.count; i++) {
	for (i = 0; i < q_vector->tx.count; i++) {
		struct fm10k_ring *ring = &q_vector->tx.ring[i];
		struct fm10k_ring *ring = &q_vector->tx.ring[i];


		sprintf(name, "tx_ring.%03d", ring->queue_index);
		snprintf(name, sizeof(name), "tx_ring.%03d", ring->queue_index);


		debugfs_create_file(name, 0600,
		debugfs_create_file(name, 0600,
				    q_vector->dbg_q_vector, ring,
				    q_vector->dbg_q_vector, ring,
@@ -197,7 +197,7 @@ void fm10k_dbg_q_vector_init(struct fm10k_q_vector *q_vector)
	for (i = 0; i < q_vector->rx.count; i++) {
	for (i = 0; i < q_vector->rx.count; i++) {
		struct fm10k_ring *ring = &q_vector->rx.ring[i];
		struct fm10k_ring *ring = &q_vector->rx.ring[i];


		sprintf(name, "rx_ring.%03d", ring->queue_index);
		snprintf(name, sizeof(name), "rx_ring.%03d", ring->queue_index);


		debugfs_create_file(name, 0600,
		debugfs_create_file(name, 0600,
				    q_vector->dbg_q_vector, ring,
				    q_vector->dbg_q_vector, ring,
+4 −4
Original line number Original line Diff line number Diff line
@@ -206,13 +206,13 @@ static void fm10k_get_stat_strings(struct net_device *dev, u8 *data)
	}
	}


	for (i = 0; i < interface->hw.mac.max_queues; i++) {
	for (i = 0; i < interface->hw.mac.max_queues; i++) {
		sprintf(p, "tx_queue_%u_packets", i);
		snprintf(p, ETH_GSTRING_LEN, "tx_queue_%u_packets", i);
		p += ETH_GSTRING_LEN;
		p += ETH_GSTRING_LEN;
		sprintf(p, "tx_queue_%u_bytes", i);
		snprintf(p, ETH_GSTRING_LEN, "tx_queue_%u_bytes", i);
		p += ETH_GSTRING_LEN;
		p += ETH_GSTRING_LEN;
		sprintf(p, "rx_queue_%u_packets", i);
		snprintf(p, ETH_GSTRING_LEN, "rx_queue_%u_packets", i);
		p += ETH_GSTRING_LEN;
		p += ETH_GSTRING_LEN;
		sprintf(p, "rx_queue_%u_bytes", i);
		snprintf(p, ETH_GSTRING_LEN, "rx_queue_%u_bytes", i);
		p += ETH_GSTRING_LEN;
		p += ETH_GSTRING_LEN;
	}
	}
}
}
+1 −1
Original line number Original line Diff line number Diff line
@@ -1905,7 +1905,7 @@ static void fm10k_init_reta(struct fm10k_intfc *interface)
	u32 reta, base;
	u32 reta, base;


	/* If the netdev is initialized we have to maintain table if possible */
	/* If the netdev is initialized we have to maintain table if possible */
	if (interface->netdev->reg_state) {
	if (interface->netdev->reg_state != NETREG_UNINITIALIZED) {
		for (i = FM10K_RETA_SIZE; i--;) {
		for (i = FM10K_RETA_SIZE; i--;) {
			reta = interface->reta[i];
			reta = interface->reta[i];
			if ((((reta << 24) >> 24) < rss_i) &&
			if ((((reta << 24) >> 24) < rss_i) &&
+6 −4
Original line number Original line Diff line number Diff line
@@ -107,6 +107,8 @@
#define I40E_NVM_VERSION_LO_MASK   (0xff << I40E_NVM_VERSION_LO_SHIFT)
#define I40E_NVM_VERSION_LO_MASK   (0xff << I40E_NVM_VERSION_LO_SHIFT)
#define I40E_NVM_VERSION_HI_SHIFT  12
#define I40E_NVM_VERSION_HI_SHIFT  12
#define I40E_NVM_VERSION_HI_MASK   (0xf << I40E_NVM_VERSION_HI_SHIFT)
#define I40E_NVM_VERSION_HI_MASK   (0xf << I40E_NVM_VERSION_HI_SHIFT)
#define I40E_OEM_VER_BUILD_MASK    0xff00
#define I40E_OEM_VER_PATCH_MASK    0xff


/* The values in here are decimal coded as hex as is the case in the NVM map*/
/* The values in here are decimal coded as hex as is the case in the NVM map*/
#define I40E_CURRENT_NVM_VERSION_HI 0x2
#define I40E_CURRENT_NVM_VERSION_HI 0x2
@@ -587,14 +589,14 @@ static inline char *i40e_fw_version_str(struct i40e_hw *hw)
	static char buf[32];
	static char buf[32];


	snprintf(buf, sizeof(buf),
	snprintf(buf, sizeof(buf),
		 "f%d.%d.%05d a%d.%d n%x.%02x e%x",
		 "%x.%02x 0x%x %d.%d.%d",
		 hw->aq.fw_maj_ver, hw->aq.fw_min_ver, hw->aq.fw_build,
		 hw->aq.api_maj_ver, hw->aq.api_min_ver,
		 (hw->nvm.version & I40E_NVM_VERSION_HI_MASK) >>
		 (hw->nvm.version & I40E_NVM_VERSION_HI_MASK) >>
			I40E_NVM_VERSION_HI_SHIFT,
			I40E_NVM_VERSION_HI_SHIFT,
		 (hw->nvm.version & I40E_NVM_VERSION_LO_MASK) >>
		 (hw->nvm.version & I40E_NVM_VERSION_LO_MASK) >>
			I40E_NVM_VERSION_LO_SHIFT,
			I40E_NVM_VERSION_LO_SHIFT,
		 (hw->nvm.eetrack & 0xffffff));
		 hw->nvm.eetrack, (hw->nvm.oem_ver >> 24),
		 (hw->nvm.oem_ver & I40E_OEM_VER_BUILD_MASK) >> 8,
		 hw->nvm.oem_ver & I40E_OEM_VER_PATCH_MASK);


	return buf;
	return buf;
}
}
+8 −1
Original line number Original line Diff line number Diff line
@@ -553,8 +553,9 @@ static i40e_status i40e_shutdown_arq(struct i40e_hw *hw)
 **/
 **/
i40e_status i40e_init_adminq(struct i40e_hw *hw)
i40e_status i40e_init_adminq(struct i40e_hw *hw)
{
{
	i40e_status ret_code;
	u16 cfg_ptr, oem_hi, oem_lo;
	u16 eetrack_lo, eetrack_hi;
	u16 eetrack_lo, eetrack_hi;
	i40e_status ret_code;
	int retry = 0;
	int retry = 0;


	/* verify input for valid configuration */
	/* verify input for valid configuration */
@@ -613,6 +614,12 @@ i40e_status i40e_init_adminq(struct i40e_hw *hw)
	i40e_read_nvm_word(hw, I40E_SR_NVM_EETRACK_LO, &eetrack_lo);
	i40e_read_nvm_word(hw, I40E_SR_NVM_EETRACK_LO, &eetrack_lo);
	i40e_read_nvm_word(hw, I40E_SR_NVM_EETRACK_HI, &eetrack_hi);
	i40e_read_nvm_word(hw, I40E_SR_NVM_EETRACK_HI, &eetrack_hi);
	hw->nvm.eetrack = (eetrack_hi << 16) | eetrack_lo;
	hw->nvm.eetrack = (eetrack_hi << 16) | eetrack_lo;
	i40e_read_nvm_word(hw, I40E_SR_BOOT_CONFIG_PTR, &cfg_ptr);
	i40e_read_nvm_word(hw, (cfg_ptr + I40E_NVM_OEM_VER_OFF),
			   &oem_hi);
	i40e_read_nvm_word(hw, (cfg_ptr + (I40E_NVM_OEM_VER_OFF + 1)),
			   &oem_lo);
	hw->nvm.oem_ver = ((u32)oem_hi << 16) | oem_lo;


	if (hw->aq.api_maj_ver > I40E_FW_API_VERSION_MAJOR) {
	if (hw->aq.api_maj_ver > I40E_FW_API_VERSION_MAJOR) {
		ret_code = I40E_ERR_FIRMWARE_API_VERSION;
		ret_code = I40E_ERR_FIRMWARE_API_VERSION;
Loading