Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/603183/?format=api
{ "id": 603183, "url": "http://patchwork.ozlabs.org/api/patches/603183/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20160329235735.68428.45189.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": "<20160329235735.68428.45189.stgit@mdrustad-wks.jf.intel.com>", "list_archive_url": null, "date": "2016-03-29T23:57:35", "name": "[V4,02/11] ixgbe: Use method pointer to access IOSF devices", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "7c4beccae60e70a3c1737cf1b0f80a1bd96297c0", "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/20160329235735.68428.45189.stgit@mdrustad-wks.jf.intel.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/603183/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/603183/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 3qZSPt3qn8z9sBM\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 30 Mar 2016 10:57:38 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id D76F489F9D;\n\tTue, 29 Mar 2016 23:57:37 +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 eQ_Samt-q1rO; Tue, 29 Mar 2016 23:57:37 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 6FBE489ECE;\n\tTue, 29 Mar 2016 23:57:37 +0000 (UTC)", "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id 51E461C2BB2\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 29 Mar 2016 23:57:36 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 4BE8D89ECE\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 29 Mar 2016 23:57:36 +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 iPoI6UFojecn for <intel-wired-lan@lists.osuosl.org>;\n\tTue, 29 Mar 2016 23:57:35 +0000 (UTC)", "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id CF8F289F82\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 29 Mar 2016 23:57:35 +0000 (UTC)", "from fmsmga004.fm.intel.com ([10.253.24.48])\n\tby fmsmga103.fm.intel.com with ESMTP; 29 Mar 2016 16:57:35 -0700", "from mdrustad-wks.jf.intel.com ([134.134.3.71])\n\tby fmsmga004.fm.intel.com with ESMTP; 29 Mar 2016 16:57:37 -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=\"75552774\"", "From": "Mark D Rustad <mark.d.rustad@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Tue, 29 Mar 2016 16:57:35 -0700", "Message-ID": "<20160329235735.68428.45189.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 02/11] ixgbe: Use method pointer to\n\taccess IOSF devices", "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": "Provide method pointers and use them to access IOSF-attached\ndevices. A new MAC will introduce a new access method.\n\nSigned-off-by: Mark Rustad <mark.d.rustad@intel.com>\n---\n drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 2 ++\n drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 32 ++++++++++++++-----------\n 2 files changed, 20 insertions(+), 14 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h\nindex fae85d1c3bf9..71b2757a70a5 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h\n@@ -3331,6 +3331,8 @@ struct ixgbe_mac_operations {\n \ts32 (*dmac_config)(struct ixgbe_hw *hw);\n \ts32 (*dmac_update_tcs)(struct ixgbe_hw *hw);\n \ts32 (*dmac_config_tcs)(struct ixgbe_hw *hw);\n+\ts32 (*read_iosf_sb_reg)(struct ixgbe_hw *, u32, u32, u32 *);\n+\ts32 (*write_iosf_sb_reg)(struct ixgbe_hw *, u32, u32, u32);\n };\n \n struct ixgbe_phy_operations {\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c\nindex 65832fa30426..878ea1ed87b4 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c\n@@ -1615,7 +1615,7 @@ static s32 ixgbe_setup_kr_speed_x550em(struct ixgbe_hw *hw,\n \ts32 status;\n \tu32 reg_val;\n \n-\tstatus = ixgbe_read_iosf_sb_reg_x550(hw,\n+\tstatus = hw->mac.ops.read_iosf_sb_reg(hw,\n \t\t\t\t\tIXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id),\n \t\t\t\t\tIXGBE_SB_IOSF_TARGET_KR_PHY, ®_val);\n \tif (status)\n@@ -1637,7 +1637,7 @@ static s32 ixgbe_setup_kr_speed_x550em(struct ixgbe_hw *hw,\n \n \t/* Restart auto-negotiation. */\n \treg_val |= IXGBE_KRM_LINK_CTRL_1_TETH_AN_RESTART;\n-\tstatus = ixgbe_write_iosf_sb_reg_x550(hw,\n+\tstatus = hw->mac.ops.write_iosf_sb_reg(hw,\n \t\t\t\t\tIXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id),\n \t\t\t\t\tIXGBE_SB_IOSF_TARGET_KR_PHY, reg_val);\n \n@@ -1654,9 +1654,9 @@ static s32 ixgbe_setup_kx4_x550em(struct ixgbe_hw *hw)\n \ts32 status;\n \tu32 reg_val;\n \n-\tstatus = ixgbe_read_iosf_sb_reg_x550(hw, IXGBE_KX4_LINK_CNTL_1,\n-\t\t\t\t\t IXGBE_SB_IOSF_TARGET_KX4_PCS0 +\n-\t\t\t\t\t hw->bus.lan_id, ®_val);\n+\tstatus = hw->mac.ops.read_iosf_sb_reg(hw, IXGBE_KX4_LINK_CNTL_1,\n+\t\t\t\t\t IXGBE_SB_IOSF_TARGET_KX4_PCS0 +\n+\t\t\t\t\t hw->bus.lan_id, ®_val);\n \tif (status)\n \t\treturn status;\n \n@@ -1675,9 +1675,9 @@ static s32 ixgbe_setup_kx4_x550em(struct ixgbe_hw *hw)\n \n \t/* Restart auto-negotiation. */\n \treg_val |= IXGBE_KX4_LINK_CNTL_1_TETH_AN_RESTART;\n-\tstatus = ixgbe_write_iosf_sb_reg_x550(hw, IXGBE_KX4_LINK_CNTL_1,\n-\t\t\t\t\t IXGBE_SB_IOSF_TARGET_KX4_PCS0 +\n-\t\t\t\t\t hw->bus.lan_id, reg_val);\n+\tstatus = hw->mac.ops.write_iosf_sb_reg(hw, IXGBE_KX4_LINK_CNTL_1,\n+\t\t\t\t\t IXGBE_SB_IOSF_TARGET_KX4_PCS0 +\n+\t\t\t\t\t hw->bus.lan_id, reg_val);\n \n \treturn status;\n }\n@@ -1897,9 +1897,10 @@ static s32 ixgbe_setup_fc_x550em(struct ixgbe_hw *hw)\n \tif (hw->device_id != IXGBE_DEV_ID_X550EM_X_KR)\n \t\treturn 0;\n \n-\trc = ixgbe_read_iosf_sb_reg_x550(hw,\n-\t\t\t\t\t IXGBE_KRM_AN_CNTL_1(hw->bus.lan_id),\n-\t\t\t\t\t IXGBE_SB_IOSF_TARGET_KR_PHY, ®_val);\n+\trc = hw->mac.ops.read_iosf_sb_reg(hw,\n+\t\t\t\t\t IXGBE_KRM_AN_CNTL_1(hw->bus.lan_id),\n+\t\t\t\t\t IXGBE_SB_IOSF_TARGET_KR_PHY,\n+\t\t\t\t\t ®_val);\n \tif (rc)\n \t\treturn rc;\n \n@@ -1909,9 +1910,10 @@ static s32 ixgbe_setup_fc_x550em(struct ixgbe_hw *hw)\n \t\treg_val |= IXGBE_KRM_AN_CNTL_1_SYM_PAUSE;\n \tif (asm_dir)\n \t\treg_val |= IXGBE_KRM_AN_CNTL_1_ASM_PAUSE;\n-\trc = ixgbe_write_iosf_sb_reg_x550(hw,\n-\t\t\t\t\t IXGBE_KRM_AN_CNTL_1(hw->bus.lan_id),\n-\t\t\t\t\t IXGBE_SB_IOSF_TARGET_KR_PHY, reg_val);\n+\trc = hw->mac.ops.write_iosf_sb_reg(hw,\n+\t\t\t\t\t IXGBE_KRM_AN_CNTL_1(hw->bus.lan_id),\n+\t\t\t\t\t IXGBE_SB_IOSF_TARGET_KR_PHY,\n+\t\t\t\t\t reg_val);\n \n \t/* This device does not fully support AN. */\n \thw->fc.disable_fc_autoneg = true;\n@@ -2449,6 +2451,8 @@ static const struct ixgbe_mac_operations mac_ops_X550EM_x = {\n \t.release_swfw_sync\t= &ixgbe_release_swfw_sync_X550em,\n \t.init_swfw_sync\t\t= &ixgbe_init_swfw_sync_X540,\n \t.setup_fc\t\t= NULL, /* defined later */\n+\t.read_iosf_sb_reg\t= ixgbe_read_iosf_sb_reg_x550,\n+\t.write_iosf_sb_reg\t= ixgbe_write_iosf_sb_reg_x550,\n };\n \n #define X550_COMMON_EEP \\\n", "prefixes": [ "V4", "02/11" ] }