Show a patch.

GET /api/patches/73606/
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 73606,
    "url": "https://patches.dpdk.org/api/patches/73606/",
    "web_url": "https://patches.dpdk.org/patch/73606/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/",
        "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"
    },
    "msgid": "<20200709080046.65879-10-guinanx.sun@intel.com>",
    "date": "2020-07-09T08:00:36",
    "name": "[v3,09/19] net/ixgbe/base: create dedicated func to restart auto nego",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "8087a76acc8d6052fd03efb8a30138955b377a08",
    "submitter": {
        "id": 1476,
        "url": "https://patches.dpdk.org/api/people/1476/",
        "name": "Guinan Sun",
        "email": "guinanx.sun@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "https://patches.dpdk.org/api/users/1540/",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "https://patches.dpdk.org/patch/73606/mbox/",
    "series": [
        {
            "id": 10915,
            "url": "https://patches.dpdk.org/api/series/10915/",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=10915",
            "date": "2020-07-09T08:00:27",
            "name": "update ixgbe base code",
            "version": 3,
            "mbox": "https://patches.dpdk.org/series/10915/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/73606/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/73606/checks/",
    "tags": {},
    "headers": {
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "IronPort-SDR": [
            "\n fBNRwcR6sWwEuFLE4xdPAQTwoHASt+Q8zNcjoY6kJLCK5Y2nUztgHyURL0V8Dcc263CYgXYwcj\n mcxctN1kgn1w==",
            "\n aOheuAg7J4NS9tOfY0XcvFPU8QoGFmgx703pX9kwNNnKPYUGvsg0OK9xqmwBfgYdL0mRNWbsIa\n 5t36uzFXM1wg=="
        ],
        "X-Mailer": "git-send-email 2.17.1",
        "To": "dev@dpdk.org",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id E1059A0526;\n\tThu,  9 Jul 2020 10:15:35 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 1CAB21DE56;\n\tThu,  9 Jul 2020 10:14:16 +0200 (CEST)",
            "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n by dpdk.org (Postfix) with ESMTP id AE5EA1DC5C\n for <dev@dpdk.org>; Thu,  9 Jul 2020 10:14:10 +0200 (CEST)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 09 Jul 2020 01:14:09 -0700",
            "from intel.sh.intel.com ([10.239.255.18])\n by orsmga002.jf.intel.com with ESMTP; 09 Jul 2020 01:14:07 -0700"
        ],
        "X-BeenThere": "dev@dpdk.org",
        "X-Amp-File-Uploaded": "False",
        "Subject": "[dpdk-dev] [PATCH v3 09/19] net/ixgbe/base: create dedicated func\n\tto restart auto nego",
        "Cc": "Jeff Guo <jia.guo@intel.com>, Zhao1 Wei <wei.zhao1@intel.com>,\n Guinan Sun <guinanx.sun@intel.com>,\n Jakub Chylkowski <jakubx.chylkowski@intel.com>",
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "In-Reply-To": "<20200709080046.65879-1-guinanx.sun@intel.com>",
        "X-ExtLoop1": "1",
        "Precedence": "list",
        "From": "Guinan Sun <guinanx.sun@intel.com>",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9676\"; a=\"212869366\"",
            "E=Sophos;i=\"5.75,331,1589266800\"; d=\"scan'208\";a=\"212869366\"",
            "E=Sophos;i=\"5.75,331,1589266800\"; d=\"scan'208\";a=\"297989167\""
        ],
        "References": "<20200702031329.4495-1-guinanx.sun@intel.com>\n <20200709080046.65879-1-guinanx.sun@intel.com>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "Errors-To": "dev-bounces@dpdk.org",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "Message-Id": "<20200709080046.65879-10-guinanx.sun@intel.com>",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Date": "Thu,  9 Jul 2020 08:00:36 +0000",
        "X-Mailman-Version": "2.1.15"
    },
    "content": "This patch is for restarting auto negotiation on PHY.\n\nSigned-off-by: Jakub Chylkowski <jakubx.chylkowski@intel.com>\nSigned-off-by: Guinan Sun <guinanx.sun@intel.com>\nReviewed-by: Wei Zhao <wei.zhao1@intel.com>\n---\n drivers/net/ixgbe/base/ixgbe_phy.c | 48 ++++++++++++++----------------\n drivers/net/ixgbe/base/ixgbe_phy.h |  1 +\n 2 files changed, 23 insertions(+), 26 deletions(-)",
    "diff": "diff --git a/drivers/net/ixgbe/base/ixgbe_phy.c b/drivers/net/ixgbe/base/ixgbe_phy.c\nindex 823cf161e..620154a41 100644\n--- a/drivers/net/ixgbe/base/ixgbe_phy.c\n+++ b/drivers/net/ixgbe/base/ixgbe_phy.c\n@@ -542,6 +542,26 @@ s32 ixgbe_reset_phy_generic(struct ixgbe_hw *hw)\n \treturn status;\n }\n \n+/**\n+ * ixgbe_restart_auto_neg - Restart auto negotiation on the PHY\n+ * @hw: pointer to hardware structure\n+ **/\n+void ixgbe_restart_auto_neg(struct ixgbe_hw *hw)\n+{\n+\tu16 autoneg_reg;\n+\n+\t/* Check if PHY reset is blocked by MNG FW */\n+\tif (ixgbe_check_reset_blocked(hw))\n+\t\treturn;\n+\n+\t/* Restart PHY auto-negotiation. */\n+\thw->phy.ops.read_reg(hw, IXGBE_MDIO_AUTO_NEG_CONTROL,\n+\t\t\t\tIXGBE_MDIO_AUTO_NEG_DEV_TYPE, &autoneg_reg);\n+\tautoneg_reg |= IXGBE_MII_RESTART;\n+\thw->phy.ops.write_reg(hw, IXGBE_MDIO_AUTO_NEG_CONTROL,\n+\t\t\t\tIXGBE_MDIO_AUTO_NEG_DEV_TYPE, autoneg_reg);\n+}\n+\n /**\n  * ixgbe_read_phy_mdi - Reads a value from a specified PHY register without\n  * the SWFW lock\n@@ -826,19 +846,7 @@ s32 ixgbe_setup_phy_link_generic(struct ixgbe_hw *hw)\n \t\t\t      IXGBE_MDIO_AUTO_NEG_DEV_TYPE,\n \t\t\t      autoneg_reg);\n \n-\t/* Blocked by MNG FW so don't reset PHY */\n-\tif (ixgbe_check_reset_blocked(hw))\n-\t\treturn status;\n-\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-\tautoneg_reg |= IXGBE_MII_RESTART;\n-\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+\tixgbe_restart_auto_neg(hw);\n \treturn status;\n }\n \n@@ -1062,19 +1070,7 @@ s32 ixgbe_setup_phy_link_tnx(struct ixgbe_hw *hw)\n \t\t\t\t      autoneg_reg);\n \t}\n \n-\t/* Blocked by MNG FW so don't reset PHY */\n-\tif (ixgbe_check_reset_blocked(hw))\n-\t\treturn status;\n-\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-\tautoneg_reg |= IXGBE_MII_RESTART;\n-\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+\tixgbe_restart_auto_neg(hw);\n \treturn status;\n }\n \ndiff --git a/drivers/net/ixgbe/base/ixgbe_phy.h b/drivers/net/ixgbe/base/ixgbe_phy.h\nindex a06c3be17..e28c52a7b 100644\n--- a/drivers/net/ixgbe/base/ixgbe_phy.h\n+++ b/drivers/net/ixgbe/base/ixgbe_phy.h\n@@ -133,6 +133,7 @@ enum ixgbe_phy_type ixgbe_get_phy_type_from_id(u32 phy_id);\n s32 ixgbe_get_phy_id(struct ixgbe_hw *hw);\n s32 ixgbe_identify_phy_generic(struct ixgbe_hw *hw);\n s32 ixgbe_reset_phy_generic(struct ixgbe_hw *hw);\n+void ixgbe_restart_auto_neg(struct ixgbe_hw *hw);\n s32 ixgbe_read_phy_reg_mdi(struct ixgbe_hw *hw, u32 reg_addr, u32 device_type,\n \t\t\t   u16 *phy_data);\n s32 ixgbe_write_phy_reg_mdi(struct ixgbe_hw *hw, u32 reg_addr, u32 device_type,\n",
    "prefixes": [
        "v3",
        "09/19"
    ]
}