Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/519/?format=api
https://patches.dpdk.org/api/patches/519/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1411654744-9460-15-git-send-email-changchun.ouyang@intel.com/", "project": { "id": 1, "url": "https://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": "<1411654744-9460-15-git-send-email-changchun.ouyang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1411654744-9460-15-git-send-email-changchun.ouyang@intel.com", "date": "2014-09-25T14:19:00", "name": "[dpdk-dev,14/18] ixgbe: Remove unnecessary delay", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "3d98d78c99fb2260662469629893a0541b053ff7", "submitter": { "id": 31, "url": "https://patches.dpdk.org/api/people/31/?format=api", "name": "Ouyang Changchun", "email": "changchun.ouyang@intel.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1411654744-9460-15-git-send-email-changchun.ouyang@intel.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/519/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/519/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 234B7B42C;\n\tThu, 25 Sep 2014 16:13:31 +0200 (CEST)", "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id F3097B41D\n\tfor <dev@dpdk.org>; Thu, 25 Sep 2014 16:13:25 +0200 (CEST)", "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby fmsmga101.fm.intel.com with ESMTP; 25 Sep 2014 07:19:43 -0700", "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby FMSMGA003.fm.intel.com with ESMTP; 25 Sep 2014 07:13:43 -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 s8PEJflP027943;\n\tThu, 25 Sep 2014 22:19:41 +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 s8PEJd7V009591; Thu, 25 Sep 2014 22:19:41 +0800", "(from couyang@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id s8PEJdS3009587; \n\tThu, 25 Sep 2014 22:19:39 +0800" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"4.97,862,1389772800\"; d=\"scan'208\";a=\"391518190\"", "From": "Ouyang Changchun <changchun.ouyang@intel.com>", "To": "dev@dpdk.org", "Date": "Thu, 25 Sep 2014 22:19:00 +0800", "Message-Id": "<1411654744-9460-15-git-send-email-changchun.ouyang@intel.com>", "X-Mailer": "git-send-email 1.7.4.1", "In-Reply-To": "<1411654744-9460-1-git-send-email-changchun.ouyang@intel.com>", "References": "<1411654744-9460-1-git-send-email-changchun.ouyang@intel.com>", "Subject": "[dpdk-dev] [PATCH 14/18] ixgbe: Remove unnecessary delay", "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 removes unnecessary delay when setting up physical link \nand negotiating in IXGBE share code.\n\nSigned-off-by: Changchun Ouyang <changchun.ouyang@intel.com>\n---\n lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c | 53 ++++------------------------------\n 1 file changed, 6 insertions(+), 47 deletions(-)", "diff": "diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c\nindex f39df9a..e1e560b 100644\n--- a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c\n+++ b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c\n@@ -713,16 +713,14 @@ s32 ixgbe_write_phy_reg_generic(struct ixgbe_hw *hw, u32 reg_addr,\n }\n \n /**\n- * ixgbe_setup_phy_link_generic - Set and restart autoneg\n+ * ixgbe_setup_phy_link_generic - Set and restart auto-neg\n * @hw: pointer to hardware structure\n *\n- * Restart autonegotiation and PHY and waits for completion.\n+ * Restart auto-negotiation and PHY and waits for completion.\n **/\n s32 ixgbe_setup_phy_link_generic(struct ixgbe_hw *hw)\n {\n \ts32 status = IXGBE_SUCCESS;\n-\tu32 time_out;\n-\tu32 max_time_out = 10;\n \tu16 autoneg_reg = IXGBE_MII_AUTONEG_REG;\n \tbool autoneg = false;\n \tixgbe_link_speed speed;\n@@ -783,7 +781,7 @@ s32 ixgbe_setup_phy_link_generic(struct ixgbe_hw *hw)\n \tif (ixgbe_check_reset_blocked(hw))\n \t\treturn status;\n \n-\t/* Restart PHY autonegotiation and wait for completion */\n+\t/* Restart PHY auto-negotiation. */\n \thw->phy.ops.read_reg(hw, IXGBE_MDIO_AUTO_NEG_CONTROL,\n \t\t\t IXGBE_MDIO_AUTO_NEG_DEV_TYPE, &autoneg_reg);\n \n@@ -792,25 +790,6 @@ s32 ixgbe_setup_phy_link_generic(struct ixgbe_hw *hw)\n \thw->phy.ops.write_reg(hw, IXGBE_MDIO_AUTO_NEG_CONTROL,\n \t\t\t IXGBE_MDIO_AUTO_NEG_DEV_TYPE, autoneg_reg);\n \n-\t/* Wait for autonegotiation to finish */\n-\tfor (time_out = 0; time_out < max_time_out; time_out++) {\n-\t\tusec_delay(10);\n-\t\t/* Restart PHY autonegotiation and wait for completion */\n-\t\tstatus = hw->phy.ops.read_reg(hw, IXGBE_MDIO_AUTO_NEG_STATUS,\n-\t\t\t\t\t IXGBE_MDIO_AUTO_NEG_DEV_TYPE,\n-\t\t\t\t\t &autoneg_reg);\n-\n-\t\tautoneg_reg &= IXGBE_MII_AUTONEG_COMPLETE;\n-\t\tif (autoneg_reg == IXGBE_MII_AUTONEG_COMPLETE)\n-\t\t\tbreak;\n-\t}\n-\n-\tif (time_out == max_time_out) {\n-\t\tstatus = IXGBE_ERR_LINK_SETUP;\n-\t\tERROR_REPORT1(IXGBE_ERROR_POLLING,\n-\t\t\t \"PHY autonegotiation time out\");\n-\t}\n-\n \treturn status;\n }\n \n@@ -934,16 +913,14 @@ s32 ixgbe_check_phy_link_tnx(struct ixgbe_hw *hw, ixgbe_link_speed *speed,\n }\n \n /**\n- *\tixgbe_setup_phy_link_tnx - Set and restart autoneg\n+ *\tixgbe_setup_phy_link_tnx - Set and restart auto-neg\n *\t@hw: pointer to hardware structure\n *\n- *\tRestart autonegotiation and PHY and waits for completion.\n+ *\tRestart auto-negotiation and PHY and waits for completion.\n **/\n s32 ixgbe_setup_phy_link_tnx(struct ixgbe_hw *hw)\n {\n \ts32 status = IXGBE_SUCCESS;\n-\tu32 time_out;\n-\tu32 max_time_out = 10;\n \tu16 autoneg_reg = IXGBE_MII_AUTONEG_REG;\n \tbool autoneg = false;\n \tixgbe_link_speed speed;\n@@ -1001,7 +978,7 @@ s32 ixgbe_setup_phy_link_tnx(struct ixgbe_hw *hw)\n \tif (ixgbe_check_reset_blocked(hw))\n \t\treturn status;\n \n-\t/* Restart PHY autonegotiation and wait for completion */\n+\t/* Restart PHY auto-negotiation. */\n \thw->phy.ops.read_reg(hw, IXGBE_MDIO_AUTO_NEG_CONTROL,\n \t\t\t IXGBE_MDIO_AUTO_NEG_DEV_TYPE, &autoneg_reg);\n \n@@ -1010,24 +987,6 @@ s32 ixgbe_setup_phy_link_tnx(struct ixgbe_hw *hw)\n \thw->phy.ops.write_reg(hw, IXGBE_MDIO_AUTO_NEG_CONTROL,\n \t\t\t IXGBE_MDIO_AUTO_NEG_DEV_TYPE, autoneg_reg);\n \n-\t/* Wait for autonegotiation to finish */\n-\tfor (time_out = 0; time_out < max_time_out; time_out++) {\n-\t\tusec_delay(10);\n-\t\t/* Restart PHY autonegotiation and wait for completion */\n-\t\tstatus = hw->phy.ops.read_reg(hw, IXGBE_MDIO_AUTO_NEG_STATUS,\n-\t\t\t\t\t IXGBE_MDIO_AUTO_NEG_DEV_TYPE,\n-\t\t\t\t\t &autoneg_reg);\n-\n-\t\tautoneg_reg &= IXGBE_MII_AUTONEG_COMPLETE;\n-\t\tif (autoneg_reg == IXGBE_MII_AUTONEG_COMPLETE)\n-\t\t\tbreak;\n-\t}\n-\n-\tif (time_out == max_time_out) {\n-\t\tstatus = IXGBE_ERR_LINK_SETUP;\n-\t\tDEBUGOUT(\"ixgbe_setup_phy_link_tnx: time out\");\n-\t}\n-\n \treturn status;\n }\n \n", "prefixes": [ "dpdk-dev", "14/18" ] }{ "id": 519, "url": "