get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/603184/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 603184,
    "url": "http://patchwork.ozlabs.org/api/patches/603184/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20160329235740.68428.75781.stgit@mdrustad-wks.jf.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": "<20160329235740.68428.75781.stgit@mdrustad-wks.jf.intel.com>",
    "list_archive_url": null,
    "date": "2016-03-29T23:57:40",
    "name": "[V4,03/11] ixgbe: Add support for x550em_a 10G MAC type",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "73e7ef4361dbb2c306169fe207593e202d94e745",
    "submitter": {
        "id": 13252,
        "url": "http://patchwork.ozlabs.org/api/people/13252/?format=api",
        "name": "Rustad, Mark D",
        "email": "mark.d.rustad@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/20160329235740.68428.75781.stgit@mdrustad-wks.jf.intel.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/603184/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/603184/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 fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ozlabs.org (Postfix) with ESMTP id 3qZSQ31L1wz9s5g\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 30 Mar 2016 10:57:47 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 75CF989F88;\n\tTue, 29 Mar 2016 23:57:46 +0000 (UTC)",
            "from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id UganvRBUM2MH; Tue, 29 Mar 2016 23:57:43 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id B36C789ECE;\n\tTue, 29 Mar 2016 23:57:43 +0000 (UTC)",
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 536981C2BB2\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 29 Mar 2016 23:57:43 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 4B7AE8AD0E\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 29 Mar 2016 23:57:43 +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 KE2QzXXgKSnq for <intel-wired-lan@lists.osuosl.org>;\n\tTue, 29 Mar 2016 23:57:41 +0000 (UTC)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 695AF8AD1E\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 29 Mar 2016 23:57:41 +0000 (UTC)",
            "from fmsmga002.fm.intel.com ([10.253.24.26])\n\tby fmsmga104.fm.intel.com with ESMTP; 29 Mar 2016 16:57:42 -0700",
            "from mdrustad-wks.jf.intel.com ([134.134.3.71])\n\tby fmsmga002.fm.intel.com with ESMTP; 29 Mar 2016 16:57: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,413,1455004800\"; d=\"scan'208\";a=\"947627872\"",
        "From": "Mark D Rustad <mark.d.rustad@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Tue, 29 Mar 2016 16:57:40 -0700",
        "Message-ID": "<20160329235740.68428.75781.stgit@mdrustad-wks.jf.intel.com>",
        "In-Reply-To": "<20160329235544.68428.93935.stgit@mdrustad-wks.jf.intel.com>",
        "References": "<20160329235544.68428.93935.stgit@mdrustad-wks.jf.intel.com>",
        "User-Agent": "StGit/unknown-version",
        "MIME-Version": "1.0",
        "Subject": "[Intel-wired-lan] [PATCH V4 03/11] ixgbe: Add support for x550em_a\n\t10G MAC type",
        "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>",
        "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": "Add support for x550em_a 10G MAC type to the ixgbe driver. The new\nMAC includes new firmware commands that need to be used to control\nPHY and IOSF access, so that support is also added. The interface\nsupported is a native SFP+ interface.\n\nSigned-off-by: Mark Rustad <mark.d.rustad@intel.com>\n---\nChanges in V2:\n- Correct endianness of firmware interface for iosf read/write data\n---\n drivers/net/ethernet/intel/ixgbe/ixgbe.h         |    3 \n drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c   |    1 \n drivers/net/ethernet/intel/ixgbe/ixgbe_common.c  |    1 \n drivers/net/ethernet/intel/ixgbe/ixgbe_dcb.c     |    6 +\n drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c |    9 +\n drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c     |    3 \n drivers/net/ethernet/intel/ixgbe/ixgbe_main.c    |   43 ++++-\n drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c     |    2 \n drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c     |    6 +\n drivers/net/ethernet/intel/ixgbe/ixgbe_type.h    |   38 ++++\n drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c    |  208 ++++++++++++++++++++++\n 11 files changed, 311 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h\nindex 4590fabdedf0..d10ed62993c1 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h\n@@ -817,6 +817,7 @@ static inline u8 ixgbe_max_rss_indices(struct ixgbe_adapter *adapter)\n \t\treturn IXGBE_MAX_RSS_INDICES;\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \t\treturn IXGBE_MAX_RSS_INDICES_X550;\n \tdefault:\n \t\treturn 0;\n@@ -860,6 +861,7 @@ enum ixgbe_boards {\n \tboard_X540,\n \tboard_X550,\n \tboard_X550EM_x,\n+\tboard_x550em_a,\n };\n \n extern const struct ixgbe_info ixgbe_82598_info;\n@@ -867,6 +869,7 @@ extern const struct ixgbe_info ixgbe_82599_info;\n extern const struct ixgbe_info ixgbe_X540_info;\n extern const struct ixgbe_info ixgbe_X550_info;\n extern const struct ixgbe_info ixgbe_X550EM_x_info;\n+extern const struct ixgbe_info ixgbe_x550em_a_info;\n #ifdef CONFIG_IXGBE_DCB\n extern const struct dcbnl_rtnl_ops dcbnl_ops;\n #endif\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c\nindex 4bb6b685263b..01519787324a 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c\n@@ -1633,6 +1633,7 @@ s32 ixgbe_fdir_set_input_mask_82599(struct ixgbe_hw *hw,\n \tswitch (hw->mac.type) {\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \t\tIXGBE_WRITE_REG(hw, IXGBE_FDIRSCTPM, ~fdirtcpm);\n \t\tbreak;\n \tdefault:\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c\nindex ee43a383aa0a..76080310fc6b 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c\n@@ -2854,6 +2854,7 @@ u16 ixgbe_get_pcie_msix_count_generic(struct ixgbe_hw *hw)\n \tcase ixgbe_mac_X540:\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \t\tpcie_offset = IXGBE_PCIE_MSIX_82599_CAPS;\n \t\tmax_msix_count = IXGBE_MAX_MSIX_VECTORS_82599;\n \t\tbreak;\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb.c\nindex 02c7333a9c83..f8fb2acc2632 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb.c\n@@ -1,7 +1,7 @@\n /*******************************************************************************\n \n   Intel 10 Gigabit PCI Express Linux driver\n-  Copyright(c) 1999 - 2014 Intel Corporation.\n+  Copyright(c) 1999 - 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@@ -293,6 +293,7 @@ s32 ixgbe_dcb_hw_config(struct ixgbe_hw *hw,\n \tcase ixgbe_mac_X540:\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \t\treturn ixgbe_dcb_hw_config_82599(hw, pfc_en, refill, max,\n \t\t\t\t\t\t bwgid, ptype, prio_tc);\n \tdefault:\n@@ -311,6 +312,7 @@ s32 ixgbe_dcb_hw_pfc_config(struct ixgbe_hw *hw, u8 pfc_en, u8 *prio_tc)\n \tcase ixgbe_mac_X540:\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \t\treturn ixgbe_dcb_config_pfc_82599(hw, pfc_en, prio_tc);\n \tdefault:\n \t\tbreak;\n@@ -368,6 +370,7 @@ s32 ixgbe_dcb_hw_ets_config(struct ixgbe_hw *hw,\n \tcase ixgbe_mac_X540:\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \t\tixgbe_dcb_config_rx_arbiter_82599(hw, refill, max,\n \t\t\t\t\t\t  bwg_id, prio_type, prio_tc);\n \t\tixgbe_dcb_config_tx_desc_arbiter_82599(hw, refill, max,\n@@ -398,6 +401,7 @@ void ixgbe_dcb_read_rtrup2tc(struct ixgbe_hw *hw, u8 *map)\n \tcase ixgbe_mac_X540:\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \t\tixgbe_dcb_read_rtrup2tc_82599(hw, map);\n \t\tbreak;\n \tdefault:\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c\nindex fd130f63b321..8e7c6d4961e6 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c\n@@ -1,7 +1,7 @@\n /*******************************************************************************\n \n   Intel 10 Gigabit PCI Express Linux driver\n-  Copyright(c) 1999 - 2014 Intel Corporation.\n+  Copyright(c) 1999 - 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@@ -549,6 +549,7 @@ static void ixgbe_get_regs(struct net_device *netdev,\n \t\tcase ixgbe_mac_X540:\n \t\tcase ixgbe_mac_X550:\n \t\tcase ixgbe_mac_X550EM_x:\n+\t\tcase ixgbe_mac_x550em_a:\n \t\t\tregs_buff[35 + i] = IXGBE_READ_REG(hw, IXGBE_FCRTL_82599(i));\n \t\t\tregs_buff[43 + i] = IXGBE_READ_REG(hw, IXGBE_FCRTH_82599(i));\n \t\t\tbreak;\n@@ -662,6 +663,7 @@ static void ixgbe_get_regs(struct net_device *netdev,\n \tcase ixgbe_mac_X540:\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \t\tregs_buff[830] = IXGBE_READ_REG(hw, IXGBE_RTTDCS);\n \t\tregs_buff[832] = IXGBE_READ_REG(hw, IXGBE_RTRPCS);\n \t\tfor (i = 0; i < 8; i++)\n@@ -1445,6 +1447,7 @@ static int ixgbe_reg_test(struct ixgbe_adapter *adapter, u64 *data)\n \tcase ixgbe_mac_X540:\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \t\ttoggle = 0x7FFFF30F;\n \t\ttest = reg_test_82599;\n \t\tbreak;\n@@ -1683,6 +1686,7 @@ static void ixgbe_free_desc_rings(struct ixgbe_adapter *adapter)\n \tcase ixgbe_mac_X540:\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \t\treg_ctl = IXGBE_READ_REG(hw, IXGBE_DMATXCTL);\n \t\treg_ctl &= ~IXGBE_DMATXCTL_TE;\n \t\tIXGBE_WRITE_REG(hw, IXGBE_DMATXCTL, reg_ctl);\n@@ -1722,6 +1726,7 @@ static int ixgbe_setup_desc_rings(struct ixgbe_adapter *adapter)\n \tcase ixgbe_mac_X540:\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \t\treg_data = IXGBE_READ_REG(&adapter->hw, IXGBE_DMATXCTL);\n \t\treg_data |= IXGBE_DMATXCTL_TE;\n \t\tIXGBE_WRITE_REG(&adapter->hw, IXGBE_DMATXCTL, reg_data);\n@@ -1782,6 +1787,7 @@ static int ixgbe_setup_loopback_test(struct ixgbe_adapter *adapter)\n \tcase ixgbe_mac_X540:\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \t\treg_data = IXGBE_READ_REG(hw, IXGBE_MACC);\n \t\treg_data |= IXGBE_MACC_FLU;\n \t\tIXGBE_WRITE_REG(hw, IXGBE_MACC, reg_data);\n@@ -2993,6 +2999,7 @@ static int ixgbe_get_ts_info(struct net_device *dev,\n \tswitch (adapter->hw.mac.type) {\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \tcase ixgbe_mac_X540:\n \tcase ixgbe_mac_82599EB:\n \t\tinfo->so_timestamping =\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c\nindex e771e764daa3..bcdc88444ceb 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c\n@@ -1,7 +1,7 @@\n /*******************************************************************************\n \n   Intel 10 Gigabit PCI Express Linux driver\n-  Copyright(c) 1999 - 2013 Intel Corporation.\n+  Copyright(c) 1999 - 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@@ -128,6 +128,7 @@ static void ixgbe_get_first_reg_idx(struct ixgbe_adapter *adapter, u8 tc,\n \tcase ixgbe_mac_X540:\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \t\tif (num_tcs > 4) {\n \t\t\t/*\n \t\t\t * TCs    : TC0/1 TC2/3 TC4-7\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\nindex 59b43ce200be..ec57c2728b24 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n@@ -73,7 +73,7 @@ static char ixgbe_default_device_descr[] =\n #define DRV_VERSION \"4.2.1-k\"\n const char ixgbe_driver_version[] = DRV_VERSION;\n static const char ixgbe_copyright[] =\n-\t\t\t\t\"Copyright (c) 1999-2015 Intel Corporation.\";\n+\t\t\t\t\"Copyright (c) 1999-2016 Intel Corporation.\";\n \n static const char ixgbe_overheat_msg[] = \"Network adapter has been stopped because it has over heated. Restart the computer. If the problem persists, power off the system and replace the adapter\";\n \n@@ -83,6 +83,7 @@ static const struct ixgbe_info *ixgbe_info_tbl[] = {\n \t[board_X540]\t\t= &ixgbe_X540_info,\n \t[board_X550]\t\t= &ixgbe_X550_info,\n \t[board_X550EM_x]\t= &ixgbe_X550EM_x_info,\n+\t[board_x550em_a]\t= &ixgbe_x550em_a_info,\n };\n \n /* ixgbe_pci_tbl - PCI Device ID Table\n@@ -129,6 +130,7 @@ static const struct pci_device_id ixgbe_pci_tbl[] = {\n \t{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_X_KR), board_X550EM_x},\n \t{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_X_10G_T), board_X550EM_x},\n \t{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_X_SFP), board_X550EM_x},\n+\t{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_A_SFP_N), board_x550em_a },\n \t/* required last entry */\n \t{0, }\n };\n@@ -860,6 +862,7 @@ static void ixgbe_set_ivar(struct ixgbe_adapter *adapter, s8 direction,\n \tcase ixgbe_mac_X540:\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \t\tif (direction == -1) {\n \t\t\t/* other causes */\n \t\t\tmsix_vector |= IXGBE_IVAR_ALLOC_VAL;\n@@ -898,6 +901,7 @@ static inline void ixgbe_irq_rearm_queues(struct ixgbe_adapter *adapter,\n \tcase ixgbe_mac_X540:\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \t\tmask = (qmask & 0xFFFFFFFF);\n \t\tIXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS_EX(0), mask);\n \t\tmask = (qmask >> 32);\n@@ -2244,6 +2248,7 @@ static void ixgbe_configure_msix(struct ixgbe_adapter *adapter)\n \tcase ixgbe_mac_X540:\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \t\tixgbe_set_ivar(adapter, -1, 1, v_idx);\n \t\tbreak;\n \tdefault:\n@@ -2355,6 +2360,7 @@ void ixgbe_write_eitr(struct ixgbe_q_vector *q_vector)\n \tcase ixgbe_mac_X540:\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \t\t/*\n \t\t * set the WDIS bit to not clear the timer bits and cause an\n \t\t * immediate assertion of the interrupt\n@@ -2516,6 +2522,7 @@ static inline bool ixgbe_is_sfp(struct ixgbe_hw *hw)\n \t\treturn false;\n \tcase ixgbe_mac_82599EB:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \t\tswitch (hw->mac.ops.get_media_type(hw)) {\n \t\tcase ixgbe_media_type_fiber:\n \t\tcase ixgbe_media_type_fiber_qsfp:\n@@ -2590,6 +2597,7 @@ static inline void ixgbe_irq_enable_queues(struct ixgbe_adapter *adapter,\n \tcase ixgbe_mac_X540:\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \t\tmask = (qmask & 0xFFFFFFFF);\n \t\tif (mask)\n \t\t\tIXGBE_WRITE_REG(hw, IXGBE_EIMS_EX(0), mask);\n@@ -2618,6 +2626,7 @@ static inline void ixgbe_irq_disable_queues(struct ixgbe_adapter *adapter,\n \tcase ixgbe_mac_X540:\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \t\tmask = (qmask & 0xFFFFFFFF);\n \t\tif (mask)\n \t\t\tIXGBE_WRITE_REG(hw, IXGBE_EIMC_EX(0), mask);\n@@ -2653,6 +2662,7 @@ static inline void ixgbe_irq_enable(struct ixgbe_adapter *adapter, bool queues,\n \t\tcase ixgbe_mac_X540:\n \t\tcase ixgbe_mac_X550:\n \t\tcase ixgbe_mac_X550EM_x:\n+\t\tcase ixgbe_mac_x550em_a:\n \t\t\tmask |= IXGBE_EIMS_TS;\n \t\t\tbreak;\n \t\tdefault:\n@@ -2668,7 +2678,9 @@ static inline void ixgbe_irq_enable(struct ixgbe_adapter *adapter, bool queues,\n \tcase ixgbe_mac_X540:\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n-\t\tif (adapter->hw.device_id == IXGBE_DEV_ID_X550EM_X_SFP)\n+\tcase ixgbe_mac_x550em_a:\n+\t\tif (adapter->hw.device_id == IXGBE_DEV_ID_X550EM_X_SFP ||\n+\t\t    adapter->hw.device_id == IXGBE_DEV_ID_X550EM_A_SFP_N)\n \t\t\tmask |= IXGBE_EIMS_GPI_SDP0(&adapter->hw);\n \t\tif (adapter->hw.phy.type == ixgbe_phy_x550em_ext_t)\n \t\t\tmask |= IXGBE_EICR_GPI_SDP0_X540;\n@@ -2726,6 +2738,7 @@ static irqreturn_t ixgbe_msix_other(int irq, void *data)\n \tcase ixgbe_mac_X540:\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \t\tif (hw->phy.type == ixgbe_phy_x550em_ext_t &&\n \t\t    (eicr & IXGBE_EICR_GPI_SDP0_X540)) {\n \t\t\tadapter->flags2 |= IXGBE_FLAG2_PHY_INTERRUPT;\n@@ -2962,6 +2975,7 @@ static irqreturn_t ixgbe_intr(int irq, void *data)\n \tcase ixgbe_mac_X540:\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \t\tif (eicr & IXGBE_EICR_ECC) {\n \t\t\te_info(link, \"Received ECC Err, initiating reset\\n\");\n \t\t\tadapter->flags2 |= IXGBE_FLAG2_RESET_REQUESTED;\n@@ -3058,6 +3072,7 @@ static inline void ixgbe_irq_disable(struct ixgbe_adapter *adapter)\n \tcase ixgbe_mac_X540:\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \t\tIXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC, 0xFFFF0000);\n \t\tIXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC_EX(0), ~0);\n \t\tIXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC_EX(1), ~0);\n@@ -3857,6 +3872,7 @@ static void ixgbe_setup_rdrxctl(struct ixgbe_adapter *adapter)\n \t\tbreak;\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \t\tif (adapter->num_vfs)\n \t\t\trdrxctl |= IXGBE_RDRXCTL_PSP;\n \t\t/* fall through for older HW */\n@@ -4020,6 +4036,7 @@ static void ixgbe_vlan_strip_disable(struct ixgbe_adapter *adapter)\n \tcase ixgbe_mac_X540:\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \t\tfor (i = 0; i < adapter->num_rx_queues; i++) {\n \t\t\tstruct ixgbe_ring *ring = adapter->rx_ring[i];\n \n@@ -4056,6 +4073,7 @@ static void ixgbe_vlan_strip_enable(struct ixgbe_adapter *adapter)\n \tcase ixgbe_mac_X540:\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \t\tfor (i = 0; i < adapter->num_rx_queues; i++) {\n \t\t\tstruct ixgbe_ring *ring = adapter->rx_ring[i];\n \n@@ -4082,6 +4100,7 @@ static void ixgbe_vlan_promisc_enable(struct ixgbe_adapter *adapter)\n \tcase ixgbe_mac_X540:\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \tdefault:\n \t\tif (adapter->flags & IXGBE_FLAG_VMDQ_ENABLED)\n \t\t\tbreak;\n@@ -4172,6 +4191,7 @@ static void ixgbe_vlan_promisc_disable(struct ixgbe_adapter *adapter)\n \tcase ixgbe_mac_X540:\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \tdefault:\n \t\tif (adapter->flags & IXGBE_FLAG_VMDQ_ENABLED)\n \t\t\tbreak;\n@@ -4560,6 +4580,7 @@ static void ixgbe_clear_vxlan_port(struct ixgbe_adapter *adapter)\n \tswitch (adapter->hw.mac.type) {\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \t\tIXGBE_WRITE_REG(&adapter->hw, IXGBE_VXLANCTRL, 0);\n \t\tadapter->vxlan_port = 0;\n \t\tbreak;\n@@ -4660,6 +4681,7 @@ static int ixgbe_hpbthresh(struct ixgbe_adapter *adapter, int pb)\n \tcase ixgbe_mac_X540:\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \t\tdv_id = IXGBE_DV_X540(link, tc);\n \t\tbreak;\n \tdefault:\n@@ -4720,6 +4742,7 @@ static int ixgbe_lpbthresh(struct ixgbe_adapter *adapter, int pb)\n \tcase ixgbe_mac_X540:\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \t\tdv_id = IXGBE_LOW_DV_X540(tc);\n \t\tbreak;\n \tdefault:\n@@ -5136,6 +5159,7 @@ static void ixgbe_setup_gpie(struct ixgbe_adapter *adapter)\n \t\tcase ixgbe_mac_X540:\n \t\tcase ixgbe_mac_X550:\n \t\tcase ixgbe_mac_X550EM_x:\n+\t\tcase ixgbe_mac_x550em_a:\n \t\tdefault:\n \t\t\tIXGBE_WRITE_REG(hw, IXGBE_EIAM_EX(0), 0xFFFFFFFF);\n \t\t\tIXGBE_WRITE_REG(hw, IXGBE_EIAM_EX(1), 0xFFFFFFFF);\n@@ -5186,6 +5210,7 @@ static void ixgbe_setup_gpie(struct ixgbe_adapter *adapter)\n \t\tgpie |= IXGBE_SDP1_GPIEN_8259X | IXGBE_SDP2_GPIEN_8259X;\n \t\tbreak;\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \t\tgpie |= IXGBE_SDP0_GPIEN_X540;\n \t\tbreak;\n \tdefault:\n@@ -5497,6 +5522,7 @@ void ixgbe_down(struct ixgbe_adapter *adapter)\n \tcase ixgbe_mac_X540:\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \t\tIXGBE_WRITE_REG(hw, IXGBE_DMATXCTL,\n \t\t\t\t(IXGBE_READ_REG(hw, IXGBE_DMATXCTL) &\n \t\t\t\t ~IXGBE_DMATXCTL_TE));\n@@ -5615,6 +5641,7 @@ static int ixgbe_sw_init(struct ixgbe_adapter *adapter)\n \t\t\tadapter->flags2 |= IXGBE_FLAG2_TEMP_SENSOR_CAPABLE;\n \t\tbreak;\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \tcase ixgbe_mac_X550:\n #ifdef CONFIG_IXGBE_DCA\n \t\tadapter->flags &= ~IXGBE_FLAG_DCA_CAPABLE;\n@@ -5640,6 +5667,7 @@ static int ixgbe_sw_init(struct ixgbe_adapter *adapter)\n \tcase ixgbe_mac_X540:\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \t\tadapter->dcb_cfg.num_tcs.pg_tcs = X540_TRAFFIC_CLASS;\n \t\tadapter->dcb_cfg.num_tcs.pfc_tcs = X540_TRAFFIC_CLASS;\n \t\tbreak;\n@@ -6247,6 +6275,7 @@ static int __ixgbe_shutdown(struct pci_dev *pdev, bool *enable_wake)\n \tcase ixgbe_mac_X540:\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \t\tpci_wake_from_d3(pdev, !!wufc);\n \t\tbreak;\n \tdefault:\n@@ -6382,6 +6411,7 @@ void ixgbe_update_stats(struct ixgbe_adapter *adapter)\n \t\tcase ixgbe_mac_X540:\n \t\tcase ixgbe_mac_X550:\n \t\tcase ixgbe_mac_X550EM_x:\n+\t\tcase ixgbe_mac_x550em_a:\n \t\t\thwstats->pxonrxc[i] +=\n \t\t\t\tIXGBE_READ_REG(hw, IXGBE_PXONRXCNT(i));\n \t\t\tbreak;\n@@ -6397,7 +6427,8 @@ void ixgbe_update_stats(struct ixgbe_adapter *adapter)\n \t\tif ((hw->mac.type == ixgbe_mac_82599EB) ||\n \t\t    (hw->mac.type == ixgbe_mac_X540) ||\n \t\t    (hw->mac.type == ixgbe_mac_X550) ||\n-\t\t    (hw->mac.type == ixgbe_mac_X550EM_x)) {\n+\t\t    (hw->mac.type == ixgbe_mac_X550EM_x) ||\n+\t\t    (hw->mac.type == ixgbe_mac_x550em_a)) {\n \t\t\thwstats->qbtc[i] += IXGBE_READ_REG(hw, IXGBE_QBTC_L(i));\n \t\t\tIXGBE_READ_REG(hw, IXGBE_QBTC_H(i)); /* to clear */\n \t\t\thwstats->qbrc[i] += IXGBE_READ_REG(hw, IXGBE_QBRC_L(i));\n@@ -6422,6 +6453,7 @@ void ixgbe_update_stats(struct ixgbe_adapter *adapter)\n \tcase ixgbe_mac_X540:\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \t\t/* OS2BMC stats are X540 and later */\n \t\thwstats->o2bgptc += IXGBE_READ_REG(hw, IXGBE_O2BGPTC);\n \t\thwstats->o2bspc += IXGBE_READ_REG(hw, IXGBE_O2BSPC);\n@@ -6692,6 +6724,7 @@ static void ixgbe_watchdog_link_is_up(struct ixgbe_adapter *adapter)\n \tcase ixgbe_mac_X540:\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \tcase ixgbe_mac_82599EB: {\n \t\tu32 mflcn = IXGBE_READ_REG(hw, IXGBE_MFLCN);\n \t\tu32 fccfg = IXGBE_READ_REG(hw, IXGBE_FCCFG);\n@@ -9144,6 +9177,7 @@ static int ixgbe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)\n \tcase ixgbe_mac_X540:\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \t\tIXGBE_WRITE_REG(&adapter->hw, IXGBE_WUS, ~0);\n \t\tbreak;\n \tdefault:\n@@ -9576,6 +9610,9 @@ static pci_ers_result_t ixgbe_io_error_detected(struct pci_dev *pdev,\n \t\tcase ixgbe_mac_X550EM_x:\n \t\t\tdevice_id = IXGBE_DEV_ID_X550EM_X_VF;\n \t\t\tbreak;\n+\t\tcase ixgbe_mac_x550em_a:\n+\t\t\tdevice_id = IXGBE_DEV_ID_X550EM_A_VF;\n+\t\t\tbreak;\n \t\tdefault:\n \t\t\tdevice_id = 0;\n \t\t\tbreak;\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c\nindex 2837c94d6e35..b2125e358f7b 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c\n@@ -307,6 +307,7 @@ static s32 ixgbe_check_for_rst_pf(struct ixgbe_hw *hw, u16 vf_number)\n \tcase ixgbe_mac_X540:\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \t\tvflre = IXGBE_READ_REG(hw, IXGBE_VFLREC(reg_offset));\n \t\tbreak;\n \tdefault:\n@@ -430,6 +431,7 @@ void ixgbe_init_mbx_params_pf(struct ixgbe_hw *hw)\n \tif (hw->mac.type != ixgbe_mac_82599EB &&\n \t    hw->mac.type != ixgbe_mac_X550 &&\n \t    hw->mac.type != ixgbe_mac_X550EM_x &&\n+\t    hw->mac.type != ixgbe_mac_x550em_a &&\n \t    hw->mac.type != ixgbe_mac_X540)\n \t\treturn;\n \ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c\nindex ef1504d41890..bdc8fdcc07a5 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c\n@@ -1,7 +1,7 @@\n /*******************************************************************************\n \n   Intel 10 Gigabit PCI Express Linux driver\n-  Copyright(c) 1999 - 2015 Intel Corporation.\n+  Copyright(c) 1999 - 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@@ -333,6 +333,7 @@ static void ixgbe_ptp_convert_to_hwtstamp(struct ixgbe_adapter *adapter,\n \t */\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \t\t/* Upper 32 bits represent billions of cycles, lower 32 bits\n \t\t * represent cycles. However, we use timespec64_to_ns for the\n \t\t * correct math even though the units haven't been corrected\n@@ -921,6 +922,7 @@ static int ixgbe_ptp_set_timestamp_mode(struct ixgbe_adapter *adapter,\n \tswitch (hw->mac.type) {\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \t\t/* enable timestamping all packets only if at least some\n \t\t * packets were requested. Otherwise, play nice and disable\n \t\t * timestamping\n@@ -1083,6 +1085,7 @@ void ixgbe_ptp_start_cyclecounter(struct ixgbe_adapter *adapter)\n \t\t\tcc.shift = 2;\n \t\t}\n \t\t/* fallthrough */\n+\tcase ixgbe_mac_x550em_a:\n \tcase ixgbe_mac_X550:\n \t\tcc.read = ixgbe_ptp_read_X550;\n \n@@ -1223,6 +1226,7 @@ static long ixgbe_ptp_create_clock(struct ixgbe_adapter *adapter)\n \t\tbreak;\n \tcase ixgbe_mac_X550:\n \tcase ixgbe_mac_X550EM_x:\n+\tcase ixgbe_mac_x550em_a:\n \t\tsnprintf(adapter->ptp_caps.name, 16, \"%s\", netdev->name);\n \t\tadapter->ptp_caps.owner = THIS_MODULE;\n \t\tadapter->ptp_caps.max_adj = 30000000;\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h\nindex 71b2757a70a5..f6d02c254b6e 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h\n@@ -2626,6 +2626,20 @@ enum ixgbe_fdir_pballoc_type {\n #define FW_MAX_READ_BUFFER_SIZE\t\t1024\n #define FW_DISABLE_RXEN_CMD\t\t0xDE\n #define FW_DISABLE_RXEN_LEN\t\t0x1\n+#define FW_PHY_MGMT_REQ_CMD\t\t0x20\n+#define FW_PHY_TOKEN_REQ_CMD\t\t0x0A\n+#define FW_PHY_TOKEN_REQ_LEN\t\t2\n+#define FW_PHY_TOKEN_REQ\t\t0\n+#define FW_PHY_TOKEN_REL\t\t1\n+#define FW_PHY_TOKEN_OK\t\t\t1\n+#define FW_PHY_TOKEN_RETRY\t\t0x80\n+#define FW_PHY_TOKEN_DELAY\t\t5\t/* milliseconds */\n+#define FW_PHY_TOKEN_WAIT\t\t5\t/* seconds */\n+#define FW_PHY_TOKEN_RETRIES ((FW_PHY_TOKEN_WAIT * 1000) / FW_PHY_TOKEN_DELAY)\n+#define FW_INT_PHY_REQ_CMD\t\t0xB\n+#define FW_INT_PHY_REQ_LEN\t\t10\n+#define FW_INT_PHY_REQ_READ\t\t0\n+#define FW_INT_PHY_REQ_WRITE\t\t1\n \n /* Host Interface Command Structures */\n struct ixgbe_hic_hdr {\n@@ -2694,6 +2708,28 @@ struct ixgbe_hic_disable_rxen {\n \tu16 pad3;\n };\n \n+struct ixgbe_hic_phy_token_req {\n+\tstruct ixgbe_hic_hdr hdr;\n+\tu8 port_number;\n+\tu8 command_type;\n+\tu16 pad;\n+};\n+\n+struct ixgbe_hic_internal_phy_req {\n+\tstruct ixgbe_hic_hdr hdr;\n+\tu8 port_number;\n+\tu8 command_type;\n+\t__be16 address;\n+\tu16 rsv1;\n+\t__le32 write_data;\n+\tu16 pad;\n+} __packed;\n+\n+struct ixgbe_hic_internal_phy_resp {\n+\tstruct ixgbe_hic_hdr hdr;\n+\t__le32 read_data;\n+};\n+\n /* Transmit Descriptor - Advanced */\n union ixgbe_adv_tx_desc {\n \tstruct {\n@@ -3527,6 +3563,8 @@ struct ixgbe_info {\n #define IXGBE_ERR_INVALID_ARGUMENT              -32\n #define IXGBE_ERR_HOST_INTERFACE_COMMAND        -33\n #define IXGBE_ERR_FDIR_CMD_INCOMPLETE\t\t-38\n+#define IXGBE_ERR_FW_RESP_INVALID\t\t-39\n+#define IXGBE_ERR_TOKEN_RETRY\t\t\t-40\n #define IXGBE_NOT_IMPLEMENTED                   0x7FFFFFFF\n \n #define IXGBE_FUSES0_GROUP(_i)\t\t(0x11158 + ((_i) * 4))\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c\nindex 878ea1ed87b4..ee925854c999 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c\n@@ -278,6 +278,8 @@ static s32 ixgbe_identify_phy_x550em(struct ixgbe_hw *hw)\n \t\thw->phy.phy_semaphore_mask = IXGBE_GSSR_SHARED_I2C_SM;\n \t\tixgbe_setup_mux_ctl(hw);\n \t\tixgbe_check_cs4227(hw);\n+\t\t/* Fallthrough */\n+\tcase IXGBE_DEV_ID_X550EM_A_SFP_N:\n \t\treturn ixgbe_identify_module_generic(hw);\n \tcase IXGBE_DEV_ID_X550EM_X_KX4:\n \t\thw->phy.type = ixgbe_phy_x550em_kx4;\n@@ -413,6 +415,121 @@ out:\n \treturn ret;\n }\n \n+/**\n+ * ixgbe_get_phy_token - Get the token for shared PHY access\n+ * @hw: Pointer to hardware structure\n+ */\n+static s32 ixgbe_get_phy_token(struct ixgbe_hw *hw)\n+{\n+\tstruct ixgbe_hic_phy_token_req token_cmd;\n+\ts32 status;\n+\n+\ttoken_cmd.hdr.cmd = FW_PHY_TOKEN_REQ_CMD;\n+\ttoken_cmd.hdr.buf_len = FW_PHY_TOKEN_REQ_LEN;\n+\ttoken_cmd.hdr.cmd_or_resp.cmd_resv = 0;\n+\ttoken_cmd.hdr.checksum = FW_DEFAULT_CHECKSUM;\n+\ttoken_cmd.port_number = hw->bus.lan_id;\n+\ttoken_cmd.command_type = FW_PHY_TOKEN_REQ;\n+\ttoken_cmd.pad = 0;\n+\tstatus = ixgbe_host_interface_command(hw, &token_cmd, sizeof(token_cmd),\n+\t\t\t\t\t      IXGBE_HI_COMMAND_TIMEOUT,\n+\t\t\t\t\t      true);\n+\tif (status)\n+\t\treturn status;\n+\tif (token_cmd.hdr.cmd_or_resp.ret_status == FW_PHY_TOKEN_OK)\n+\t\treturn 0;\n+\tif (token_cmd.hdr.cmd_or_resp.ret_status != FW_PHY_TOKEN_RETRY)\n+\t\treturn IXGBE_ERR_FW_RESP_INVALID;\n+\n+\treturn IXGBE_ERR_TOKEN_RETRY;\n+}\n+\n+/**\n+ * ixgbe_put_phy_token - Put the token for shared PHY access\n+ * @hw: Pointer to hardware structure\n+ */\n+static s32 ixgbe_put_phy_token(struct ixgbe_hw *hw)\n+{\n+\tstruct ixgbe_hic_phy_token_req token_cmd;\n+\ts32 status;\n+\n+\ttoken_cmd.hdr.cmd = FW_PHY_TOKEN_REQ_CMD;\n+\ttoken_cmd.hdr.buf_len = FW_PHY_TOKEN_REQ_LEN;\n+\ttoken_cmd.hdr.cmd_or_resp.cmd_resv = 0;\n+\ttoken_cmd.hdr.checksum = FW_DEFAULT_CHECKSUM;\n+\ttoken_cmd.port_number = hw->bus.lan_id;\n+\ttoken_cmd.command_type = FW_PHY_TOKEN_REL;\n+\ttoken_cmd.pad = 0;\n+\tstatus = ixgbe_host_interface_command(hw, &token_cmd, sizeof(token_cmd),\n+\t\t\t\t\t      IXGBE_HI_COMMAND_TIMEOUT,\n+\t\t\t\t\t      true);\n+\tif (status)\n+\t\treturn status;\n+\tif (token_cmd.hdr.cmd_or_resp.ret_status == FW_PHY_TOKEN_OK)\n+\t\treturn 0;\n+\treturn IXGBE_ERR_FW_RESP_INVALID;\n+}\n+\n+/**\n+ *  ixgbe_write_iosf_sb_reg_x550a - Write to IOSF PHY register\n+ *  @hw: pointer to hardware structure\n+ *  @reg_addr: 32 bit PHY register to write\n+ *  @device_type: 3 bit device type\n+ *  @data: Data to write to the register\n+ **/\n+static s32 ixgbe_write_iosf_sb_reg_x550a(struct ixgbe_hw *hw, u32 reg_addr,\n+\t\t\t\t\t __always_unused u32 device_type,\n+\t\t\t\t\t u32 data)\n+{\n+\tstruct ixgbe_hic_internal_phy_req write_cmd;\n+\n+\tmemset(&write_cmd, 0, sizeof(write_cmd));\n+\twrite_cmd.hdr.cmd = FW_INT_PHY_REQ_CMD;\n+\twrite_cmd.hdr.buf_len = FW_INT_PHY_REQ_LEN;\n+\twrite_cmd.hdr.checksum = FW_DEFAULT_CHECKSUM;\n+\twrite_cmd.port_number = hw->bus.lan_id;\n+\twrite_cmd.command_type = FW_INT_PHY_REQ_WRITE;\n+\twrite_cmd.address = cpu_to_be16(reg_addr);\n+\twrite_cmd.write_data = cpu_to_le32(data);\n+\n+\treturn ixgbe_host_interface_command(hw, &write_cmd, sizeof(write_cmd),\n+\t\t\t\t\t    IXGBE_HI_COMMAND_TIMEOUT, false);\n+}\n+\n+/**\n+ *  ixgbe_read_iosf_sb_reg_x550a - Read from IOSF PHY register\n+ *  @hw: pointer to hardware structure\n+ *  @reg_addr: 32 bit PHY register to write\n+ *  @device_type: 3 bit device type\n+ *  @data: Pointer to read data from the register\n+ **/\n+static s32 ixgbe_read_iosf_sb_reg_x550a(struct ixgbe_hw *hw, u32 reg_addr,\n+\t\t\t\t\t__always_unused u32 device_type,\n+\t\t\t\t\tu32 *data)\n+{\n+\tunion {\n+\t\tstruct ixgbe_hic_internal_phy_req cmd;\n+\t\tstruct ixgbe_hic_internal_phy_resp rsp;\n+\t} hic;\n+\ts32 status;\n+\n+\tmemset(&hic, 0, sizeof(hic));\n+\thic.cmd.hdr.cmd = FW_INT_PHY_REQ_CMD;\n+\thic.cmd.hdr.buf_len = FW_INT_PHY_REQ_LEN;\n+\thic.cmd.hdr.checksum = FW_DEFAULT_CHECKSUM;\n+\thic.cmd.port_number = hw->bus.lan_id;\n+\thic.cmd.command_type = FW_INT_PHY_REQ_READ;\n+\thic.cmd.address = cpu_to_be16(reg_addr);\n+\n+\tstatus = ixgbe_host_interface_command(hw, &hic.cmd, sizeof(hic.cmd),\n+\t\t\t\t\t      IXGBE_HI_COMMAND_TIMEOUT, true);\n+\n+\t/* Extract the register value from the response. */\n+\t*data = le32_to_cpu(hic.rsp.read_data);\n+\n+\treturn status;\n+}\n+\n /** ixgbe_read_ee_hostif_data_X550 - Read EEPROM word using a host interface\n  *  command assuming that the semaphore is already obtained.\n  *  @hw: pointer to hardware structure\n@@ -1339,9 +1456,9 @@ static void ixgbe_init_mac_link_ops_X550em(struct ixgbe_hw *hw)\n \t\tmac->ops.disable_tx_laser = NULL;\n \t\tmac->ops.enable_tx_laser = NULL;\n \t\tmac->ops.flap_tx_laser = NULL;\n+\t\tmac->ops.setup_mac_link = ixgbe_setup_mac_link_sfp_x550em;\n \t\tmac->ops.setup_link = ixgbe_setup_mac_link_multispeed_fiber;\n \t\tmac->ops.setup_fc = ixgbe_setup_fc_x550em;\n-\t\tmac->ops.setup_mac_link = ixgbe_setup_mac_link_sfp_x550em;\n \t\tmac->ops.set_rate_select_speed =\n \t\t\t\t\tixgbe_set_soft_rate_select_speed;\n \t\tbreak;\n@@ -1349,6 +1466,8 @@ static void ixgbe_init_mac_link_ops_X550em(struct ixgbe_hw *hw)\n \t\tmac->ops.setup_link = ixgbe_setup_mac_link_t_X550em;\n \t\tmac->ops.setup_fc = ixgbe_setup_fc_generic;\n \t\tmac->ops.check_link = ixgbe_check_link_t_X550em;\n+\t\treturn;\n+\tcase ixgbe_media_type_backplane:\n \t\tbreak;\n \tdefault:\n \t\tmac->ops.setup_fc = ixgbe_setup_fc_x550em;\n@@ -2107,11 +2226,12 @@ static enum ixgbe_media_type ixgbe_get_media_type_X550em(struct ixgbe_hw *hw)\n \t\tmedia_type = ixgbe_media_type_backplane;\n \t\tbreak;\n \tcase IXGBE_DEV_ID_X550EM_X_SFP:\n+\tcase IXGBE_DEV_ID_X550EM_A_SFP_N:\n \t\tmedia_type = ixgbe_media_type_fiber;\n \t\tbreak;\n \tcase IXGBE_DEV_ID_X550EM_X_1G_T:\n \tcase IXGBE_DEV_ID_X550EM_X_10G_T:\n-\t\t media_type = ixgbe_media_type_copper;\n+\t\tmedia_type = ixgbe_media_type_copper;\n \t\tbreak;\n \tdefault:\n \t\tmedia_type = ixgbe_media_type_unknown;\n@@ -2375,6 +2495,59 @@ static void ixgbe_release_swfw_sync_X550em(struct ixgbe_hw *hw, u32 mask)\n \tixgbe_release_swfw_sync_X540(hw, mask);\n }\n \n+/**\n+ * ixgbe_acquire_swfw_sync_x550em_a - Acquire SWFW semaphore\n+ * @hw: pointer to hardware structure\n+ * @mask: Mask to specify which semaphore to acquire\n+ *\n+ * Acquires the SWFW semaphore and get the shared PHY token as needed\n+ */\n+static s32 ixgbe_acquire_swfw_sync_x550em_a(struct ixgbe_hw *hw, u32 mask)\n+{\n+\tu32 hmask = mask & ~IXGBE_GSSR_TOKEN_SM;\n+\tint retries = FW_PHY_TOKEN_RETRIES;\n+\ts32 status;\n+\n+\twhile (--retries) {\n+\t\tstatus = 0;\n+\t\tif (hmask)\n+\t\t\tstatus = ixgbe_acquire_swfw_sync_X540(hw, hmask);\n+\t\tif (status)\n+\t\t\treturn status;\n+\t\tif (!(mask & IXGBE_GSSR_TOKEN_SM))\n+\t\t\treturn 0;\n+\n+\t\tstatus = ixgbe_get_phy_token(hw);\n+\t\tif (!status)\n+\t\t\treturn 0;\n+\t\tif (hmask)\n+\t\t\tixgbe_release_swfw_sync_X540(hw, hmask);\n+\t\tif (status != IXGBE_ERR_TOKEN_RETRY)\n+\t\t\treturn status;\n+\t\tudelay(FW_PHY_TOKEN_DELAY * 1000);\n+\t}\n+\n+\treturn status;\n+}\n+\n+/**\n+ * ixgbe_release_swfw_sync_x550em_a - Release SWFW semaphore\n+ * @hw: pointer to hardware structure\n+ * @mask: Mask to specify which semaphore to release\n+ *\n+ * Release the SWFW semaphore and puts the shared PHY token as needed\n+ */\n+static void ixgbe_release_swfw_sync_x550em_a(struct ixgbe_hw *hw, u32 mask)\n+{\n+\tu32 hmask = mask & ~IXGBE_GSSR_TOKEN_SM;\n+\n+\tif (mask & IXGBE_GSSR_TOKEN_SM)\n+\t\tixgbe_put_phy_token(hw);\n+\n+\tif (hmask)\n+\t\tixgbe_release_swfw_sync_X540(hw, hmask);\n+}\n+\n #define X550_COMMON_MAC \\\n \t.init_hw\t\t\t= &ixgbe_init_hw_generic, \\\n \t.start_hw\t\t\t= &ixgbe_start_hw_X540, \\\n@@ -2455,6 +2628,23 @@ static const struct ixgbe_mac_operations mac_ops_X550EM_x = {\n \t.write_iosf_sb_reg\t= ixgbe_write_iosf_sb_reg_x550,\n };\n \n+static struct ixgbe_mac_operations mac_ops_x550em_a = {\n+\tX550_COMMON_MAC\n+\t.reset_hw\t\t= ixgbe_reset_hw_X550em,\n+\t.get_media_type\t\t= ixgbe_get_media_type_X550em,\n+\t.get_san_mac_addr\t= NULL,\n+\t.get_wwn_prefix\t\t= NULL,\n+\t.setup_link\t\t= NULL, /* defined later */\n+\t.get_link_capabilities\t= ixgbe_get_link_capabilities_X550em,\n+\t.get_bus_info\t\t= ixgbe_get_bus_info_X550em,\n+\t.setup_sfp\t\t= ixgbe_setup_sfp_modules_X550em,\n+\t.acquire_swfw_sync\t= ixgbe_acquire_swfw_sync_x550em_a,\n+\t.release_swfw_sync\t= ixgbe_release_swfw_sync_x550em_a,\n+\t.setup_fc\t\t= ixgbe_setup_fc_generic,\n+\t.read_iosf_sb_reg\t= ixgbe_read_iosf_sb_reg_x550a,\n+\t.write_iosf_sb_reg\t= ixgbe_write_iosf_sb_reg_x550a,\n+};\n+\n #define X550_COMMON_EEP \\\n \t.read\t\t\t= &ixgbe_read_ee_hostif_X550, \\\n \t.read_buffer\t\t= &ixgbe_read_ee_hostif_buffer_X550, \\\n@@ -2515,6 +2705,10 @@ static const u32 ixgbe_mvals_X550EM_x[IXGBE_MVALS_IDX_LIMIT] = {\n \tIXGBE_MVALS_INIT(X550EM_x)\n };\n \n+static const u32 ixgbe_mvals_x550em_a[IXGBE_MVALS_IDX_LIMIT] = {\n+\tIXGBE_MVALS_INIT(X550EM_a)\n+};\n+\n const struct ixgbe_info ixgbe_X550_info = {\n \t.mac\t\t\t= ixgbe_mac_X550,\n \t.get_invariants\t\t= &ixgbe_get_invariants_X540,\n@@ -2534,3 +2728,13 @@ const struct ixgbe_info ixgbe_X550EM_x_info = {\n \t.mbx_ops\t\t= &mbx_ops_generic,\n \t.mvals\t\t\t= ixgbe_mvals_X550EM_x,\n };\n+\n+const struct ixgbe_info ixgbe_x550em_a_info = {\n+\t.mac\t\t\t= ixgbe_mac_x550em_a,\n+\t.get_invariants\t\t= &ixgbe_get_invariants_X550_x,\n+\t.mac_ops\t\t= &mac_ops_x550em_a,\n+\t.eeprom_ops\t\t= &eeprom_ops_X550EM_x,\n+\t.phy_ops\t\t= &phy_ops_X550EM_x,\n+\t.mbx_ops\t\t= &mbx_ops_generic,\n+\t.mvals\t\t\t= ixgbe_mvals_x550em_a,\n+};\n",
    "prefixes": [
        "V4",
        "03/11"
    ]
}