Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/603191/?format=api
{ "id": 603191, "url": "http://patchwork.ozlabs.org/api/patches/603191/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20160329235756.68428.38446.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": "<20160329235756.68428.38446.stgit@mdrustad-wks.jf.intel.com>", "list_archive_url": null, "date": "2016-03-29T23:57:56", "name": "[V4,06/11] ixgbe: Read and parse NW_MNG_IF_SEL register", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "5b38953f83870ecc44bc52afa7b16b3992402b0f", "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/20160329235756.68428.38446.stgit@mdrustad-wks.jf.intel.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/603191/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/603191/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 hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ozlabs.org (Postfix) with ESMTP id 3qZSQp0CfFz9sBf\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 30 Mar 2016 10:58:25 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 2C49D8AD1E;\n\tTue, 29 Mar 2016 23:58:25 +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 Knee7g4E19AP; Tue, 29 Mar 2016 23:58:24 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id AEB5A8AE92;\n\tTue, 29 Mar 2016 23:58:24 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 1ACA71C2BB2\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 29 Mar 2016 23:58:23 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 1604B8AE92\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 29 Mar 2016 23:58:23 +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 4-OvbNXsoeeG for <intel-wired-lan@lists.osuosl.org>;\n\tTue, 29 Mar 2016 23:58:19 +0000 (UTC)", "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 20D6A8AD0E\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 29 Mar 2016 23:58:19 +0000 (UTC)", "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby fmsmga103.fm.intel.com with ESMTP; 29 Mar 2016 16:57:56 -0700", "from mdrustad-wks.jf.intel.com ([134.134.3.71])\n\tby orsmga001.jf.intel.com with ESMTP; 29 Mar 2016 16:57:56 -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=\"921397645\"", "From": "Mark D Rustad <mark.d.rustad@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Tue, 29 Mar 2016 16:57:56 -0700", "Message-ID": "<20160329235756.68428.38446.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 06/11] ixgbe: Read and parse\n\tNW_MNG_IF_SEL register", "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": "Read the IXGBE_NW_MNG_IF_SEL register and use it to set interface\nattributes.\n\nSigned-off-by: Mark Rustad <mark.d.rustad@intel.com>\n---\n drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 5 +++\n drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 37 ++++++++++++++++++++++---\n 2 files changed, 37 insertions(+), 5 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h\nindex 3fc447a7c15d..3e0dd5584d4e 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h\n@@ -3648,5 +3648,10 @@ struct ixgbe_info {\n #define IXGBE_SB_IOSF_TARGET_KX4_PCS1\t3\n \n #define IXGBE_NW_MNG_IF_SEL\t\t0x00011178\n+#define IXGBE_NW_MNG_IF_SEL_MDIO_ACT\t\tBIT(1)\n+#define IXGBE_NW_MNG_IF_SEL_ENABLE_10_100M\tBIT(23)\n #define IXGBE_NW_MNG_IF_SEL_INT_PHY_MODE\tBIT(24)\n+#define IXGBE_NW_MNG_IF_SEL_MDIO_PHY_ADD_SHIFT\t3\n+#define IXGBE_NW_MNG_IF_SEL_MDIO_PHY_ADD\t\\\n+\t\t\t\t(0x1F << IXGBE_NW_MNG_IF_SEL_MDIO_PHY_ADD_SHIFT)\n #endif /* _IXGBE_TYPE_H_ */\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c\nindex 43681e098436..0ea6d0cecd66 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c\n@@ -2137,6 +2137,36 @@ static s32 ixgbe_enter_lplu_t_x550em(struct ixgbe_hw *hw)\n \treturn status;\n }\n \n+/**\n+ * ixgbe_read_mng_if_sel_x550em - Read NW_MNG_IF_SEL register\n+ * @hw: pointer to hardware structure\n+ *\n+ * Read NW_MNG_IF_SEL register and save field values.\n+ */\n+static void ixgbe_read_mng_if_sel_x550em(struct ixgbe_hw *hw)\n+{\n+\t/* Save NW management interface connected on board. This is used\n+\t * to determine internal PHY mode.\n+\t */\n+\thw->phy.nw_mng_if_sel = IXGBE_READ_REG(hw, IXGBE_NW_MNG_IF_SEL);\n+\n+\t/* If X552 (X550EM_a) and MDIO is connected to external PHY, then set\n+\t * PHY address. This register field was has only been used for X552.\n+\t */\n+\tif (!hw->phy.nw_mng_if_sel) {\n+\t\tif (hw->mac.type == ixgbe_mac_x550em_a) {\n+\t\t\tstruct ixgbe_adapter *adapter = hw->back;\n+\n+\t\t\te_warn(drv, \"nw_mng_if_sel not set\\n\");\n+\t\t}\n+\t\treturn;\n+\t}\n+\n+\thw->phy.mdio.prtad = (hw->phy.nw_mng_if_sel &\n+\t\t\t IXGBE_NW_MNG_IF_SEL_MDIO_PHY_ADD) >>\n+\t\t\t IXGBE_NW_MNG_IF_SEL_MDIO_PHY_ADD_SHIFT;\n+}\n+\n /** ixgbe_init_phy_ops_X550em - PHY/SFP specific init\n * @hw: pointer to hardware structure\n *\n@@ -2151,14 +2181,11 @@ static s32 ixgbe_init_phy_ops_X550em(struct ixgbe_hw *hw)\n \n \thw->mac.ops.set_lan_id(hw);\n \n+\tixgbe_read_mng_if_sel_x550em(hw);\n+\n \tif (hw->mac.ops.get_media_type(hw) == ixgbe_media_type_fiber) {\n \t\tphy->phy_semaphore_mask = IXGBE_GSSR_SHARED_I2C_SM;\n \t\tixgbe_setup_mux_ctl(hw);\n-\n-\t\t/* Save NW management interface connected on board. This is used\n-\t\t * to determine internal PHY mode.\n-\t\t */\n-\t\tphy->nw_mng_if_sel = IXGBE_READ_REG(hw, IXGBE_NW_MNG_IF_SEL);\n \t}\n \n \t/* Identify the PHY or SFP module */\n", "prefixes": [ "V4", "06/11" ] }