Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/631/?format=api
http://patches.dpdk.org/api/patches/631/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1411974986-28137-14-git-send-email-changchun.ouyang@intel.com/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<1411974986-28137-14-git-send-email-changchun.ouyang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1411974986-28137-14-git-send-email-changchun.ouyang@intel.com", "date": "2014-09-29T07:16:21", "name": "[dpdk-dev,v2,13/18] ixgbe: semaphore mask move into hardware physical information", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "0c6ecabf6ad8e3c5d4bd34ea4a884a3c5d7616b3", "submitter": { "id": 31, "url": "http://patches.dpdk.org/api/people/31/?format=api", "name": "Ouyang Changchun", "email": "changchun.ouyang@intel.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1411974986-28137-14-git-send-email-changchun.ouyang@intel.com/mbox/", "series": [], "comments": "http://patches.dpdk.org/api/patches/631/comments/", "check": "pending", "checks": "http://patches.dpdk.org/api/patches/631/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 409447E66;\n\tMon, 29 Sep 2014 09:10:48 +0200 (CEST)", "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby dpdk.org (Postfix) with ESMTP id 795E67E66\n\tfor <dev@dpdk.org>; Mon, 29 Sep 2014 09:10:45 +0200 (CEST)", "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby orsmga102.jf.intel.com with ESMTP; 29 Sep 2014 00:11:02 -0700", "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby orsmga002.jf.intel.com with ESMTP; 29 Sep 2014 00:17:17 -0700", "from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com\n\t[10.239.29.89])\n\tby shvmail01.sh.intel.com with ESMTP id s8T7HF0M014288;\n\tMon, 29 Sep 2014 15:17:15 +0800", "from shecgisg004.sh.intel.com (localhost [127.0.0.1])\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP\n\tid s8T7HDWt028426; Mon, 29 Sep 2014 15:17:15 +0800", "(from couyang@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id s8T7HDoY028422; \n\tMon, 29 Sep 2014 15:17:13 +0800" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.04,618,1406617200\"; d=\"scan'208\";a=\"610111954\"", "From": "Ouyang Changchun <changchun.ouyang@intel.com>", "To": "dev@dpdk.org", "Date": "Mon, 29 Sep 2014 15:16:21 +0800", "Message-Id": "<1411974986-28137-14-git-send-email-changchun.ouyang@intel.com>", "X-Mailer": "git-send-email 1.7.4.1", "In-Reply-To": "<1411974986-28137-1-git-send-email-changchun.ouyang@intel.com>", "References": "<1411974986-28137-1-git-send-email-changchun.ouyang@intel.com>", "Subject": "[dpdk-dev] [PATCH v2 13/18] ixgbe: semaphore mask move into\n\thardware physical information", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "patches and discussions about DPDK <dev.dpdk.org>", "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "This patch stores lan_id and physical semaphore mask into hardware physical information,\nand use them to control read and write physical registers in IXGBE base code.\n\nSigned-off-by: Changchun Ouyang <changchun.ouyang@intel.com>\n---\n lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c | 23 +++++++++++------------\n 1 file changed, 11 insertions(+), 12 deletions(-)", "diff": "diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c\nindex 2e8fe93..f39df9a 100644\n--- a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c\n+++ b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c\n@@ -283,6 +283,15 @@ s32 ixgbe_identify_phy_generic(struct ixgbe_hw *hw)\n \n \tDEBUGFUNC(\"ixgbe_identify_phy_generic\");\n \n+\tif (!hw->phy.phy_semaphore_mask) {\n+\t\thw->phy.lan_id = IXGBE_READ_REG(hw, IXGBE_STATUS) &\n+\t\t\t\t\t\tIXGBE_STATUS_LAN_ID_1;\n+\t\tif (hw->phy.lan_id)\n+\t\t\thw->phy.phy_semaphore_mask = IXGBE_GSSR_PHY1_SM;\n+\t\telse\n+\t\t\thw->phy.phy_semaphore_mask = IXGBE_GSSR_PHY0_SM;\n+\t}\n+\n \tif (hw->phy.type == ixgbe_phy_unknown) {\n \t\tfor (phy_addr = 0; phy_addr < IXGBE_MAX_PHY_ADDR; phy_addr++) {\n \t\t\tif (ixgbe_validate_phy_addr(hw, phy_addr)) {\n@@ -587,15 +596,10 @@ 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 \ts32 status;\n-\tu16 gssr;\n+\tu32 gssr = hw->phy.phy_semaphore_mask;\n \n \tDEBUGFUNC(\"ixgbe_read_phy_reg_generic\");\n \n-\tif (IXGBE_READ_REG(hw, IXGBE_STATUS) & IXGBE_STATUS_LAN_ID_1)\n-\t\tgssr = IXGBE_GSSR_PHY1_SM;\n-\telse\n-\t\tgssr = IXGBE_GSSR_PHY0_SM;\n-\n \tif (hw->mac.ops.acquire_swfw_sync(hw, gssr) == IXGBE_SUCCESS) {\n \t\tstatus = ixgbe_read_phy_reg_mdi(hw, reg_addr, device_type,\n \t\t\t\t\t\tphy_data);\n@@ -693,15 +697,10 @@ 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 \ts32 status;\n-\tu16 gssr;\n+\tu32 gssr = hw->phy.phy_semaphore_mask;\n \n \tDEBUGFUNC(\"ixgbe_write_phy_reg_generic\");\n \n-\tif (IXGBE_READ_REG(hw, IXGBE_STATUS) & IXGBE_STATUS_LAN_ID_1)\n-\t\tgssr = IXGBE_GSSR_PHY1_SM;\n-\telse\n-\t\tgssr = IXGBE_GSSR_PHY0_SM;\n-\n \tif (hw->mac.ops.acquire_swfw_sync(hw, gssr) == IXGBE_SUCCESS) {\n \t\tstatus = ixgbe_write_phy_reg_mdi(hw, reg_addr, device_type,\n \t\t\t\t\t\t phy_data);\n", "prefixes": [ "dpdk-dev", "v2", "13/18" ] }{ "id": 631, "url": "