get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 71336,
    "url": "http://patches.dpdk.org/api/patches/71336/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200612032410.20864-13-guinanx.sun@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": "<20200612032410.20864-13-guinanx.sun@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200612032410.20864-13-guinanx.sun@intel.com",
    "date": "2020-06-12T03:24:01",
    "name": "[12/21] net/ixgbe/base: create dedicated func to restart auto nego",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "8087a76acc8d6052fd03efb8a30138955b377a08",
    "submitter": {
        "id": 1476,
        "url": "http://patches.dpdk.org/api/people/1476/?format=api",
        "name": "Guinan Sun",
        "email": "guinanx.sun@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "http://patches.dpdk.org/api/users/1540/?format=api",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200612032410.20864-13-guinanx.sun@intel.com/mbox/",
    "series": [
        {
            "id": 10428,
            "url": "http://patches.dpdk.org/api/series/10428/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=10428",
            "date": "2020-06-12T03:23:49",
            "name": "update ixgbe base code",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/10428/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/71336/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/71336/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id E8E65A00BE;\n\tFri, 12 Jun 2020 05:48:03 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 3E7D51BEE1;\n\tFri, 12 Jun 2020 05:46:32 +0200 (CEST)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n by dpdk.org (Postfix) with ESMTP id AD4DA1B951\n for <dev@dpdk.org>; Fri, 12 Jun 2020 05:46:27 +0200 (CEST)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 11 Jun 2020 20:46:27 -0700",
            "from intel.sh.intel.com ([10.239.255.18])\n by orsmga002.jf.intel.com with ESMTP; 11 Jun 2020 20:46:25 -0700"
        ],
        "IronPort-SDR": [
            "\n 3qDOG+a3iqXaLVNUjYknupRo6Z/+wpoFl24DZuB8KolBsrvS6i7MgAq94CFw0HhmuZMhnUTE9S\n oHI/5QY/Dwng==",
            "\n Z+xMvDx8KAy9tXTDcRMHkmsyYzQDEwFrZFZgbnKsMpYRwk7r8bvEkUre5EUMmNuXIrC+dOECY4\n eNjAbv3XAhTA=="
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.73,501,1583222400\"; d=\"scan'208\";a=\"289759557\"",
        "From": "Guinan Sun <guinanx.sun@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Guinan Sun <guinanx.sun@intel.com>,\n Jakub Chylkowski <jakubx.chylkowski@intel.com>",
        "Date": "Fri, 12 Jun 2020 03:24:01 +0000",
        "Message-Id": "<20200612032410.20864-13-guinanx.sun@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20200612032410.20864-1-guinanx.sun@intel.com>",
        "References": "<20200612032410.20864-1-guinanx.sun@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 12/21] net/ixgbe/base: create dedicated func to\n\trestart auto nego",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "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-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Code to restart auto negotiation on PHY is already used in two places\nand is needed in CORE repo of ixgben. This patch places it in dedicated\nfunction for code clarity and makes it available outside the SHARED repo.\n\nTesting Hints (required if no HSD):\nCheck if link goes up and traffic works.\nChange speed on the uplink.\n\nSigned-off-by: Jakub Chylkowski <jakubx.chylkowski@intel.com>\nSigned-off-by: Guinan Sun <guinanx.sun@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": [
        "12/21"
    ]
}