get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 45263,
    "url": "https://patches.dpdk.org/api/patches/45263/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20180925023442.134705-3-qi.z.zhang@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": "<20180925023442.134705-3-qi.z.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180925023442.134705-3-qi.z.zhang@intel.com",
    "date": "2018-09-25T02:34:24",
    "name": "[02/20] net/i40e/base: fix partition id calculation for X722",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "cd073d2d2322ffde02588adc5fa5b33099a56e05",
    "submitter": {
        "id": 504,
        "url": "https://patches.dpdk.org/api/people/504/?format=api",
        "name": "Qi Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "https://patches.dpdk.org/api/users/1540/?format=api",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20180925023442.134705-3-qi.z.zhang@intel.com/mbox/",
    "series": [
        {
            "id": 1477,
            "url": "https://patches.dpdk.org/api/series/1477/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=1477",
            "date": "2018-09-25T02:34:22",
            "name": "base code update",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/1477/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/45263/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/45263/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 [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id CC2E91B178;\n\tTue, 25 Sep 2018 04:34:16 +0200 (CEST)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id F3A355F2B;\n\tTue, 25 Sep 2018 04:34:09 +0200 (CEST)",
            "from orsmga005.jf.intel.com ([10.7.209.41])\n\tby fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t24 Sep 2018 19:34:08 -0700",
            "from dpdk51.sh.intel.com ([10.67.110.190])\n\tby orsmga005.jf.intel.com with ESMTP; 24 Sep 2018 19:33:44 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.54,300,1534834800\"; d=\"scan'208\";a=\"259958445\"",
        "From": "Qi Zhang <qi.z.zhang@intel.com>",
        "To": "beilei.xing@intel.com",
        "Cc": "dev@dpdk.org, ferruh.yigit@intel.com, helin.zhang@intel.com,\n\tQi Zhang <qi.z.zhang@intel.com>, stable@dpdk.org",
        "Date": "Tue, 25 Sep 2018 10:34:24 +0800",
        "Message-Id": "<20180925023442.134705-3-qi.z.zhang@intel.com>",
        "X-Mailer": "git-send-email 2.13.6",
        "In-Reply-To": "<20180925023442.134705-1-qi.z.zhang@intel.com>",
        "References": "<20180925023442.134705-1-qi.z.zhang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 02/20] net/i40e/base: fix partition id\n\tcalculation for X722",
        "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "This patch overwrites number of ports for X722 devices with support for\nOCP PHY mezzanine. The old method with checking if port is disabled in\nthe PRTGEN_CNF register cannot be used in this case. When the OCP is\nremoved, ports were seen as disabled, which resulted in wrong calculation\nof partition id, that caused WoL to be disabled on certain ports.\n\nFixes: 3c89193a36fd (\"i40e/base: support WOL config for X722\")\nCc: stable@dpdk.org\n\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\n---\n drivers/net/i40e/base/i40e_common.c | 23 ++++++++++++++++++++++-\n drivers/net/i40e/base/i40e_type.h   |  4 +++-\n 2 files changed, 25 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c\nindex dce5c3965..ee117bd5e 100644\n--- a/drivers/net/i40e/base/i40e_common.c\n+++ b/drivers/net/i40e/base/i40e_common.c\n@@ -3678,9 +3678,10 @@ STATIC void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,\n \tu32 valid_functions, num_functions;\n \tu32 number, logical_id, phys_id;\n \tstruct i40e_hw_capabilities *p;\n+\tenum i40e_status_code status;\n+\tu16 id, ocp_cfg_word0;\n \tu8 major_rev;\n \tu32 i = 0;\n-\tu16 id;\n \n \tcap = (struct i40e_aqc_list_capabilities_element_resp *) buff;\n \n@@ -3972,6 +3973,26 @@ STATIC void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,\n \t\t\thw->num_ports++;\n \t}\n \n+\t/* OCP cards case: if a mezz is removed the ethernet port is at\n+\t * disabled state in PRTGEN_CNF register. Additional NVM read is\n+\t * needed in order to check if we are dealing with OCP card.\n+\t * Those cards have 4 PFs at minimum, so using PRTGEN_CNF for counting\n+\t * physical ports results in wrong partition id calculation and thus\n+\t * not supporting WoL.\n+\t */\n+\tif (hw->mac.type == I40E_MAC_X722) {\n+\t\tif (i40e_acquire_nvm(hw, I40E_RESOURCE_READ) == I40E_SUCCESS) {\n+\t\t\tstatus = i40e_aq_read_nvm(hw, I40E_SR_EMP_MODULE_PTR,\n+\t\t\t\t\t\t  2 * I40E_SR_OCP_CFG_WORD0,\n+\t\t\t\t\t\t  sizeof(ocp_cfg_word0),\n+\t\t\t\t\t\t  &ocp_cfg_word0, true, NULL);\n+\t\t\tif (status == I40E_SUCCESS &&\n+\t\t\t    (ocp_cfg_word0 & I40E_SR_OCP_ENABLED))\n+\t\t\t\thw->num_ports = 4;\n+\t\t\ti40e_release_nvm(hw);\n+\t\t}\n+\t}\n+\n \tvalid_functions = p->valid_functions;\n \tnum_functions = 0;\n \twhile (valid_functions) {\ndiff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h\nindex 55acc147e..7dde3bfd2 100644\n--- a/drivers/net/i40e/base/i40e_type.h\n+++ b/drivers/net/i40e/base/i40e_type.h\n@@ -1512,7 +1512,9 @@ struct i40e_hw_port_stats {\n #define I40E_SR_CONTROL_WORD_1_MASK\t(0x03 << I40E_SR_CONTROL_WORD_1_SHIFT)\n #define I40E_SR_CONTROL_WORD_1_NVM_BANK_VALID\tBIT(5)\n #define I40E_SR_NVM_MAP_STRUCTURE_TYPE\t\tBIT(12)\n-#define I40E_PTR_TYPE                           BIT(15)\n+#define I40E_PTR_TYPE\t\t\t\tBIT(15)\n+#define I40E_SR_OCP_CFG_WORD0\t\t\t0x2B\n+#define I40E_SR_OCP_ENABLED\t\t\tBIT(15)\n \n /* Shadow RAM related */\n #define I40E_SR_SECTOR_SIZE_IN_WORDS\t0x800\n",
    "prefixes": [
        "02/20"
    ]
}