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


Jeff Kirsher says:

====================
Intel Wired LAN Driver Updates 2018-11-07

This series contains updates to almost all of the Intel wired LAN
drivers.

Lance Roy replaces a spin lock with lockdep_assert_held() for igbvf
driver in move toward trying to remove spin_is_locked().

Colin Ian King fixes a potential null pointer dereference by adding a
check in ixgbe.  Also fixed the igc driver by properly assigning the
return error code of a function call, so that we can properly check it.

Shannon Nelson updates the ixgbe driver to not block IPsec offload when
in VEPA mode, in VEB mode, IPsec offload is still blocked because the
device drops packets into a black hole.

Jake adds support for software timestamping for packets sent over
ixgbevf.  Also modifies i40e, iavf, igb, igc, and ixgbe to delay calling
skb_tx_timestamp() to the latest point possible, which is just prior to
notifying the hardware of the new Tx packet.

Todd adds the new WoL filter flag so that we properly report that we do
not support this new feature.

YueHaibing from Huawei fixes the igc driver by cleaning up variables
that are not "really" used.

Dan Carpenter cleans up igc whitespace issues.

Miroslav Lichvar fixes e1000e for potential underflow issue in the
timecounter, so modify the driver to use timecounter_cyc2time() to allow
non-monotonic SYSTIM readings.

Sasha provides additional igc cleanups based on community feedback.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents be08989c 920664a8
Loading
Loading
Loading
Loading
+10 −3
Original line number Original line Diff line number Diff line
@@ -173,10 +173,14 @@ static int e1000e_phc_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)
	struct e1000_adapter *adapter = container_of(ptp, struct e1000_adapter,
	struct e1000_adapter *adapter = container_of(ptp, struct e1000_adapter,
						     ptp_clock_info);
						     ptp_clock_info);
	unsigned long flags;
	unsigned long flags;
	u64 ns;
	u64 cycles, ns;


	spin_lock_irqsave(&adapter->systim_lock, flags);
	spin_lock_irqsave(&adapter->systim_lock, flags);
	ns = timecounter_read(&adapter->tc);

	/* Use timecounter_cyc2time() to allow non-monotonic SYSTIM readings */
	cycles = adapter->cc.read(&adapter->cc);
	ns = timecounter_cyc2time(&adapter->tc, cycles);

	spin_unlock_irqrestore(&adapter->systim_lock, flags);
	spin_unlock_irqrestore(&adapter->systim_lock, flags);


	*ts = ns_to_timespec64(ns);
	*ts = ns_to_timespec64(ns);
@@ -232,9 +236,12 @@ static void e1000e_systim_overflow_work(struct work_struct *work)
						     systim_overflow_work.work);
						     systim_overflow_work.work);
	struct e1000_hw *hw = &adapter->hw;
	struct e1000_hw *hw = &adapter->hw;
	struct timespec64 ts;
	struct timespec64 ts;
	u64 ns;


	adapter->ptp_clock_info.gettime64(&adapter->ptp_clock_info, &ts);
	/* Update the timecounter */
	ns = timecounter_read(&adapter->tc);


	ts = ns_to_timespec64(ns);
	e_dbg("SYSTIM overflow check at %lld.%09lu\n",
	e_dbg("SYSTIM overflow check at %lld.%09lu\n",
	      (long long) ts.tv_sec, ts.tv_nsec);
	      (long long) ts.tv_sec, ts.tv_nsec);


+2 −1
Original line number Original line Diff line number Diff line
@@ -2377,7 +2377,8 @@ static int i40e_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
		return -EOPNOTSUPP;
		return -EOPNOTSUPP;


	/* only magic packet is supported */
	/* only magic packet is supported */
	if (wol->wolopts && (wol->wolopts != WAKE_MAGIC))
	if (wol->wolopts && (wol->wolopts != WAKE_MAGIC)
			  | (wol->wolopts != WAKE_FILTER))
		return -EOPNOTSUPP;
		return -EOPNOTSUPP;


	/* is this a new value? */
	/* is this a new value? */
+2 −2
Original line number Original line Diff line number Diff line
@@ -3473,6 +3473,8 @@ static inline int i40e_tx_map(struct i40e_ring *tx_ring, struct sk_buff *skb,
	tx_desc->cmd_type_offset_bsz =
	tx_desc->cmd_type_offset_bsz =
			build_ctob(td_cmd, td_offset, size, td_tag);
			build_ctob(td_cmd, td_offset, size, td_tag);


	skb_tx_timestamp(skb);

	/* Force memory writes to complete before letting h/w know there
	/* Force memory writes to complete before letting h/w know there
	 * are new descriptors to fetch.
	 * are new descriptors to fetch.
	 *
	 *
@@ -3652,8 +3654,6 @@ static netdev_tx_t i40e_xmit_frame_ring(struct sk_buff *skb,
	if (tsyn)
	if (tsyn)
		tx_flags |= I40E_TX_FLAGS_TSYN;
		tx_flags |= I40E_TX_FLAGS_TSYN;


	skb_tx_timestamp(skb);

	/* always enable CRC insertion offload */
	/* always enable CRC insertion offload */
	td_cmd |= I40E_TX_DESC_CMD_ICRC;
	td_cmd |= I40E_TX_DESC_CMD_ICRC;


+2 −2
Original line number Original line Diff line number Diff line
@@ -2343,6 +2343,8 @@ static inline void iavf_tx_map(struct iavf_ring *tx_ring, struct sk_buff *skb,
	tx_desc->cmd_type_offset_bsz =
	tx_desc->cmd_type_offset_bsz =
			build_ctob(td_cmd, td_offset, size, td_tag);
			build_ctob(td_cmd, td_offset, size, td_tag);


	skb_tx_timestamp(skb);

	/* Force memory writes to complete before letting h/w know there
	/* Force memory writes to complete before letting h/w know there
	 * are new descriptors to fetch.
	 * are new descriptors to fetch.
	 *
	 *
@@ -2461,8 +2463,6 @@ static netdev_tx_t iavf_xmit_frame_ring(struct sk_buff *skb,
	if (tso < 0)
	if (tso < 0)
		goto out_drop;
		goto out_drop;


	skb_tx_timestamp(skb);

	/* always enable CRC insertion offload */
	/* always enable CRC insertion offload */
	td_cmd |= IAVF_TX_DESC_CMD_ICRC;
	td_cmd |= IAVF_TX_DESC_CMD_ICRC;


+1 −1
Original line number Original line Diff line number Diff line
@@ -2113,7 +2113,7 @@ static int igb_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
{
{
	struct igb_adapter *adapter = netdev_priv(netdev);
	struct igb_adapter *adapter = netdev_priv(netdev);


	if (wol->wolopts & (WAKE_ARP | WAKE_MAGICSECURE))
	if (wol->wolopts & (WAKE_ARP | WAKE_MAGICSECURE | WAKE_FILTER))
		return -EOPNOTSUPP;
		return -EOPNOTSUPP;


	if (!(adapter->flags & IGB_FLAG_WOL_SUPPORTED))
	if (!(adapter->flags & IGB_FLAG_WOL_SUPPORTED))
Loading