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

Commit 9de6a1a6 authored by Jacob Keller's avatar Jacob Keller Committed by Jeff Kirsher
Browse files

fm10k: drop 1588 support



The 1588 support within fm10k does not work correctly with the current
version of the switch management software, and likely never worked
correctly to begin with. Remove support for PTP/1588. Update copyright
year for all these files while we're touching them.

Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
Tested-by: default avatarKrishneil Singh <Krishneil.k.singh@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 1e4c32f3
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
################################################################################
#
# Intel Ethernet Switch Host Interface Driver
# Copyright(c) 2013 - 2015 Intel Corporation.
# Copyright(c) 2013 - 2016 Intel Corporation.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
@@ -30,7 +30,6 @@ obj-$(CONFIG_FM10K) += fm10k.o
fm10k-y := fm10k_main.o \
	   fm10k_common.o \
	   fm10k_pci.o \
	   fm10k_ptp.o \
	   fm10k_netdev.o \
	   fm10k_ethtool.o \
	   fm10k_pf.o \
+1 −33
Original line number Diff line number Diff line
/* Intel Ethernet Switch Host Interface Driver
 * Copyright(c) 2013 - 2015 Intel Corporation.
 * Copyright(c) 2013 - 2016 Intel Corporation.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms and conditions of the GNU General Public License,
@@ -27,9 +27,6 @@
#include <linux/rtnetlink.h>
#include <linux/if_vlan.h>
#include <linux/pci.h>
#include <linux/net_tstamp.h>
#include <linux/clocksource.h>
#include <linux/ptp_clock_kernel.h>

#include "fm10k_pf.h"
#include "fm10k_vf.h"
@@ -342,22 +339,8 @@ struct fm10k_intfc {

#ifdef CONFIG_DEBUG_FS
	struct dentry *dbg_intfc;

#endif /* CONFIG_DEBUG_FS */
	struct ptp_clock_info ptp_caps;
	struct ptp_clock *ptp_clock;

	struct sk_buff_head ts_tx_skb_queue;
	u32 tx_hwtstamp_timeouts;

	struct hwtstamp_config ts_config;
	/* We are unable to actually adjust the clock beyond the frequency
	 * value.  Once the clock is started there is no resetting it.  As
	 * such we maintain a separate offset from the actual hardware clock
	 * to allow for offset adjustment.
	 */
	s64 ptp_adjust;
	rwlock_t systime_lock;
#ifdef CONFIG_DCB
	u8 pfc_en;
#endif
@@ -546,21 +529,6 @@ static inline void fm10k_dbg_init(void) {}
static inline void fm10k_dbg_exit(void) {}
#endif /* CONFIG_DEBUG_FS */

/* Time Stamping */
void fm10k_systime_to_hwtstamp(struct fm10k_intfc *interface,
			       struct skb_shared_hwtstamps *hwtstamp,
			       u64 systime);
void fm10k_ts_tx_enqueue(struct fm10k_intfc *interface, struct sk_buff *skb);
void fm10k_ts_tx_hwtstamp(struct fm10k_intfc *interface, __le16 dglort,
			  u64 systime);
void fm10k_ts_reset(struct fm10k_intfc *interface);
void fm10k_ts_init(struct fm10k_intfc *interface);
void fm10k_ts_tx_subtask(struct fm10k_intfc *interface);
void fm10k_ptp_register(struct fm10k_intfc *interface);
void fm10k_ptp_unregister(struct fm10k_intfc *interface);
int fm10k_get_ts_config(struct net_device *netdev, struct ifreq *ifr);
int fm10k_set_ts_config(struct net_device *netdev, struct ifreq *ifr);

/* DCB */
#ifdef CONFIG_DCB
void fm10k_dcbnl_set_ops(struct net_device *dev);
+1 −29
Original line number Diff line number Diff line
/* Intel Ethernet Switch Host Interface Driver
 * Copyright(c) 2013 - 2015 Intel Corporation.
 * Copyright(c) 2013 - 2016 Intel Corporation.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms and conditions of the GNU General Public License,
@@ -77,8 +77,6 @@ static const struct fm10k_stats fm10k_gstrings_global_stats[] = {
	FM10K_STAT("mac_rules_avail", hw.swapi.mac.avail),

	FM10K_STAT("tx_hang_count", tx_timeout_count),

	FM10K_STAT("tx_hwtstamp_timeouts", tx_hwtstamp_timeouts),
};

static const struct fm10k_stats fm10k_gstrings_pf_stats[] = {
@@ -1140,31 +1138,6 @@ static int fm10k_set_channels(struct net_device *dev,
	return fm10k_setup_tc(dev, netdev_get_num_tc(dev));
}

static int fm10k_get_ts_info(struct net_device *dev,
			     struct ethtool_ts_info *info)
{
	struct fm10k_intfc *interface = netdev_priv(dev);

	info->so_timestamping =
		SOF_TIMESTAMPING_TX_SOFTWARE |
		SOF_TIMESTAMPING_RX_SOFTWARE |
		SOF_TIMESTAMPING_SOFTWARE |
		SOF_TIMESTAMPING_TX_HARDWARE |
		SOF_TIMESTAMPING_RX_HARDWARE |
		SOF_TIMESTAMPING_RAW_HARDWARE;

	if (interface->ptp_clock)
		info->phc_index = ptp_clock_index(interface->ptp_clock);
	else
		info->phc_index = -1;

	info->tx_types = BIT(HWTSTAMP_TX_OFF) | BIT(HWTSTAMP_TX_ON);

	info->rx_filters = BIT(HWTSTAMP_FILTER_NONE) | BIT(HWTSTAMP_FILTER_ALL);

	return 0;
}

static const struct ethtool_ops fm10k_ethtool_ops = {
	.get_strings		= fm10k_get_strings,
	.get_sset_count		= fm10k_get_sset_count,
@@ -1192,7 +1165,6 @@ static const struct ethtool_ops fm10k_ethtool_ops = {
	.set_rxfh		= fm10k_set_rssh,
	.get_channels		= fm10k_get_channels,
	.set_channels		= fm10k_set_channels,
	.get_ts_info            = fm10k_get_ts_info,
};

void fm10k_set_ethtool_ops(struct net_device *dev)
+1 −21
Original line number Diff line number Diff line
/* Intel Ethernet Switch Host Interface Driver
 * Copyright(c) 2013 - 2014 Intel Corporation.
 * Copyright(c) 2013 - 2016 Intel Corporation.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms and conditions of the GNU General Public License,
@@ -424,19 +424,6 @@ static inline void fm10k_rx_hash(struct fm10k_ring *ring,
		     PKT_HASH_TYPE_L4 : PKT_HASH_TYPE_L3);
}

static void fm10k_rx_hwtstamp(struct fm10k_ring *rx_ring,
			      union fm10k_rx_desc *rx_desc,
			      struct sk_buff *skb)
{
	struct fm10k_intfc *interface = rx_ring->q_vector->interface;

	FM10K_CB(skb)->tstamp = rx_desc->q.timestamp;

	if (unlikely(interface->flags & FM10K_FLAG_RX_TS_ENABLED))
		fm10k_systime_to_hwtstamp(interface, skb_hwtstamps(skb),
					  le64_to_cpu(rx_desc->q.timestamp));
}

static void fm10k_type_trans(struct fm10k_ring *rx_ring,
			     union fm10k_rx_desc __maybe_unused *rx_desc,
			     struct sk_buff *skb)
@@ -486,8 +473,6 @@ static unsigned int fm10k_process_skb_fields(struct fm10k_ring *rx_ring,

	fm10k_rx_checksum(rx_ring, rx_desc, skb);

	fm10k_rx_hwtstamp(rx_ring, rx_desc, skb);

	FM10K_CB(skb)->fi.w.vlan = rx_desc->w.vlan;

	skb_record_rx_queue(skb, rx_ring->queue_index);
@@ -912,11 +897,6 @@ static u8 fm10k_tx_desc_flags(struct sk_buff *skb, u32 tx_flags)
	/* set type for advanced descriptor with frame checksum insertion */
	u32 desc_flags = 0;

	/* set timestamping bits */
	if (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) &&
	    likely(skb_shinfo(skb)->tx_flags & SKBTX_IN_PROGRESS))
		desc_flags |= FM10K_TXD_FLAG_TIME;

	/* set checksum offload bits */
	desc_flags |= FM10K_SET_FLAG(tx_flags, FM10K_TX_FLAGS_CSUM,
				     FM10K_TXD_FLAG_CSUM);
+1 −21
Original line number Diff line number Diff line
/* Intel Ethernet Switch Host Interface Driver
 * Copyright(c) 2013 - 2015 Intel Corporation.
 * Copyright(c) 2013 - 2016 Intel Corporation.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms and conditions of the GNU General Public License,
@@ -243,9 +243,6 @@ void fm10k_clean_all_tx_rings(struct fm10k_intfc *interface)

	for (i = 0; i < interface->num_tx_queues; i++)
		fm10k_clean_tx_ring(interface->tx_ring[i]);

	/* remove any stale timestamp buffers and free them */
	skb_queue_purge(&interface->ts_tx_skb_queue);
}

/**
@@ -660,10 +657,6 @@ static netdev_tx_t fm10k_xmit_frame(struct sk_buff *skb, struct net_device *dev)
		__skb_put(skb, pad_len);
	}

	/* prepare packet for hardware time stamping */
	if (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP))
		fm10k_ts_tx_enqueue(interface, skb);

	if (r_idx >= interface->num_tx_queues)
		r_idx %= interface->num_tx_queues;

@@ -1213,18 +1206,6 @@ static int __fm10k_setup_tc(struct net_device *dev, u32 handle, __be16 proto,
	return fm10k_setup_tc(dev, tc->tc);
}

static int fm10k_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)
{
	switch (cmd) {
	case SIOCGHWTSTAMP:
		return fm10k_get_ts_config(netdev, ifr);
	case SIOCSHWTSTAMP:
		return fm10k_set_ts_config(netdev, ifr);
	default:
		return -EOPNOTSUPP;
	}
}

static void fm10k_assign_l2_accel(struct fm10k_intfc *interface,
				  struct fm10k_l2_accel *l2_accel)
{
@@ -1402,7 +1383,6 @@ static const struct net_device_ops fm10k_netdev_ops = {
	.ndo_get_vf_config	= fm10k_ndo_get_vf_config,
	.ndo_add_vxlan_port	= fm10k_add_vxlan_port,
	.ndo_del_vxlan_port	= fm10k_del_vxlan_port,
	.ndo_do_ioctl		= fm10k_ioctl,
	.ndo_dfwd_add_station	= fm10k_dfwd_add_station,
	.ndo_dfwd_del_station	= fm10k_dfwd_del_station,
#ifdef CONFIG_NET_POLL_CONTROLLER
Loading