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

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


Jeff Kirsher says:

====================
Intel Wired LAN Driver Updates

This series contains updates to i40e and now i40evf.

Most notable is Jacob's patch to add PTP support to i40e.

Mitch cleans up additional memcpy's and use struct assignment instead.
Then fixes long lines to appease checkpatch.pl.  Mitch then provides
a fix to keep us from spamming the log with confusing errors.  If you
use ip to change the MAC address of a VF while the VF driver is loaded,
closing the VF interface or unloading the VF driver will cause the VF
driver to remove the MAC filter for its original (now invalid) MAC
address.

Jesse cleans up macros which are no longer needed or used.

I (Jeff) cleanup function header comments to ensure Doxygen/kdoc works
correctly to generate documentation without warnings.

Anjali fixes a bug where ethtool set-channels would return failure when
configuring only one Rx queue.  Then fixes a bug where the driver was
erroneously exiting the driver unload path if one part of the unload
failed.

Shannon fixes if the IPV6EXADD but is set in the Rx descriptor status,
there was an optional extension header with an alternate IP address
detected and the hardware checksum was not handling the alternate IP
address correctly.  Then adjusts the ITR max and min values to match
the hardware max value and recommended min value.  Shannon makes sure
to clear the PXE mode after the adminq is initialized.

v2:
 - fix patch 14 "i40e: enable PTP" to address Richard Cochran's spelling
   catch and Ben Hutchings Kconfig, SIOCGHWTSTAMP and sizeof() suggestions
 - added Paul Gortmaker's i40evf fix patch
v3:
 - fix patch 14 "i40e: enable PTP" to address Ben Hutchings concerns about
   a race with PTP init and cleanup and i40e_get_ts_info().
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 45593c2b 7ed3f5f0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -243,6 +243,7 @@ config IXGBEVF

config I40E
	tristate "Intel(R) Ethernet Controller XL710 Family support"
	select PTP_1588_CLOCK
	depends on PCI
	---help---
	  This driver supports Intel(R) Ethernet Controller XL710 Family of
+1 −0
Original line number Diff line number Diff line
@@ -40,4 +40,5 @@ i40e-objs := i40e_main.o \
	i40e_debugfs.o	\
	i40e_diag.o	\
	i40e_txrx.o	\
	i40e_ptp.o	\
	i40e_virtchnl_pf.o
+27 −1
Original line number Diff line number Diff line
@@ -50,6 +50,9 @@
#include <net/ip6_checksum.h>
#include <linux/ethtool.h>
#include <linux/if_vlan.h>
#include <linux/clocksource.h>
#include <linux/net_tstamp.h>
#include <linux/ptp_clock_kernel.h>
#include "i40e_type.h"
#include "i40e_prototype.h"
#include "i40e_virtchnl.h"
@@ -88,7 +91,7 @@

/* 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_LO 0x1
#define I40E_CURRENT_NVM_VERSION_LO 0x30


/* magic for getting defines into strings */
@@ -242,6 +245,7 @@ struct i40e_pf {
#define I40E_FLAG_DCB_ENABLED                  (u64)(1 << 20)
#define I40E_FLAG_FDIR_ENABLED                 (u64)(1 << 21)
#define I40E_FLAG_FDIR_ATR_ENABLED             (u64)(1 << 22)
#define I40E_FLAG_PTP                          (u64)(1 << 25)
#define I40E_FLAG_MFP_ENABLED                  (u64)(1 << 26)
#ifdef CONFIG_I40E_VXLAN
#define I40E_FLAG_VXLAN_FILTER_SYNC            (u64)(1 << 27)
@@ -302,6 +306,20 @@ struct i40e_pf {
	u32	fcoe_hmc_filt_num;
	u32	fcoe_hmc_cntx_num;
	struct i40e_filter_control_settings filter_settings;

	struct ptp_clock *ptp_clock;
	struct ptp_clock_info ptp_caps;
	struct sk_buff *ptp_tx_skb;
	struct work_struct ptp_tx_work;
	struct hwtstamp_config tstamp_config;
	unsigned long ptp_tx_start;
	unsigned long last_rx_ptp_check;
	spinlock_t tmreg_lock; /* Used to protect the device time registers. */
	u64 ptp_base_adj;
	u32 tx_hwtstamp_timeouts;
	u32 rx_hwtstamp_cleared;
	bool ptp_tx;
	bool ptp_rx;
};

struct i40e_mac_filter {
@@ -566,4 +584,12 @@ struct i40e_mac_filter *i40e_find_mac(struct i40e_vsi *vsi, u8 *macaddr,
				      bool is_vf, bool is_netdev);
void i40e_vlan_stripping_enable(struct i40e_vsi *vsi);

void i40e_ptp_rx_hang(struct i40e_vsi *vsi);
void i40e_ptp_tx_hwtstamp(struct i40e_pf *pf);
void i40e_ptp_rx_hwtstamp(struct i40e_pf *pf, struct sk_buff *skb, u8 index);
void i40e_ptp_set_increment(struct i40e_pf *pf);
int i40e_ptp_set_ts_config(struct i40e_pf *pf, struct ifreq *ifr);
int i40e_ptp_get_ts_config(struct i40e_pf *pf, struct ifreq *ifr);
void i40e_ptp_init(struct i40e_pf *pf);
void i40e_ptp_stop(struct i40e_pf *pf);
#endif /* _I40E_H_ */
+14 −14
Original line number Diff line number Diff line
@@ -626,7 +626,7 @@ i40e_status i40e_shutdown_adminq(struct i40e_hw *hw)

/**
 *  i40e_clean_asq - cleans Admin send queue
 *  @asq: pointer to the adminq send ring
 *  @hw: pointer to the hardware structure
 *
 *  returns the number of free desc
 **/
@@ -922,7 +922,7 @@ i40e_status i40e_clean_arq_element(struct i40e_hw *hw,
			   "AQRX: Event received with error 0x%X.\n",
			   hw->aq.arq_last_status);
	} else {
		memcpy(&e->desc, desc, sizeof(struct i40e_aq_desc));
		e->desc = *desc;
		datalen = le16_to_cpu(desc->datalen);
		e->msg_size = min(datalen, e->msg_size);
		if (e->msg_buf != NULL && (e->msg_size != 0))
+13 −10
Original line number Diff line number Diff line
@@ -74,7 +74,8 @@ static i40e_status i40e_set_mac_type(struct i40e_hw *hw)
/**
 * i40e_debug_aq
 * @hw: debug mask related to admin queue
 * @cap: pointer to adminq command descriptor
 * @mask: debug mask
 * @desc: pointer to admin queue descriptor
 * @buffer: pointer to command buffer
 *
 * Dumps debug log about adminq command with descriptor contents.
@@ -599,8 +600,7 @@ i40e_status i40e_aq_get_link_info(struct i40e_hw *hw,
		goto aq_get_link_info_exit;

	/* save off old link status information */
	memcpy(&hw->phy.link_info_old, hw_link_info,
	       sizeof(struct i40e_link_status));
	hw->phy.link_info_old = *hw_link_info;

	/* update link status */
	hw_link_info->phy_type = (enum i40e_aq_phy_type)resp->phy_type;
@@ -630,7 +630,7 @@ i40e_status i40e_aq_get_link_info(struct i40e_hw *hw,
/**
 * i40e_aq_add_vsi
 * @hw: pointer to the hw struct
 * @vsi: pointer to a vsi context struct
 * @vsi_ctx: pointer to a vsi context struct
 * @cmd_details: pointer to command details structure or NULL
 *
 * Add a VSI context to the hardware.
@@ -682,7 +682,8 @@ i40e_status i40e_aq_add_vsi(struct i40e_hw *hw,
 * @cmd_details: pointer to command details structure or NULL
 **/
i40e_status i40e_aq_set_vsi_unicast_promiscuous(struct i40e_hw *hw,
				u16 seid, bool set, struct i40e_asq_cmd_details *cmd_details)
				u16 seid, bool set,
				struct i40e_asq_cmd_details *cmd_details)
{
	struct i40e_aq_desc desc;
	struct i40e_aqc_set_vsi_promiscuous_modes *cmd =
@@ -776,7 +777,7 @@ i40e_status i40e_aq_set_vsi_broadcast(struct i40e_hw *hw,
/**
 * i40e_get_vsi_params - get VSI configuration info
 * @hw: pointer to the hw struct
 * @vsi: pointer to a vsi context struct
 * @vsi_ctx: pointer to a vsi context struct
 * @cmd_details: pointer to command details structure or NULL
 **/
i40e_status i40e_aq_get_vsi_params(struct i40e_hw *hw,
@@ -818,7 +819,7 @@ i40e_status i40e_aq_get_vsi_params(struct i40e_hw *hw,
/**
 * i40e_aq_update_vsi_params
 * @hw: pointer to the hw struct
 * @vsi: pointer to a vsi context struct
 * @vsi_ctx: pointer to a vsi context struct
 * @cmd_details: pointer to command details structure or NULL
 *
 * Update a VSI context.
@@ -921,7 +922,6 @@ i40e_status i40e_aq_get_firmware_version(struct i40e_hw *hw,
/**
 * i40e_aq_send_driver_version
 * @hw: pointer to the hw struct
 * @event: driver event: driver ok, start or stop
 * @dv: driver's major, minor version
 * @cmd_details: pointer to command details structure or NULL
 *
@@ -1039,10 +1039,10 @@ i40e_status i40e_aq_add_veb(struct i40e_hw *hw, u16 uplink_seid,
 * @hw: pointer to the hw struct
 * @veb_seid: the SEID of the VEB to query
 * @switch_id: the uplink switch id
 * @floating_veb: set to true if the VEB is floating
 * @floating: set to true if the VEB is floating
 * @statistic_index: index of the stats counter block for this VEB
 * @vebs_used: number of VEB's used by function
 * @vebs_unallocated: total VEB's not reserved by any function
 * @vebs_free: total VEB's not reserved by any function
 * @cmd_details: pointer to command details structure or NULL
 *
 * This retrieves the parameters for a particular VEB, specified by
@@ -1179,6 +1179,8 @@ i40e_status i40e_aq_remove_macvlan(struct i40e_hw *hw, u16 seid,
 * i40e_aq_send_msg_to_vf
 * @hw: pointer to the hardware structure
 * @vfid: vf id to send msg
 * @v_opcode: opcodes for VF-PF communication
 * @v_retval: return error code
 * @msg: pointer to the msg buffer
 * @msglen: msg length
 * @cmd_details: pointer to command details
@@ -1723,6 +1725,7 @@ i40e_status i40e_aq_start_lldp(struct i40e_hw *hw,
 * @udp_port: the UDP port to add
 * @header_len: length of the tunneling header length in DWords
 * @protocol_index: protocol index type
 * @filter_index: pointer to filter index
 * @cmd_details: pointer to command details structure or NULL
 **/
i40e_status i40e_aq_add_udp_tunnel(struct i40e_hw *hw,
Loading