Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/605078/?format=api
{ "id": 605078, "url": "http://patchwork.ozlabs.org/api/patches/605078/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1459552659-22959-2-git-send-email-jacob.e.keller@intel.com/", "project": { "id": 46, "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api", "name": "Intel Wired Ethernet development", "link_name": "intel-wired-lan", "list_id": "intel-wired-lan.osuosl.org", "list_email": "intel-wired-lan@osuosl.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<1459552659-22959-2-git-send-email-jacob.e.keller@intel.com>", "list_archive_url": null, "date": "2016-04-01T23:17:31", "name": "[v1,1/9] fm10k: drop 1588 support", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "378995b1cb1651babeec72667b0a28aacec4f517", "submitter": { "id": 9784, "url": "http://patchwork.ozlabs.org/api/people/9784/?format=api", "name": "Jacob Keller", "email": "jacob.e.keller@intel.com" }, "delegate": { "id": 68, "url": "http://patchwork.ozlabs.org/api/users/68/?format=api", "username": "jtkirshe", "first_name": "Jeff", "last_name": "Kirsher", "email": "jeffrey.t.kirsher@intel.com" }, "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1459552659-22959-2-git-send-email-jacob.e.keller@intel.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/605078/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/605078/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@lists.osuosl.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Received": [ "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ozlabs.org (Postfix) with ESMTP id 3qcHNm0qjCz9ssP\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 2 Apr 2016 10:18:00 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 6BE0091F5F;\n\tFri, 1 Apr 2016 23:17:59 +0000 (UTC)", "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id AA2ve-quDfdl; Fri, 1 Apr 2016 23:17:51 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 162B291F83;\n\tFri, 1 Apr 2016 23:17:49 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 44B181C11DF\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 1 Apr 2016 23:17:45 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 3F7F095584\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 1 Apr 2016 23:17:45 +0000 (UTC)", "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id fnaqH35p54oh for <intel-wired-lan@lists.osuosl.org>;\n\tFri, 1 Apr 2016 23:17:42 +0000 (UTC)", "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 8E847956C1\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 1 Apr 2016 23:17:42 +0000 (UTC)", "from fmsmga002.fm.intel.com ([10.253.24.26])\n\tby fmsmga104.fm.intel.com with ESMTP; 01 Apr 2016 16:17:41 -0700", "from jekeller-desk.amr.corp.intel.com (HELO\n\tjekeller-desk.jekeller.internal) ([134.134.3.173])\n\tby fmsmga002.fm.intel.com with ESMTP; 01 Apr 2016 16:17:41 -0700" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.24,428,1455004800\"; d=\"scan'208\";a=\"949958931\"", "From": "Jacob Keller <jacob.e.keller@intel.com>", "To": "Intel Wired LAN <intel-wired-lan@lists.osuosl.org>", "Date": "Fri, 1 Apr 2016 16:17:31 -0700", "Message-Id": "<1459552659-22959-2-git-send-email-jacob.e.keller@intel.com>", "X-Mailer": "git-send-email 2.8.0.rc1.177.g5628860", "In-Reply-To": "<1459552659-22959-1-git-send-email-jacob.e.keller@intel.com>", "References": "<1459552659-22959-1-git-send-email-jacob.e.keller@intel.com>", "Subject": "[Intel-wired-lan] [PATCH v1 1/9] fm10k: drop 1588 support", "X-BeenThere": "intel-wired-lan@lists.osuosl.org", "X-Mailman-Version": "2.1.18-1", "Precedence": "list", "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.lists.osuosl.org>", "List-Unsubscribe": "<http://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@lists.osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@lists.osuosl.org?subject=help>", "List-Subscribe": "<http://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "intel-wired-lan-bounces@lists.osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@lists.osuosl.org>" }, "content": "The 1588 support within fm10k does not work correctly with the current\nversion of the switch management software, and likely never worked\ncorrectly to begin with. Remove support for PTP/1588. Update copyright\nyear for all these files while we're touching them.\n\nSigned-off-by: Jacob Keller <jacob.e.keller@intel.com>\n---\n drivers/net/ethernet/intel/fm10k/Makefile | 3 +-\n drivers/net/ethernet/intel/fm10k/fm10k.h | 34 +-\n drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 30 +-\n drivers/net/ethernet/intel/fm10k/fm10k_main.c | 22 +-\n drivers/net/ethernet/intel/fm10k/fm10k_netdev.c | 22 +-\n drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 110 +-----\n drivers/net/ethernet/intel/fm10k/fm10k_pf.c | 101 +----\n drivers/net/ethernet/intel/fm10k/fm10k_pf.h | 17 +-\n drivers/net/ethernet/intel/fm10k/fm10k_ptp.c | 462 -----------------------\n drivers/net/ethernet/intel/fm10k/fm10k_type.h | 17 +-\n drivers/net/ethernet/intel/fm10k/fm10k_vf.c | 57 +--\n drivers/net/ethernet/intel/fm10k/fm10k_vf.h | 12 +-\n 12 files changed, 11 insertions(+), 876 deletions(-)\n delete mode 100644 drivers/net/ethernet/intel/fm10k/fm10k_ptp.c", "diff": "diff --git a/drivers/net/ethernet/intel/fm10k/Makefile b/drivers/net/ethernet/intel/fm10k/Makefile\nindex b006ff66d028..2aeaa39d9a25 100644\n--- a/drivers/net/ethernet/intel/fm10k/Makefile\n+++ b/drivers/net/ethernet/intel/fm10k/Makefile\n@@ -1,7 +1,7 @@\n ################################################################################\n #\n # Intel Ethernet Switch Host Interface Driver\n-# Copyright(c) 2013 - 2015 Intel Corporation.\n+# Copyright(c) 2013 - 2016 Intel Corporation.\n #\n # This program is free software; you can redistribute it and/or modify it\n # under the terms and conditions of the GNU General Public License,\n@@ -30,7 +30,6 @@ obj-$(CONFIG_FM10K) += fm10k.o\n fm10k-y := fm10k_main.o \\\n \t fm10k_common.o \\\n \t fm10k_pci.o \\\n-\t fm10k_ptp.o \\\n \t fm10k_netdev.o \\\n \t fm10k_ethtool.o \\\n \t fm10k_pf.o \\\ndiff --git a/drivers/net/ethernet/intel/fm10k/fm10k.h b/drivers/net/ethernet/intel/fm10k/fm10k.h\nindex 9c7fafef7cf6..c21fa8699fc4 100644\n--- a/drivers/net/ethernet/intel/fm10k/fm10k.h\n+++ b/drivers/net/ethernet/intel/fm10k/fm10k.h\n@@ -1,5 +1,5 @@\n /* Intel Ethernet Switch Host Interface Driver\n- * Copyright(c) 2013 - 2015 Intel Corporation.\n+ * Copyright(c) 2013 - 2016 Intel Corporation.\n *\n * This program is free software; you can redistribute it and/or modify it\n * under the terms and conditions of the GNU General Public License,\n@@ -27,9 +27,6 @@\n #include <linux/rtnetlink.h>\n #include <linux/if_vlan.h>\n #include <linux/pci.h>\n-#include <linux/net_tstamp.h>\n-#include <linux/clocksource.h>\n-#include <linux/ptp_clock_kernel.h>\n \n #include \"fm10k_pf.h\"\n #include \"fm10k_vf.h\"\n@@ -342,22 +339,8 @@ struct fm10k_intfc {\n \n #ifdef CONFIG_DEBUG_FS\n \tstruct dentry *dbg_intfc;\n-\n #endif /* CONFIG_DEBUG_FS */\n-\tstruct ptp_clock_info ptp_caps;\n-\tstruct ptp_clock *ptp_clock;\n \n-\tstruct sk_buff_head ts_tx_skb_queue;\n-\tu32 tx_hwtstamp_timeouts;\n-\n-\tstruct hwtstamp_config ts_config;\n-\t/* We are unable to actually adjust the clock beyond the frequency\n-\t * value. Once the clock is started there is no resetting it. As\n-\t * such we maintain a separate offset from the actual hardware clock\n-\t * to allow for offset adjustment.\n-\t */\n-\ts64 ptp_adjust;\n-\trwlock_t systime_lock;\n #ifdef CONFIG_DCB\n \tu8 pfc_en;\n #endif\n@@ -546,21 +529,6 @@ static inline void fm10k_dbg_init(void) {}\n static inline void fm10k_dbg_exit(void) {}\n #endif /* CONFIG_DEBUG_FS */\n \n-/* Time Stamping */\n-void fm10k_systime_to_hwtstamp(struct fm10k_intfc *interface,\n-\t\t\t struct skb_shared_hwtstamps *hwtstamp,\n-\t\t\t u64 systime);\n-void fm10k_ts_tx_enqueue(struct fm10k_intfc *interface, struct sk_buff *skb);\n-void fm10k_ts_tx_hwtstamp(struct fm10k_intfc *interface, __le16 dglort,\n-\t\t\t u64 systime);\n-void fm10k_ts_reset(struct fm10k_intfc *interface);\n-void fm10k_ts_init(struct fm10k_intfc *interface);\n-void fm10k_ts_tx_subtask(struct fm10k_intfc *interface);\n-void fm10k_ptp_register(struct fm10k_intfc *interface);\n-void fm10k_ptp_unregister(struct fm10k_intfc *interface);\n-int fm10k_get_ts_config(struct net_device *netdev, struct ifreq *ifr);\n-int fm10k_set_ts_config(struct net_device *netdev, struct ifreq *ifr);\n-\n /* DCB */\n #ifdef CONFIG_DCB\n void fm10k_dcbnl_set_ops(struct net_device *dev);\ndiff --git a/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c b/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c\nindex bcb5c20e02e5..7c36ef0a671a 100644\n--- a/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c\n+++ b/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c\n@@ -1,5 +1,5 @@\n /* Intel Ethernet Switch Host Interface Driver\n- * Copyright(c) 2013 - 2015 Intel Corporation.\n+ * Copyright(c) 2013 - 2016 Intel Corporation.\n *\n * This program is free software; you can redistribute it and/or modify it\n * under the terms and conditions of the GNU General Public License,\n@@ -77,8 +77,6 @@ static const struct fm10k_stats fm10k_gstrings_global_stats[] = {\n \tFM10K_STAT(\"mac_rules_avail\", hw.swapi.mac.avail),\n \n \tFM10K_STAT(\"tx_hang_count\", tx_timeout_count),\n-\n-\tFM10K_STAT(\"tx_hwtstamp_timeouts\", tx_hwtstamp_timeouts),\n };\n \n static const struct fm10k_stats fm10k_gstrings_pf_stats[] = {\n@@ -1144,31 +1142,6 @@ static int fm10k_set_channels(struct net_device *dev,\n \treturn fm10k_setup_tc(dev, netdev_get_num_tc(dev));\n }\n \n-static int fm10k_get_ts_info(struct net_device *dev,\n-\t\t\t struct ethtool_ts_info *info)\n-{\n-\tstruct fm10k_intfc *interface = netdev_priv(dev);\n-\n-\tinfo->so_timestamping =\n-\t\tSOF_TIMESTAMPING_TX_SOFTWARE |\n-\t\tSOF_TIMESTAMPING_RX_SOFTWARE |\n-\t\tSOF_TIMESTAMPING_SOFTWARE |\n-\t\tSOF_TIMESTAMPING_TX_HARDWARE |\n-\t\tSOF_TIMESTAMPING_RX_HARDWARE |\n-\t\tSOF_TIMESTAMPING_RAW_HARDWARE;\n-\n-\tif (interface->ptp_clock)\n-\t\tinfo->phc_index = ptp_clock_index(interface->ptp_clock);\n-\telse\n-\t\tinfo->phc_index = -1;\n-\n-\tinfo->tx_types = BIT(HWTSTAMP_TX_OFF) | BIT(HWTSTAMP_TX_ON);\n-\n-\tinfo->rx_filters = BIT(HWTSTAMP_FILTER_NONE) | BIT(HWTSTAMP_FILTER_ALL);\n-\n-\treturn 0;\n-}\n-\n static const struct ethtool_ops fm10k_ethtool_ops = {\n \t.get_strings\t\t= fm10k_get_strings,\n \t.get_sset_count\t\t= fm10k_get_sset_count,\n@@ -1196,7 +1169,6 @@ static const struct ethtool_ops fm10k_ethtool_ops = {\n \t.set_rxfh\t\t= fm10k_set_rssh,\n \t.get_channels\t\t= fm10k_get_channels,\n \t.set_channels\t\t= fm10k_set_channels,\n-\t.get_ts_info = fm10k_get_ts_info,\n };\n \n void fm10k_set_ethtool_ops(struct net_device *dev)\ndiff --git a/drivers/net/ethernet/intel/fm10k/fm10k_main.c b/drivers/net/ethernet/intel/fm10k/fm10k_main.c\nindex ca5b9d7eeb22..58092e523bbe 100644\n--- a/drivers/net/ethernet/intel/fm10k/fm10k_main.c\n+++ b/drivers/net/ethernet/intel/fm10k/fm10k_main.c\n@@ -1,5 +1,5 @@\n /* Intel Ethernet Switch Host Interface Driver\n- * Copyright(c) 2013 - 2014 Intel Corporation.\n+ * Copyright(c) 2013 - 2016 Intel Corporation.\n *\n * This program is free software; you can redistribute it and/or modify it\n * under the terms and conditions of the GNU General Public License,\n@@ -424,19 +424,6 @@ static inline void fm10k_rx_hash(struct fm10k_ring *ring,\n \t\t PKT_HASH_TYPE_L4 : PKT_HASH_TYPE_L3);\n }\n \n-static void fm10k_rx_hwtstamp(struct fm10k_ring *rx_ring,\n-\t\t\t union fm10k_rx_desc *rx_desc,\n-\t\t\t struct sk_buff *skb)\n-{\n-\tstruct fm10k_intfc *interface = rx_ring->q_vector->interface;\n-\n-\tFM10K_CB(skb)->tstamp = rx_desc->q.timestamp;\n-\n-\tif (unlikely(interface->flags & FM10K_FLAG_RX_TS_ENABLED))\n-\t\tfm10k_systime_to_hwtstamp(interface, skb_hwtstamps(skb),\n-\t\t\t\t\t le64_to_cpu(rx_desc->q.timestamp));\n-}\n-\n static void fm10k_type_trans(struct fm10k_ring *rx_ring,\n \t\t\t union fm10k_rx_desc __maybe_unused *rx_desc,\n \t\t\t struct sk_buff *skb)\n@@ -486,8 +473,6 @@ static unsigned int fm10k_process_skb_fields(struct fm10k_ring *rx_ring,\n \n \tfm10k_rx_checksum(rx_ring, rx_desc, skb);\n \n-\tfm10k_rx_hwtstamp(rx_ring, rx_desc, skb);\n-\n \tFM10K_CB(skb)->fi.w.vlan = rx_desc->w.vlan;\n \n \tskb_record_rx_queue(skb, rx_ring->queue_index);\n@@ -912,11 +897,6 @@ static u8 fm10k_tx_desc_flags(struct sk_buff *skb, u32 tx_flags)\n \t/* set type for advanced descriptor with frame checksum insertion */\n \tu32 desc_flags = 0;\n \n-\t/* set timestamping bits */\n-\tif (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) &&\n-\t likely(skb_shinfo(skb)->tx_flags & SKBTX_IN_PROGRESS))\n-\t\tdesc_flags |= FM10K_TXD_FLAG_TIME;\n-\n \t/* set checksum offload bits */\n \tdesc_flags |= FM10K_SET_FLAG(tx_flags, FM10K_TX_FLAGS_CSUM,\n \t\t\t\t FM10K_TXD_FLAG_CSUM);\ndiff --git a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c\nindex 1d0f0583222c..32778dda8c12 100644\n--- a/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c\n+++ b/drivers/net/ethernet/intel/fm10k/fm10k_netdev.c\n@@ -1,5 +1,5 @@\n /* Intel Ethernet Switch Host Interface Driver\n- * Copyright(c) 2013 - 2015 Intel Corporation.\n+ * Copyright(c) 2013 - 2016 Intel Corporation.\n *\n * This program is free software; you can redistribute it and/or modify it\n * under the terms and conditions of the GNU General Public License,\n@@ -243,9 +243,6 @@ void fm10k_clean_all_tx_rings(struct fm10k_intfc *interface)\n \n \tfor (i = 0; i < interface->num_tx_queues; i++)\n \t\tfm10k_clean_tx_ring(interface->tx_ring[i]);\n-\n-\t/* remove any stale timestamp buffers and free them */\n-\tskb_queue_purge(&interface->ts_tx_skb_queue);\n }\n \n /**\n@@ -660,10 +657,6 @@ static netdev_tx_t fm10k_xmit_frame(struct sk_buff *skb, struct net_device *dev)\n \t\t__skb_put(skb, pad_len);\n \t}\n \n-\t/* prepare packet for hardware time stamping */\n-\tif (unlikely(skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP))\n-\t\tfm10k_ts_tx_enqueue(interface, skb);\n-\n \tif (r_idx >= interface->num_tx_queues)\n \t\tr_idx %= interface->num_tx_queues;\n \n@@ -1213,18 +1206,6 @@ static int __fm10k_setup_tc(struct net_device *dev, u32 handle, __be16 proto,\n \treturn fm10k_setup_tc(dev, tc->tc);\n }\n \n-static int fm10k_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)\n-{\n-\tswitch (cmd) {\n-\tcase SIOCGHWTSTAMP:\n-\t\treturn fm10k_get_ts_config(netdev, ifr);\n-\tcase SIOCSHWTSTAMP:\n-\t\treturn fm10k_set_ts_config(netdev, ifr);\n-\tdefault:\n-\t\treturn -EOPNOTSUPP;\n-\t}\n-}\n-\n static void fm10k_assign_l2_accel(struct fm10k_intfc *interface,\n \t\t\t\t struct fm10k_l2_accel *l2_accel)\n {\n@@ -1402,7 +1383,6 @@ static const struct net_device_ops fm10k_netdev_ops = {\n \t.ndo_get_vf_config\t= fm10k_ndo_get_vf_config,\n \t.ndo_add_vxlan_port\t= fm10k_add_vxlan_port,\n \t.ndo_del_vxlan_port\t= fm10k_del_vxlan_port,\n-\t.ndo_do_ioctl\t\t= fm10k_ioctl,\n \t.ndo_dfwd_add_station\t= fm10k_dfwd_add_station,\n \t.ndo_dfwd_del_station\t= fm10k_dfwd_del_station,\n #ifdef CONFIG_NET_POLL_CONTROLLER\ndiff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c\nindex a604513d0451..29e9402c4352 100644\n--- a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c\n+++ b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c\n@@ -1,5 +1,5 @@\n /* Intel Ethernet Switch Host Interface Driver\n- * Copyright(c) 2013 - 2015 Intel Corporation.\n+ * Copyright(c) 2013 - 2016 Intel Corporation.\n *\n * This program is free software; you can redistribute it and/or modify it\n * under the terms and conditions of the GNU General Public License,\n@@ -209,9 +209,6 @@ static void fm10k_reinit(struct fm10k_intfc *interface)\n \t\t\tnetdev->features |= NETIF_F_HW_VLAN_CTAG_RX;\n \t}\n \n-\t/* reset clock */\n-\tfm10k_ts_reset(interface);\n-\n \terr = netif_running(netdev) ? fm10k_open(netdev) : 0;\n \tif (err)\n \t\tgoto err_open;\n@@ -559,7 +556,6 @@ static void fm10k_service_task(struct work_struct *work)\n \t/* tasks only run when interface is up */\n \tfm10k_watchdog_subtask(interface);\n \tfm10k_check_hang_subtask(interface);\n-\tfm10k_ts_tx_subtask(interface);\n \n \t/* release lock on service events to allow scheduling next event */\n \tfm10k_service_event_complete(interface);\n@@ -1204,25 +1200,6 @@ static s32 fm10k_mbx_mac_addr(struct fm10k_hw *hw, u32 **results,\n \treturn 0;\n }\n \n-static s32 fm10k_1588_msg_vf(struct fm10k_hw *hw, u32 **results,\n-\t\t\t struct fm10k_mbx_info __always_unused *mbx)\n-{\n-\tstruct fm10k_intfc *interface;\n-\tu64 timestamp;\n-\ts32 err;\n-\n-\terr = fm10k_tlv_attr_get_u64(results[FM10K_1588_MSG_TIMESTAMP],\n-\t\t\t\t ×tamp);\n-\tif (err)\n-\t\treturn err;\n-\n-\tinterface = container_of(hw, struct fm10k_intfc, hw);\n-\n-\tfm10k_ts_tx_hwtstamp(interface, 0, timestamp);\n-\n-\treturn 0;\n-}\n-\n /* generic error handler for mailbox issues */\n static s32 fm10k_mbx_error(struct fm10k_hw *hw, u32 **results,\n \t\t\t struct fm10k_mbx_info __always_unused *mbx)\n@@ -1243,7 +1220,6 @@ static const struct fm10k_msg_data vf_mbx_data[] = {\n \tFM10K_TLV_MSG_TEST_HANDLER(fm10k_tlv_msg_test),\n \tFM10K_VF_MSG_MAC_VLAN_HANDLER(fm10k_mbx_mac_addr),\n \tFM10K_VF_MSG_LPORT_STATE_HANDLER(fm10k_msg_lport_state_vf),\n-\tFM10K_VF_MSG_1588_HANDLER(fm10k_1588_msg_vf),\n \tFM10K_TLV_MSG_ERROR_HANDLER(fm10k_mbx_error),\n };\n \n@@ -1341,68 +1317,6 @@ static s32 fm10k_update_pvid(struct fm10k_hw *hw, u32 **results,\n \treturn 0;\n }\n \n-static s32 fm10k_1588_msg_pf(struct fm10k_hw *hw, u32 **results,\n-\t\t\t struct fm10k_mbx_info __always_unused *mbx)\n-{\n-\tstruct fm10k_swapi_1588_timestamp timestamp;\n-\tstruct fm10k_iov_data *iov_data;\n-\tstruct fm10k_intfc *interface;\n-\tu16 sglort, vf_idx;\n-\ts32 err;\n-\n-\terr = fm10k_tlv_attr_get_le_struct(\n-\t\t\t\tresults[FM10K_PF_ATTR_ID_1588_TIMESTAMP],\n-\t\t\t\t×tamp, sizeof(timestamp));\n-\tif (err)\n-\t\treturn err;\n-\n-\tinterface = container_of(hw, struct fm10k_intfc, hw);\n-\n-\tif (timestamp.dglort) {\n-\t\tfm10k_ts_tx_hwtstamp(interface, timestamp.dglort,\n-\t\t\t\t le64_to_cpu(timestamp.egress));\n-\t\treturn 0;\n-\t}\n-\n-\t/* either dglort or sglort must be set */\n-\tif (!timestamp.sglort)\n-\t\treturn FM10K_ERR_PARAM;\n-\n-\t/* verify GLORT is at least one of the ones we own */\n-\tsglort = le16_to_cpu(timestamp.sglort);\n-\tif (!fm10k_glort_valid_pf(hw, sglort))\n-\t\treturn FM10K_ERR_PARAM;\n-\n-\tif (sglort == interface->glort) {\n-\t\tfm10k_ts_tx_hwtstamp(interface, 0,\n-\t\t\t\t le64_to_cpu(timestamp.ingress));\n-\t\treturn 0;\n-\t}\n-\n-\t/* if there is no iov_data then there is no mailbox to process */\n-\tif (!ACCESS_ONCE(interface->iov_data))\n-\t\treturn FM10K_ERR_PARAM;\n-\n-\trcu_read_lock();\n-\n-\t/* notify VF if this timestamp belongs to it */\n-\tiov_data = interface->iov_data;\n-\tvf_idx = (hw->mac.dglort_map & FM10K_DGLORTMAP_NONE) - sglort;\n-\n-\tif (!iov_data || vf_idx >= iov_data->num_vfs) {\n-\t\terr = FM10K_ERR_PARAM;\n-\t\tgoto err_unlock;\n-\t}\n-\n-\terr = hw->iov.ops.report_timestamp(hw, &iov_data->vf_info[vf_idx],\n-\t\t\t\t\t le64_to_cpu(timestamp.ingress));\n-\n-err_unlock:\n-\trcu_read_unlock();\n-\n-\treturn err;\n-}\n-\n static const struct fm10k_msg_data pf_mbx_data[] = {\n \tFM10K_PF_MSG_ERR_HANDLER(XCAST_MODES, fm10k_msg_err_pf),\n \tFM10K_PF_MSG_ERR_HANDLER(UPDATE_MAC_FWD_RULE, fm10k_msg_err_pf),\n@@ -1410,7 +1324,6 @@ static const struct fm10k_msg_data pf_mbx_data[] = {\n \tFM10K_PF_MSG_ERR_HANDLER(LPORT_CREATE, fm10k_msg_err_pf),\n \tFM10K_PF_MSG_ERR_HANDLER(LPORT_DELETE, fm10k_msg_err_pf),\n \tFM10K_PF_MSG_UPDATE_PVID_HANDLER(fm10k_update_pvid),\n-\tFM10K_PF_MSG_1588_TIMESTAMP_HANDLER(fm10k_1588_msg_pf),\n \tFM10K_TLV_MSG_ERROR_HANDLER(fm10k_mbx_error),\n };\n \n@@ -1789,18 +1702,9 @@ static int fm10k_sw_init(struct fm10k_intfc *interface,\n \t\treturn -EIO;\n \t}\n \n-\t/* assign BAR 4 resources for use with PTP */\n-\tif (fm10k_read_reg(hw, FM10K_CTRL) & FM10K_CTRL_BAR4_ALLOWED)\n-\t\tinterface->sw_addr = ioremap(pci_resource_start(pdev, 4),\n-\t\t\t\t\t pci_resource_len(pdev, 4));\n-\thw->sw_addr = interface->sw_addr;\n-\n \t/* initialize DCBNL interface */\n \tfm10k_dcbnl_set_ops(netdev);\n \n-\t/* Intitialize timestamp data */\n-\tfm10k_ts_init(interface);\n-\n \t/* set default ring sizes */\n \tinterface->tx_ring_count = FM10K_DEFAULT_TXD;\n \tinterface->rx_ring_count = FM10K_DEFAULT_RXD;\n@@ -2018,9 +1922,6 @@ static int fm10k_probe(struct pci_dev *pdev, const struct pci_device_id *ent)\n \t/* kick off service timer now, even when interface is down */\n \tmod_timer(&interface->service_timer, (HZ * 2) + jiffies);\n \n-\t/* Register PTP interface */\n-\tfm10k_ptp_register(interface);\n-\n \t/* print warning for non-optimal configurations */\n \tfm10k_slot_warn(interface);\n \n@@ -2077,9 +1978,6 @@ static void fm10k_remove(struct pci_dev *pdev)\n \tif (netdev->reg_state == NETREG_REGISTERED)\n \t\tunregister_netdev(netdev);\n \n-\t/* cleanup timestamp handling */\n-\tfm10k_ptp_unregister(interface);\n-\n \t/* release VFs */\n \tfm10k_iov_disable(pdev);\n \n@@ -2152,9 +2050,6 @@ static int fm10k_resume(struct pci_dev *pdev)\n \t/* reset statistics starting values */\n \thw->mac.ops.rebind_hw_stats(hw, &interface->stats);\n \n-\t/* reset clock */\n-\tfm10k_ts_reset(interface);\n-\n \trtnl_lock();\n \n \terr = fm10k_init_queueing_scheme(interface);\n@@ -2365,9 +2260,6 @@ static void fm10k_io_resume(struct pci_dev *pdev)\n \t/* reassociate interrupts */\n \tfm10k_mbx_request_irq(interface);\n \n-\t/* reset clock */\n-\tfm10k_ts_reset(interface);\n-\n \tif (netif_running(netdev))\n \t\terr = fm10k_open(netdev);\n \ndiff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pf.c b/drivers/net/ethernet/intel/fm10k/fm10k_pf.c\nindex ecc99f9d2cce..c8e8ce5a8327 100644\n--- a/drivers/net/ethernet/intel/fm10k/fm10k_pf.c\n+++ b/drivers/net/ethernet/intel/fm10k/fm10k_pf.c\n@@ -1,5 +1,5 @@\n /* Intel Ethernet Switch Host Interface Driver\n- * Copyright(c) 2013 - 2015 Intel Corporation.\n+ * Copyright(c) 2013 - 2016 Intel Corporation.\n *\n * This program is free software; you can redistribute it and/or modify it\n * under the terms and conditions of the GNU General Public License,\n@@ -1140,19 +1140,6 @@ static void fm10k_iov_update_stats_pf(struct fm10k_hw *hw,\n \tfm10k_update_hw_stats_q(hw, q, idx, qpp);\n }\n \n-static s32 fm10k_iov_report_timestamp_pf(struct fm10k_hw *hw,\n-\t\t\t\t\t struct fm10k_vf_info *vf_info,\n-\t\t\t\t\t u64 timestamp)\n-{\n-\tu32 msg[4];\n-\n-\t/* generate port state response to notify VF it is not ready */\n-\tfm10k_tlv_msg_init(msg, FM10K_VF_MSG_ID_1588);\n-\tfm10k_tlv_attr_put_u64(msg, FM10K_1588_MSG_TIMESTAMP, timestamp);\n-\n-\treturn vf_info->mbx.ops.enqueue_tx(hw, &vf_info->mbx, msg);\n-}\n-\n /**\n * fm10k_iov_msg_msix_pf - Message handler for MSI-X request from VF\n * @hw: Pointer to hardware structure\n@@ -1773,89 +1760,6 @@ s32 fm10k_msg_err_pf(struct fm10k_hw *hw, u32 **results,\n \treturn 0;\n }\n \n-const struct fm10k_tlv_attr fm10k_1588_timestamp_msg_attr[] = {\n-\tFM10K_TLV_ATTR_LE_STRUCT(FM10K_PF_ATTR_ID_1588_TIMESTAMP,\n-\t\t\t\t sizeof(struct fm10k_swapi_1588_timestamp)),\n-\tFM10K_TLV_ATTR_LAST\n-};\n-\n-/* currently there is no shared 1588 timestamp handler */\n-\n-/**\n- * fm10k_adjust_systime_pf - Adjust systime frequency\n- * @hw: pointer to hardware structure\n- * @ppb: adjustment rate in parts per billion\n- *\n- * This function will adjust the SYSTIME_CFG register contained in BAR 4\n- * if this function is supported for BAR 4 access. The adjustment amount\n- * is based on the parts per billion value provided and adjusted to a\n- * value based on parts per 2^48 clock cycles.\n- *\n- * If adjustment is not supported or the requested value is too large\n- * we will return an error.\n- **/\n-static s32 fm10k_adjust_systime_pf(struct fm10k_hw *hw, s32 ppb)\n-{\n-\tu64 systime_adjust;\n-\n-\t/* if sw_addr is not set we don't have switch register access */\n-\tif (!hw->sw_addr)\n-\t\treturn ppb ? FM10K_ERR_PARAM : 0;\n-\n-\t/* we must convert the value from parts per billion to parts per\n-\t * 2^48 cycles. In addition I have opted to only use the 30 most\n-\t * significant bits of the adjustment value as the 8 least\n-\t * significant bits are located in another register and represent\n-\t * a value significantly less than a part per billion, the result\n-\t * of dropping the 8 least significant bits is that the adjustment\n-\t * value is effectively multiplied by 2^8 when we write it.\n-\t *\n-\t * As a result of all this the math for this breaks down as follows:\n-\t *\tppb / 10^9 == adjust * 2^8 / 2^48\n-\t * If we solve this for adjust, and simplify it comes out as:\n-\t *\tppb * 2^31 / 5^9 == adjust\n-\t */\n-\tsystime_adjust = (ppb < 0) ? -ppb : ppb;\n-\tsystime_adjust <<= 31;\n-\tdo_div(systime_adjust, 1953125);\n-\n-\t/* verify the requested adjustment value is in range */\n-\tif (systime_adjust > FM10K_SW_SYSTIME_ADJUST_MASK)\n-\t\treturn FM10K_ERR_PARAM;\n-\n-\tif (ppb > 0)\n-\t\tsystime_adjust |= FM10K_SW_SYSTIME_ADJUST_DIR_POSITIVE;\n-\n-\tfm10k_write_sw_reg(hw, FM10K_SW_SYSTIME_ADJUST, (u32)systime_adjust);\n-\n-\treturn 0;\n-}\n-\n-/**\n- * fm10k_read_systime_pf - Reads value of systime registers\n- * @hw: pointer to the hardware structure\n- *\n- * Function reads the content of 2 registers, combined to represent a 64 bit\n- * value measured in nanosecods. In order to guarantee the value is accurate\n- * we check the 32 most significant bits both before and after reading the\n- * 32 least significant bits to verify they didn't change as we were reading\n- * the registers.\n- **/\n-static u64 fm10k_read_systime_pf(struct fm10k_hw *hw)\n-{\n-\tu32 systime_l, systime_h, systime_tmp;\n-\n-\tsystime_h = fm10k_read_reg(hw, FM10K_SYSTIME + 1);\n-\n-\tdo {\n-\t\tsystime_tmp = systime_h;\n-\t\tsystime_l = fm10k_read_reg(hw, FM10K_SYSTIME);\n-\t\tsystime_h = fm10k_read_reg(hw, FM10K_SYSTIME + 1);\n-\t} while (systime_tmp != systime_h);\n-\n-\treturn ((u64)systime_h << 32) | systime_l;\n-}\n-\n static const struct fm10k_msg_data fm10k_msg_data_pf[] = {\n \tFM10K_PF_MSG_ERR_HANDLER(XCAST_MODES, fm10k_msg_err_pf),\n \tFM10K_PF_MSG_ERR_HANDLER(UPDATE_MAC_FWD_RULE, fm10k_msg_err_pf),\n@@ -1885,8 +1789,6 @@ static const struct fm10k_mac_ops mac_ops_pf = {\n \t.set_dma_mask\t\t= fm10k_set_dma_mask_pf,\n \t.get_fault\t\t= fm10k_get_fault_pf,\n \t.get_host_state\t\t= fm10k_get_host_state_pf,\n-\t.adjust_systime\t\t= fm10k_adjust_systime_pf,\n-\t.read_systime\t\t= fm10k_read_systime_pf,\n };\n \n static const struct fm10k_iov_ops iov_ops_pf = {\n@@ -1898,7 +1800,6 @@ static const struct fm10k_iov_ops iov_ops_pf = {\n \t.set_lport\t\t\t= fm10k_iov_set_lport_pf,\n \t.reset_lport\t\t\t= fm10k_iov_reset_lport_pf,\n \t.update_stats\t\t\t= fm10k_iov_update_stats_pf,\n-\t.report_timestamp\t\t= fm10k_iov_report_timestamp_pf,\n };\n \n static s32 fm10k_get_invariants_pf(struct fm10k_hw *hw)\ndiff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pf.h b/drivers/net/ethernet/intel/fm10k/fm10k_pf.h\nindex b2d96b45ca3c..b78210d06213 100644\n--- a/drivers/net/ethernet/intel/fm10k/fm10k_pf.h\n+++ b/drivers/net/ethernet/intel/fm10k/fm10k_pf.h\n@@ -1,5 +1,5 @@\n /* Intel Ethernet Switch Host Interface Driver\n- * Copyright(c) 2013 - 2015 Intel Corporation.\n+ * Copyright(c) 2013 - 2016 Intel Corporation.\n *\n * This program is free software; you can redistribute it and/or modify it\n * under the terms and conditions of the GNU General Public License,\n@@ -42,8 +42,6 @@ enum fm10k_pf_tlv_msg_id_v1 {\n \tFM10K_PF_MSG_ID_UPDATE_FLOW\t\t= 0x503,\n \tFM10K_PF_MSG_ID_DELETE_FLOW\t\t= 0x504,\n \tFM10K_PF_MSG_ID_SET_FLOW_STATE\t\t= 0x505,\n-\tFM10K_PF_MSG_ID_GET_1588_INFO\t\t= 0x506,\n-\tFM10K_PF_MSG_ID_1588_TIMESTAMP\t\t= 0x701,\n };\n \n enum fm10k_pf_tlv_attr_id_v1 {\n@@ -61,7 +59,6 @@ enum fm10k_pf_tlv_attr_id_v1 {\n \tFM10K_PF_ATTR_ID_DELETE_FLOW\t\t= 0x0B,\n \tFM10K_PF_ATTR_ID_PORT\t\t\t= 0x0C,\n \tFM10K_PF_ATTR_ID_UPDATE_PVID\t\t= 0x0D,\n-\tFM10K_PF_ATTR_ID_1588_TIMESTAMP\t\t= 0x10,\n };\n \n #define FM10K_MSG_LPORT_MAP_GLORT_SHIFT\t0\n@@ -100,13 +97,6 @@ struct fm10k_swapi_error {\n \tstruct fm10k_global_table_data\tffu;\n } __aligned(4) __packed;\n \n-struct fm10k_swapi_1588_timestamp {\n-\t__le64 egress;\n-\t__le64 ingress;\n-\t__le16 dglort;\n-\t__le16 sglort;\n-} __aligned(4) __packed;\n-\n s32 fm10k_msg_lport_map_pf(struct fm10k_hw *, u32 **, struct fm10k_mbx_info *);\n extern const struct fm10k_tlv_attr fm10k_lport_map_msg_attr[];\n #define FM10K_PF_MSG_LPORT_MAP_HANDLER(func) \\\n@@ -122,11 +112,6 @@ extern const struct fm10k_tlv_attr fm10k_err_msg_attr[];\n #define FM10K_PF_MSG_ERR_HANDLER(msg, func) \\\n \tFM10K_MSG_HANDLER(FM10K_PF_MSG_ID_##msg, fm10k_err_msg_attr, func)\n \n-extern const struct fm10k_tlv_attr fm10k_1588_timestamp_msg_attr[];\n-#define FM10K_PF_MSG_1588_TIMESTAMP_HANDLER(func) \\\n-\tFM10K_MSG_HANDLER(FM10K_PF_MSG_ID_1588_TIMESTAMP, \\\n-\t\t\t fm10k_1588_timestamp_msg_attr, func)\n-\n s32 fm10k_iov_msg_msix_pf(struct fm10k_hw *, u32 **, struct fm10k_mbx_info *);\n s32 fm10k_iov_msg_mac_vlan_pf(struct fm10k_hw *, u32 **,\n \t\t\t struct fm10k_mbx_info *);\ndiff --git a/drivers/net/ethernet/intel/fm10k/fm10k_ptp.c b/drivers/net/ethernet/intel/fm10k/fm10k_ptp.c\ndeleted file mode 100644\nindex 1c1ccade6538..000000000000\n--- a/drivers/net/ethernet/intel/fm10k/fm10k_ptp.c\n+++ /dev/null\n@@ -1,462 +0,0 @@\n-/* Intel Ethernet Switch Host Interface Driver\n- * Copyright(c) 2013 - 2015 Intel Corporation.\n- *\n- * This program is free software; you can redistribute it and/or modify it\n- * under the terms and conditions of the GNU General Public License,\n- * version 2, as published by the Free Software Foundation.\n- *\n- * This program is distributed in the hope it will be useful, but WITHOUT\n- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\n- * more details.\n- *\n- * The full GNU General Public License is included in this distribution in\n- * the file called \"COPYING\".\n- *\n- * Contact Information:\n- * e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>\n- * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497\n- */\n-\n-#include <linux/ptp_classify.h>\n-#include <linux/ptp_clock_kernel.h>\n-\n-#include \"fm10k.h\"\n-\n-#define FM10K_TS_TX_TIMEOUT\t\t(HZ * 15)\n-\n-void fm10k_systime_to_hwtstamp(struct fm10k_intfc *interface,\n-\t\t\t struct skb_shared_hwtstamps *hwtstamp,\n-\t\t\t u64 systime)\n-{\n-\tunsigned long flags;\n-\n-\tread_lock_irqsave(&interface->systime_lock, flags);\n-\tsystime += interface->ptp_adjust;\n-\tread_unlock_irqrestore(&interface->systime_lock, flags);\n-\n-\thwtstamp->hwtstamp = ns_to_ktime(systime);\n-}\n-\n-static struct sk_buff *fm10k_ts_tx_skb(struct fm10k_intfc *interface,\n-\t\t\t\t __le16 dglort)\n-{\n-\tstruct sk_buff_head *list = &interface->ts_tx_skb_queue;\n-\tstruct sk_buff *skb;\n-\n-\tskb_queue_walk(list, skb) {\n-\t\tif (FM10K_CB(skb)->fi.w.dglort == dglort)\n-\t\t\treturn skb;\n-\t}\n-\n-\treturn NULL;\n-}\n-\n-void fm10k_ts_tx_enqueue(struct fm10k_intfc *interface, struct sk_buff *skb)\n-{\n-\tstruct sk_buff_head *list = &interface->ts_tx_skb_queue;\n-\tstruct sk_buff *clone;\n-\tunsigned long flags;\n-\n-\t/* create clone for us to return on the Tx path */\n-\tclone = skb_clone_sk(skb);\n-\tif (!clone)\n-\t\treturn;\n-\n-\tFM10K_CB(clone)->ts_tx_timeout = jiffies + FM10K_TS_TX_TIMEOUT;\n-\tspin_lock_irqsave(&list->lock, flags);\n-\n-\t/* attempt to locate any buffers with the same dglort,\n-\t * if none are present then insert skb in tail of list\n-\t */\n-\tskb = fm10k_ts_tx_skb(interface, FM10K_CB(clone)->fi.w.dglort);\n-\tif (!skb) {\n-\t\tskb_shinfo(clone)->tx_flags |= SKBTX_IN_PROGRESS;\n-\t\t__skb_queue_tail(list, clone);\n-\t}\n-\n-\tspin_unlock_irqrestore(&list->lock, flags);\n-\n-\t/* if list is already has one then we just free the clone */\n-\tif (skb)\n-\t\tdev_kfree_skb(clone);\n-}\n-\n-void fm10k_ts_tx_hwtstamp(struct fm10k_intfc *interface, __le16 dglort,\n-\t\t\t u64 systime)\n-{\n-\tstruct skb_shared_hwtstamps shhwtstamps;\n-\tstruct sk_buff_head *list = &interface->ts_tx_skb_queue;\n-\tstruct sk_buff *skb;\n-\tunsigned long flags;\n-\n-\tspin_lock_irqsave(&list->lock, flags);\n-\n-\t/* attempt to locate and pull the sk_buff out of the list */\n-\tskb = fm10k_ts_tx_skb(interface, dglort);\n-\tif (skb)\n-\t\t__skb_unlink(skb, list);\n-\n-\tspin_unlock_irqrestore(&list->lock, flags);\n-\n-\t/* if not found do nothing */\n-\tif (!skb)\n-\t\treturn;\n-\n-\t/* timestamp the sk_buff and free out copy */\n-\tfm10k_systime_to_hwtstamp(interface, &shhwtstamps, systime);\n-\tskb_tstamp_tx(skb, &shhwtstamps);\n-\tdev_kfree_skb_any(skb);\n-}\n-\n-void fm10k_ts_tx_subtask(struct fm10k_intfc *interface)\n-{\n-\tstruct sk_buff_head *list = &interface->ts_tx_skb_queue;\n-\tstruct sk_buff *skb, *tmp;\n-\tunsigned long flags;\n-\n-\t/* If we're down or resetting, just bail */\n-\tif (test_bit(__FM10K_DOWN, &interface->state) ||\n-\t test_bit(__FM10K_RESETTING, &interface->state))\n-\t\treturn;\n-\n-\tspin_lock_irqsave(&list->lock, flags);\n-\n-\t/* walk though the list and flush any expired timestamp packets */\n-\tskb_queue_walk_safe(list, skb, tmp) {\n-\t\tif (!time_is_after_jiffies(FM10K_CB(skb)->ts_tx_timeout))\n-\t\t\tcontinue;\n-\t\t__skb_unlink(skb, list);\n-\t\tkfree_skb(skb);\n-\t\tinterface->tx_hwtstamp_timeouts++;\n-\t}\n-\n-\tspin_unlock_irqrestore(&list->lock, flags);\n-}\n-\n-static u64 fm10k_systime_read(struct fm10k_intfc *interface)\n-{\n-\tstruct fm10k_hw *hw = &interface->hw;\n-\n-\treturn hw->mac.ops.read_systime(hw);\n-}\n-\n-void fm10k_ts_reset(struct fm10k_intfc *interface)\n-{\n-\ts64 ns = ktime_to_ns(ktime_get_real());\n-\tunsigned long flags;\n-\n-\t/* reinitialize the clock */\n-\twrite_lock_irqsave(&interface->systime_lock, flags);\n-\tinterface->ptp_adjust = fm10k_systime_read(interface) - ns;\n-\twrite_unlock_irqrestore(&interface->systime_lock, flags);\n-}\n-\n-void fm10k_ts_init(struct fm10k_intfc *interface)\n-{\n-\t/* Initialize lock protecting systime access */\n-\trwlock_init(&interface->systime_lock);\n-\n-\t/* Initialize skb queue for pending timestamp requests */\n-\tskb_queue_head_init(&interface->ts_tx_skb_queue);\n-\n-\t/* reset the clock to current kernel time */\n-\tfm10k_ts_reset(interface);\n-}\n-\n-/**\n- * fm10k_get_ts_config - get current hardware timestamping configuration\n- * @netdev: network interface device structure\n- * @ifreq: ioctl data\n- *\n- * This function returns the current timestamping settings. Rather than\n- * attempt to deconstruct registers to fill in the values, simply keep a copy\n- * of the old settings around, and return a copy when requested.\n- */\n-int fm10k_get_ts_config(struct net_device *netdev, struct ifreq *ifr)\n-{\n-\tstruct fm10k_intfc *interface = netdev_priv(netdev);\n-\tstruct hwtstamp_config *config = &interface->ts_config;\n-\n-\treturn copy_to_user(ifr->ifr_data, config, sizeof(*config)) ?\n-\t\t-EFAULT : 0;\n-}\n-\n-/**\n- * fm10k_set_ts_config - control hardware time stamping\n- * @netdev: network interface device structure\n- * @ifreq: ioctl data\n- *\n- * Outgoing time stamping can be enabled and disabled. Play nice and\n- * disable it when requested, although it shouldn't cause any overhead\n- * when no packet needs it. At most one packet in the queue may be\n- * marked for time stamping, otherwise it would be impossible to tell\n- * for sure to which packet the hardware time stamp belongs.\n- *\n- * Incoming time stamping has to be configured via the hardware\n- * filters. Not all combinations are supported, in particular event\n- * type has to be specified. Matching the kind of event packet is\n- * not supported, with the exception of \"all V2 events regardless of\n- * level 2 or 4\".\n- *\n- * Since hardware always timestamps Path delay packets when timestamping V2\n- * packets, regardless of the type specified in the register, only use V2\n- * Event mode. This more accurately tells the user what the hardware is going\n- * to do anyways.\n- */\n-int fm10k_set_ts_config(struct net_device *netdev, struct ifreq *ifr)\n-{\n-\tstruct fm10k_intfc *interface = netdev_priv(netdev);\n-\tstruct hwtstamp_config ts_config;\n-\n-\tif (copy_from_user(&ts_config, ifr->ifr_data, sizeof(ts_config)))\n-\t\treturn -EFAULT;\n-\n-\t/* reserved for future extensions */\n-\tif (ts_config.flags)\n-\t\treturn -EINVAL;\n-\n-\tswitch (ts_config.tx_type) {\n-\tcase HWTSTAMP_TX_OFF:\n-\t\tbreak;\n-\tcase HWTSTAMP_TX_ON:\n-\t\t/* we likely need some check here to see if this is supported */\n-\t\tbreak;\n-\tdefault:\n-\t\treturn -ERANGE;\n-\t}\n-\n-\tswitch (ts_config.rx_filter) {\n-\tcase HWTSTAMP_FILTER_NONE:\n-\t\tinterface->flags &= ~FM10K_FLAG_RX_TS_ENABLED;\n-\t\tbreak;\n-\tcase HWTSTAMP_FILTER_PTP_V1_L4_EVENT:\n-\tcase HWTSTAMP_FILTER_PTP_V1_L4_SYNC:\n-\tcase HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ:\n-\tcase HWTSTAMP_FILTER_PTP_V2_L4_EVENT:\n-\tcase HWTSTAMP_FILTER_PTP_V2_L4_SYNC:\n-\tcase HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ:\n-\tcase HWTSTAMP_FILTER_PTP_V2_L2_EVENT:\n-\tcase HWTSTAMP_FILTER_PTP_V2_L2_SYNC:\n-\tcase HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ:\n-\tcase HWTSTAMP_FILTER_PTP_V2_EVENT:\n-\tcase HWTSTAMP_FILTER_PTP_V2_SYNC:\n-\tcase HWTSTAMP_FILTER_PTP_V2_DELAY_REQ:\n-\tcase HWTSTAMP_FILTER_ALL:\n-\t\tinterface->flags |= FM10K_FLAG_RX_TS_ENABLED;\n-\t\tts_config.rx_filter = HWTSTAMP_FILTER_ALL;\n-\t\tbreak;\n-\tdefault:\n-\t\treturn -ERANGE;\n-\t}\n-\n-\t/* save these settings for future reference */\n-\tinterface->ts_config = ts_config;\n-\n-\treturn copy_to_user(ifr->ifr_data, &ts_config, sizeof(ts_config)) ?\n-\t\t-EFAULT : 0;\n-}\n-\n-static int fm10k_ptp_adjfreq(struct ptp_clock_info *ptp, s32 ppb)\n-{\n-\tstruct fm10k_intfc *interface;\n-\tstruct fm10k_hw *hw;\n-\tint err;\n-\n-\tinterface = container_of(ptp, struct fm10k_intfc, ptp_caps);\n-\thw = &interface->hw;\n-\n-\terr = hw->mac.ops.adjust_systime(hw, ppb);\n-\n-\t/* the only error we should see is if the value is out of range */\n-\treturn (err == FM10K_ERR_PARAM) ? -ERANGE : err;\n-}\n-\n-static int fm10k_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)\n-{\n-\tstruct fm10k_intfc *interface;\n-\tunsigned long flags;\n-\n-\tinterface = container_of(ptp, struct fm10k_intfc, ptp_caps);\n-\n-\twrite_lock_irqsave(&interface->systime_lock, flags);\n-\tinterface->ptp_adjust += delta;\n-\twrite_unlock_irqrestore(&interface->systime_lock, flags);\n-\n-\treturn 0;\n-}\n-\n-static int fm10k_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts)\n-{\n-\tstruct fm10k_intfc *interface;\n-\tunsigned long flags;\n-\tu64 now;\n-\n-\tinterface = container_of(ptp, struct fm10k_intfc, ptp_caps);\n-\n-\tread_lock_irqsave(&interface->systime_lock, flags);\n-\tnow = fm10k_systime_read(interface) + interface->ptp_adjust;\n-\tread_unlock_irqrestore(&interface->systime_lock, flags);\n-\n-\t*ts = ns_to_timespec64(now);\n-\n-\treturn 0;\n-}\n-\n-static int fm10k_ptp_settime(struct ptp_clock_info *ptp,\n-\t\t\t const struct timespec64 *ts)\n-{\n-\tstruct fm10k_intfc *interface;\n-\tunsigned long flags;\n-\tu64 ns = timespec64_to_ns(ts);\n-\n-\tinterface = container_of(ptp, struct fm10k_intfc, ptp_caps);\n-\n-\twrite_lock_irqsave(&interface->systime_lock, flags);\n-\tinterface->ptp_adjust = fm10k_systime_read(interface) - ns;\n-\twrite_unlock_irqrestore(&interface->systime_lock, flags);\n-\n-\treturn 0;\n-}\n-\n-static int fm10k_ptp_enable(struct ptp_clock_info *ptp,\n-\t\t\t struct ptp_clock_request *rq,\n-\t\t\t int __always_unused on)\n-{\n-\tstruct ptp_clock_time *t = &rq->perout.period;\n-\tstruct fm10k_intfc *interface;\n-\tstruct fm10k_hw *hw;\n-\tu64 period;\n-\tu32 step;\n-\n-\t/* we can only support periodic output */\n-\tif (rq->type != PTP_CLK_REQ_PEROUT)\n-\t\treturn -EINVAL;\n-\n-\t/* verify the requested channel is there */\n-\tif (rq->perout.index >= ptp->n_per_out)\n-\t\treturn -EINVAL;\n-\n-\t/* we cannot enforce start time as there is no\n-\t * mechanism for that in the hardware, we can only control\n-\t * the period.\n-\t */\n-\n-\t/* we cannot support periods greater than 4 seconds due to reg limit */\n-\tif (t->sec > 4 || t->sec < 0)\n-\t\treturn -ERANGE;\n-\n-\tinterface = container_of(ptp, struct fm10k_intfc, ptp_caps);\n-\thw = &interface->hw;\n-\n-\t/* we simply cannot support the operation if we don't have BAR4 */\n-\tif (!hw->sw_addr)\n-\t\treturn -ENOTSUPP;\n-\n-\t/* convert to unsigned 64b ns, verify we can put it in a 32b register */\n-\tperiod = t->sec * 1000000000LL + t->nsec;\n-\n-\t/* determine the minimum size for period */\n-\tstep = 2 * (fm10k_read_reg(hw, FM10K_SYSTIME_CFG) &\n-\t\t FM10K_SYSTIME_CFG_STEP_MASK);\n-\n-\t/* verify the value is in range supported by hardware */\n-\tif ((period && (period < step)) || (period > U32_MAX))\n-\t\treturn -ERANGE;\n-\n-\t/* notify hardware of request to being sending pulses */\n-\tfm10k_write_sw_reg(hw, FM10K_SW_SYSTIME_PULSE(rq->perout.index),\n-\t\t\t (u32)period);\n-\n-\treturn 0;\n-}\n-\n-static struct ptp_pin_desc fm10k_ptp_pd[2] = {\n-\t{\n-\t\t.name = \"IEEE1588_PULSE0\",\n-\t\t.index = 0,\n-\t\t.func = PTP_PF_PEROUT,\n-\t\t.chan = 0\n-\t},\n-\t{\n-\t\t.name = \"IEEE1588_PULSE1\",\n-\t\t.index = 1,\n-\t\t.func = PTP_PF_PEROUT,\n-\t\t.chan = 1\n-\t}\n-};\n-\n-static int fm10k_ptp_verify(struct ptp_clock_info *ptp, unsigned int pin,\n-\t\t\t enum ptp_pin_function func, unsigned int chan)\n-{\n-\t/* verify the requested pin is there */\n-\tif (pin >= ptp->n_pins || !ptp->pin_config)\n-\t\treturn -EINVAL;\n-\n-\t/* enforce locked channels, no changing them */\n-\tif (chan != ptp->pin_config[pin].chan)\n-\t\treturn -EINVAL;\n-\n-\t/* we want to keep the functions locked as well */\n-\tif (func != ptp->pin_config[pin].func)\n-\t\treturn -EINVAL;\n-\n-\treturn 0;\n-}\n-\n-void fm10k_ptp_register(struct fm10k_intfc *interface)\n-{\n-\tstruct ptp_clock_info *ptp_caps = &interface->ptp_caps;\n-\tstruct device *dev = &interface->pdev->dev;\n-\tstruct ptp_clock *ptp_clock;\n-\n-\tsnprintf(ptp_caps->name, sizeof(ptp_caps->name),\n-\t\t \"%s\", interface->netdev->name);\n-\tptp_caps->owner\t\t= THIS_MODULE;\n-\t/* This math is simply the inverse of the math in\n-\t * fm10k_adjust_systime_pf applied to an adjustment value\n-\t * of 2^30 - 1 which is the maximum value of the register:\n-\t *\tmax_ppb == ((2^30 - 1) * 5^9) / 2^31\n-\t */\n-\tptp_caps->max_adj\t= 976562;\n-\tptp_caps->adjfreq\t= fm10k_ptp_adjfreq;\n-\tptp_caps->adjtime\t= fm10k_ptp_adjtime;\n-\tptp_caps->gettime64\t= fm10k_ptp_gettime;\n-\tptp_caps->settime64\t= fm10k_ptp_settime;\n-\n-\t/* provide pins if BAR4 is accessible */\n-\tif (interface->sw_addr) {\n-\t\t/* enable periodic outputs */\n-\t\tptp_caps->n_per_out = 2;\n-\t\tptp_caps->enable\t= fm10k_ptp_enable;\n-\n-\t\t/* enable clock pins */\n-\t\tptp_caps->verify\t= fm10k_ptp_verify;\n-\t\tptp_caps->n_pins = 2;\n-\t\tptp_caps->pin_config = fm10k_ptp_pd;\n-\t}\n-\n-\tptp_clock = ptp_clock_register(ptp_caps, dev);\n-\tif (IS_ERR(ptp_clock)) {\n-\t\tptp_clock = NULL;\n-\t\tdev_err(dev, \"ptp_clock_register failed\\n\");\n-\t} else {\n-\t\tdev_info(dev, \"registered PHC device %s\\n\", ptp_caps->name);\n-\t}\n-\n-\tinterface->ptp_clock = ptp_clock;\n-}\n-\n-void fm10k_ptp_unregister(struct fm10k_intfc *interface)\n-{\n-\tstruct ptp_clock *ptp_clock = interface->ptp_clock;\n-\tstruct device *dev = &interface->pdev->dev;\n-\n-\tif (!ptp_clock)\n-\t\treturn;\n-\n-\tinterface->ptp_clock = NULL;\n-\n-\tptp_clock_unregister(ptp_clock);\n-\tdev_info(dev, \"removed PHC %s\\n\", interface->ptp_caps.name);\n-}\ndiff --git a/drivers/net/ethernet/intel/fm10k/fm10k_type.h b/drivers/net/ethernet/intel/fm10k/fm10k_type.h\nindex 5c0533054c5f..995dceefec25 100644\n--- a/drivers/net/ethernet/intel/fm10k/fm10k_type.h\n+++ b/drivers/net/ethernet/intel/fm10k/fm10k_type.h\n@@ -1,5 +1,5 @@\n /* Intel Ethernet Switch Host Interface Driver\n- * Copyright(c) 2013 - 2015 Intel Corporation.\n+ * Copyright(c) 2013 - 2016 Intel Corporation.\n *\n * This program is free software; you can redistribute it and/or modify it\n * under the terms and conditions of the GNU General Public License,\n@@ -225,11 +225,6 @@ struct fm10k_hw;\n #define FM10K_STATS_LOOPBACK_DROP\t0x3806\n #define FM10K_STATS_NODESC_DROP\t\t0x3807\n \n-/* Timesync registers */\n-#define FM10K_SYSTIME\t\t0x3814\n-#define FM10K_SYSTIME_CFG\t0x3818\n-#define FM10K_SYSTIME_CFG_STEP_MASK\t\t0x0000000F\n-\n /* PCIe state registers */\n #define FM10K_PHYADDR\t\t0x381C\n \n@@ -381,12 +376,6 @@ struct fm10k_hw;\n #define FM10K_VFSYSTIME\t\t0x00040\n #define FM10K_VFITR(_n)\t\t((_n) + 0x00060)\n \n-/* Registers contained in BAR 4 for Switch management */\n-#define FM10K_SW_SYSTIME_ADJUST\t0x0224D\n-#define FM10K_SW_SYSTIME_ADJUST_MASK\t\t0x3FFFFFFF\n-#define FM10K_SW_SYSTIME_ADJUST_DIR_POSITIVE\t0x80000000\n-#define FM10K_SW_SYSTIME_PULSE(_n)\t((_n) + 0x02252)\n-\n enum fm10k_int_source {\n \tfm10k_int_mailbox\t\t= 0,\n \tfm10k_int_pcie_fault\t\t= 1,\n@@ -550,8 +539,6 @@ struct fm10k_mac_ops {\n \t\t\t\t struct fm10k_dglort_cfg *);\n \tvoid (*set_dma_mask)(struct fm10k_hw *, u64);\n \ts32 (*get_fault)(struct fm10k_hw *, int, struct fm10k_fault *);\n-\ts32 (*adjust_systime)(struct fm10k_hw *, s32 ppb);\n-\tu64 (*read_systime)(struct fm10k_hw *);\n };\n \n enum fm10k_mac_type {\n@@ -643,7 +630,6 @@ struct fm10k_iov_ops {\n \ts32 (*set_lport)(struct fm10k_hw *, struct fm10k_vf_info *, u16, u8);\n \tvoid (*reset_lport)(struct fm10k_hw *, struct fm10k_vf_info *);\n \tvoid (*update_stats)(struct fm10k_hw *, struct fm10k_hw_stats_q *, u16);\n-\ts32 (*report_timestamp)(struct fm10k_hw *, struct fm10k_vf_info *, u64);\n };\n \n struct fm10k_iov_info {\n@@ -667,7 +653,6 @@ struct fm10k_info {\n \n struct fm10k_hw {\n \tu32 __iomem *hw_addr;\n-\tu32 __iomem *sw_addr;\n \tvoid *back;\n \tstruct fm10k_mac_info mac;\n \tstruct fm10k_bus_info bus;\ndiff --git a/drivers/net/ethernet/intel/fm10k/fm10k_vf.c b/drivers/net/ethernet/intel/fm10k/fm10k_vf.c\nindex 91f8d7311f3b..86c358c37d3f 100644\n--- a/drivers/net/ethernet/intel/fm10k/fm10k_vf.c\n+++ b/drivers/net/ethernet/intel/fm10k/fm10k_vf.c\n@@ -1,5 +1,5 @@\n /* Intel Ethernet Switch Host Interface Driver\n- * Copyright(c) 2013 - 2015 Intel Corporation.\n+ * Copyright(c) 2013 - 2016 Intel Corporation.\n *\n * This program is free software; you can redistribute it and/or modify it\n * under the terms and conditions of the GNU General Public License,\n@@ -451,13 +451,6 @@ static s32 fm10k_update_xcast_mode_vf(struct fm10k_hw *hw, u16 glort, u8 mode)\n \treturn mbx->ops.enqueue_tx(hw, mbx, msg);\n }\n \n-const struct fm10k_tlv_attr fm10k_1588_msg_attr[] = {\n-\tFM10K_TLV_ATTR_U64(FM10K_1588_MSG_TIMESTAMP),\n-\tFM10K_TLV_ATTR_LAST\n-};\n-\n-/* currently there is no shared 1588 timestamp handler */\n-\n /**\n * fm10k_update_hw_stats_vf - Updates hardware related statistics of VF\n * @hw: pointer to hardware structure\n@@ -509,52 +502,6 @@ static s32 fm10k_configure_dglort_map_vf(struct fm10k_hw *hw,\n \treturn 0;\n }\n \n-/**\n- * fm10k_adjust_systime_vf - Adjust systime frequency\n- * @hw: pointer to hardware structure\n- * @ppb: adjustment rate in parts per billion\n- *\n- * This function takes an adjustment rate in parts per billion and will\n- * verify that this value is 0 as the VF cannot support adjusting the\n- * systime clock.\n- *\n- * If the ppb value is non-zero the return is ERR_PARAM else success\n- **/\n-static s32 fm10k_adjust_systime_vf(struct fm10k_hw *hw, s32 ppb)\n-{\n-\t/* The VF cannot adjust the clock frequency, however it should\n-\t * already have a syntonic clock with whichever host interface is\n-\t * running as the master for the host interface clock domain so\n-\t * there should be not frequency adjustment necessary.\n-\t */\n-\treturn ppb ? FM10K_ERR_PARAM : 0;\n-}\n-\n-/**\n- * fm10k_read_systime_vf - Reads value of systime registers\n- * @hw: pointer to the hardware structure\n- *\n- * Function reads the content of 2 registers, combined to represent a 64 bit\n- * value measured in nanoseconds. In order to guarantee the value is accurate\n- * we check the 32 most significant bits both before and after reading the\n- * 32 least significant bits to verify they didn't change as we were reading\n- * the registers.\n- **/\n-static u64 fm10k_read_systime_vf(struct fm10k_hw *hw)\n-{\n-\tu32 systime_l, systime_h, systime_tmp;\n-\n-\tsystime_h = fm10k_read_reg(hw, FM10K_VFSYSTIME + 1);\n-\n-\tdo {\n-\t\tsystime_tmp = systime_h;\n-\t\tsystime_l = fm10k_read_reg(hw, FM10K_VFSYSTIME);\n-\t\tsystime_h = fm10k_read_reg(hw, FM10K_VFSYSTIME + 1);\n-\t} while (systime_tmp != systime_h);\n-\n-\treturn ((u64)systime_h << 32) | systime_l;\n-}\n-\n static const struct fm10k_msg_data fm10k_msg_data_vf[] = {\n \tFM10K_TLV_MSG_TEST_HANDLER(fm10k_tlv_msg_test),\n \tFM10K_VF_MSG_MAC_VLAN_HANDLER(fm10k_msg_mac_vlan_vf),\n@@ -579,8 +526,6 @@ static const struct fm10k_mac_ops mac_ops_vf = {\n \t.rebind_hw_stats\t= fm10k_rebind_hw_stats_vf,\n \t.configure_dglort_map\t= fm10k_configure_dglort_map_vf,\n \t.get_host_state\t\t= fm10k_get_host_state_generic,\n-\t.adjust_systime\t\t= fm10k_adjust_systime_vf,\n-\t.read_systime\t\t= fm10k_read_systime_vf,\n };\n \n static s32 fm10k_get_invariants_vf(struct fm10k_hw *hw)\ndiff --git a/drivers/net/ethernet/intel/fm10k/fm10k_vf.h b/drivers/net/ethernet/intel/fm10k/fm10k_vf.h\nindex c4439f1313a0..f0932f944793 100644\n--- a/drivers/net/ethernet/intel/fm10k/fm10k_vf.h\n+++ b/drivers/net/ethernet/intel/fm10k/fm10k_vf.h\n@@ -1,5 +1,5 @@\n /* Intel Ethernet Switch Host Interface Driver\n- * Copyright(c) 2013 - 2014 Intel Corporation.\n+ * Copyright(c) 2013 - 2016 Intel Corporation.\n *\n * This program is free software; you can redistribute it and/or modify it\n * under the terms and conditions of the GNU General Public License,\n@@ -29,7 +29,6 @@ enum fm10k_vf_tlv_msg_id {\n \tFM10K_VF_MSG_ID_MSIX,\n \tFM10K_VF_MSG_ID_MAC_VLAN,\n \tFM10K_VF_MSG_ID_LPORT_STATE,\n-\tFM10K_VF_MSG_ID_1588,\n \tFM10K_VF_MSG_ID_MAX,\n };\n \n@@ -49,11 +48,6 @@ enum fm10k_tlv_lport_state_attr_id {\n \tFM10K_LPORT_STATE_MSG_MAX\n };\n \n-enum fm10k_tlv_1588_attr_id {\n-\tFM10K_1588_MSG_TIMESTAMP,\n-\tFM10K_1588_MSG_MAX\n-};\n-\n #define FM10K_VF_MSG_MSIX_HANDLER(func) \\\n \t FM10K_MSG_HANDLER(FM10K_VF_MSG_ID_MSIX, NULL, func)\n \n@@ -70,9 +64,5 @@ extern const struct fm10k_tlv_attr fm10k_lport_state_msg_attr[];\n \tFM10K_MSG_HANDLER(FM10K_VF_MSG_ID_LPORT_STATE, \\\n \t\t\t fm10k_lport_state_msg_attr, func)\n \n-extern const struct fm10k_tlv_attr fm10k_1588_msg_attr[];\n-#define FM10K_VF_MSG_1588_HANDLER(func) \\\n-\tFM10K_MSG_HANDLER(FM10K_VF_MSG_ID_1588, fm10k_1588_msg_attr, func)\n-\n extern const struct fm10k_info fm10k_vf_info;\n #endif /* _FM10K_VF_H */\n", "prefixes": [ "v1", "1/9" ] }