Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/602651/?format=api
{ "id": 602651, "url": "http://patchwork.ozlabs.org/api/patches/602651/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20160328211750.68937.58640.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": "<20160328211750.68937.58640.stgit@mdrustad-wks.jf.intel.com>", "list_archive_url": null, "date": "2016-03-28T21:17:50", "name": "[V3,04/11] ixgbe: Request token for PHY accesses", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "456074437674a2d38d798da79223183842346f98", "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/20160328211750.68937.58640.stgit@mdrustad-wks.jf.intel.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/602651/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/602651/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 3qYmwG2tZNz9sBc\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 29 Mar 2016 08:18:06 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id A5C068942D;\n\tMon, 28 Mar 2016 21:18:05 +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 ErQq2vQAEdUS; Mon, 28 Mar 2016 21:18:04 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 886AC88482;\n\tMon, 28 Mar 2016 21:18:04 +0000 (UTC)", "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 386311CF225\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 28 Mar 2016 21:18:03 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 343A68B6CA\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 28 Mar 2016 21:18:03 +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 LW4zxOR1Sbea for <intel-wired-lan@lists.osuosl.org>;\n\tMon, 28 Mar 2016 21:18:02 +0000 (UTC)", "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 41BB789700\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 28 Mar 2016 21:18:02 +0000 (UTC)", "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby fmsmga101.fm.intel.com with ESMTP; 28 Mar 2016 14:17:50 -0700", "from mdrustad-wks.jf.intel.com ([134.134.3.71])\n\tby FMSMGA003.fm.intel.com with ESMTP; 28 Mar 2016 14:17:50 -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,408,1455004800\"; d=\"scan'208\";a=\"677003391\"", "From": "Mark D Rustad <mark.d.rustad@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Mon, 28 Mar 2016 14:17:50 -0700", "Message-ID": "<20160328211750.68937.58640.stgit@mdrustad-wks.jf.intel.com>", "In-Reply-To": "<20160328211623.68937.52252.stgit@mdrustad-wks.jf.intel.com>", "References": "<20160328211623.68937.52252.stgit@mdrustad-wks.jf.intel.com>", "User-Agent": "StGit/unknown-version", "MIME-Version": "1.0", "Subject": "[Intel-wired-lan] [PATCH V3 04/11] ixgbe: Request token for PHY\n\taccesses", "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": "Set the bit to request the PHY token for PHY accesses.\n\nSigned-off-by: Mark Rustad <mark.d.rustad@intel.com>\n---\n drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c | 34 +++++++++++++-------------\n 1 file changed, 17 insertions(+), 17 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c\nindex db0731e05401..9092b9612271 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.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@@ -570,24 +570,24 @@ s32 ixgbe_read_phy_reg_mdi(struct ixgbe_hw *hw, u32 reg_addr, u32 device_type,\n \n /**\n * ixgbe_read_phy_reg_generic - Reads a value from a specified PHY register\n- * using the SWFW lock - this function is needed in most cases\n * @hw: pointer to hardware structure\n * @reg_addr: 32 bit address of PHY register to read\n * @phy_data: Pointer to read data from PHY register\n+ *\n+ * This function uses the SWFW lock which must be held for all accesses\n **/\n s32 ixgbe_read_phy_reg_generic(struct ixgbe_hw *hw, u32 reg_addr,\n \t\t\t u32 device_type, u16 *phy_data)\n {\n+\tu32 gssr = hw->phy.phy_semaphore_mask | IXGBE_GSSR_TOKEN_SM;\n \ts32 status;\n-\tu32 gssr = hw->phy.phy_semaphore_mask;\n \n-\tif (hw->mac.ops.acquire_swfw_sync(hw, gssr) == 0) {\n-\t\tstatus = ixgbe_read_phy_reg_mdi(hw, reg_addr, device_type,\n-\t\t\t\t\t\tphy_data);\n-\t\thw->mac.ops.release_swfw_sync(hw, gssr);\n-\t} else {\n+\tif (hw->mac.ops.acquire_swfw_sync(hw, gssr))\n \t\treturn IXGBE_ERR_SWFW_SYNC;\n-\t}\n+\n+\tstatus = hw->phy.ops.read_reg_mdi(hw, reg_addr, device_type, phy_data);\n+\n+\thw->mac.ops.release_swfw_sync(hw, gssr);\n \n \treturn status;\n }\n@@ -667,25 +667,25 @@ s32 ixgbe_write_phy_reg_mdi(struct ixgbe_hw *hw, u32 reg_addr,\n \n /**\n * ixgbe_write_phy_reg_generic - Writes a value to specified PHY register\n- * using SWFW lock- this function is needed in most cases\n * @hw: pointer to hardware structure\n * @reg_addr: 32 bit PHY register to write\n * @device_type: 5 bit device type\n * @phy_data: Data to write to the PHY register\n+ *\n+ * This function uses the SWFW lock which must be held for all accesses\n **/\n s32 ixgbe_write_phy_reg_generic(struct ixgbe_hw *hw, u32 reg_addr,\n \t\t\t\tu32 device_type, u16 phy_data)\n {\n+\tu32 gssr = hw->phy.phy_semaphore_mask | IXGBE_GSSR_TOKEN_SM;\n \ts32 status;\n-\tu32 gssr = hw->phy.phy_semaphore_mask;\n \n-\tif (hw->mac.ops.acquire_swfw_sync(hw, gssr) == 0) {\n-\t\tstatus = ixgbe_write_phy_reg_mdi(hw, reg_addr, device_type,\n-\t\t\t\t\t\t phy_data);\n-\t\thw->mac.ops.release_swfw_sync(hw, gssr);\n-\t} else {\n+\tif (hw->mac.ops.acquire_swfw_sync(hw, gssr))\n \t\treturn IXGBE_ERR_SWFW_SYNC;\n-\t}\n+\n+\tstatus = hw->phy.ops.write_reg_mdi(hw, reg_addr, device_type, phy_data);\n+\n+\thw->mac.ops.release_swfw_sync(hw, gssr);\n \n \treturn status;\n }\n", "prefixes": [ "V3", "04/11" ] }