get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 883389,
    "url": "http://patchwork.ozlabs.org/api/patches/883389/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20180308225211.12254-6-jeffrey.t.kirsher@intel.com/",
    "project": {
        "id": 46,
        "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api",
        "name": "Intel Wired Ethernet development",
        "link_name": "intel-wired-lan",
        "list_id": "intel-wired-lan.osuosl.org",
        "list_email": "intel-wired-lan@osuosl.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20180308225211.12254-6-jeffrey.t.kirsher@intel.com>",
    "list_archive_url": null,
    "date": "2018-03-08T22:52:10",
    "name": "[S87,v5,6/7] i40e: fix for wrong partition id calculation on OCP mezz cards",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "222cbf89ab4bb2fdc907ce9676b304451e9fd3a4",
    "submitter": {
        "id": 473,
        "url": "http://patchwork.ozlabs.org/api/people/473/?format=api",
        "name": "Kirsher, Jeffrey T",
        "email": "jeffrey.t.kirsher@intel.com"
    },
    "delegate": {
        "id": 68,
        "url": "http://patchwork.ozlabs.org/api/users/68/?format=api",
        "username": "jtkirshe",
        "first_name": "Jeff",
        "last_name": "Kirsher",
        "email": "jeffrey.t.kirsher@intel.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20180308225211.12254-6-jeffrey.t.kirsher@intel.com/mbox/",
    "series": [
        {
            "id": 32763,
            "url": "http://patchwork.ozlabs.org/api/series/32763/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=32763",
            "date": "2018-03-08T22:52:05",
            "name": "[S87,v5,1/7] i40e: Fix attach VF to VM issue",
            "version": 5,
            "mbox": "http://patchwork.ozlabs.org/series/32763/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/883389/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/883389/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<intel-wired-lan-bounces@osuosl.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.138; helo=whitealder.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org;\n\tdmarc=none (p=none dis=none) header.from=intel.com"
        ],
        "Received": [
            "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3zy5Nx21jXz9scY\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  9 Mar 2018 09:52:00 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 5E4778918D;\n\tThu,  8 Mar 2018 22:51:59 +0000 (UTC)",
            "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id kTKg3twW9oZJ; Thu,  8 Mar 2018 22:51:56 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id B1CD7891C5;\n\tThu,  8 Mar 2018 22:51:56 +0000 (UTC)",
            "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 7137F1C03E8\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu,  8 Mar 2018 22:51:52 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 6782022688\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu,  8 Mar 2018 22:51:52 +0000 (UTC)",
            "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id 1WCGJpRnOHLe for <intel-wired-lan@lists.osuosl.org>;\n\tThu,  8 Mar 2018 22:51:47 +0000 (UTC)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby silver.osuosl.org (Postfix) with ESMTPS id 3212E22906\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu,  8 Mar 2018 22:51:47 +0000 (UTC)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t08 Mar 2018 14:51:46 -0800",
            "from jtkirshe-nuc.jf.intel.com ([134.134.177.59])\n\tby orsmga001.jf.intel.com with ESMTP; 08 Mar 2018 14:51:46 -0800"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6",
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.47,442,1515484800\"; d=\"scan'208\";a=\"37164046\"",
        "From": "Jeff Kirsher <jeffrey.t.kirsher@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Thu,  8 Mar 2018 14:52:10 -0800",
        "Message-Id": "<20180308225211.12254-6-jeffrey.t.kirsher@intel.com>",
        "X-Mailer": "git-send-email 2.14.3",
        "In-Reply-To": "<20180308225211.12254-1-jeffrey.t.kirsher@intel.com>",
        "References": "<20180308225211.12254-1-jeffrey.t.kirsher@intel.com>",
        "Subject": "[Intel-wired-lan] [S87 v5 6/7] i40e: fix for wrong partition id\n\tcalculation on OCP mezz cards",
        "X-BeenThere": "intel-wired-lan@osuosl.org",
        "X-Mailman-Version": "2.1.24",
        "Precedence": "list",
        "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.osuosl.org>",
        "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>",
        "List-Post": "<mailto:intel-wired-lan@osuosl.org>",
        "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>",
        "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>",
        "Cc": "Mariusz Stachura <mariusz.stachura@intel.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "intel-wired-lan-bounces@osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>"
    },
    "content": "From: Mariusz Stachura <mariusz.stachura@intel.com>\n\nThis patch overwrites number of ports for X722 devices with support\nfor OCP PHY mezzanine.\nThe old method with checking if port is disabled in the PRTGEN_CNF\nregister cannot be used in this case. When the OCP is removed, ports\nwere seen as disabled, which resulted in wrong calculation of partition\nid, that caused WoL to be disabled on certain ports.\n\nSigned-off-by: Mariusz Stachura <mariusz.stachura@intel.com>\n---\n drivers/net/ethernet/intel/i40e/i40e_common.c | 23 ++++++++++++++++++++++-\n drivers/net/ethernet/intel/i40e/i40e_type.h   |  3 +++\n 2 files changed, 25 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c\nindex 6ee310257cf7..792d4204bc3f 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_common.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_common.c\n@@ -3201,9 +3201,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+\tu16 id, ocp_cfg_word0;\n+\ti40e_status status;\n \tu8 major_rev;\n \tu32 i = 0;\n-\tu16 id;\n \n \tcap = (struct i40e_aqc_list_capabilities_element_resp *) buff;\n \n@@ -3390,6 +3391,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)) {\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 &&\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/ethernet/intel/i40e/i40e_type.h b/drivers/net/ethernet/intel/i40e/i40e_type.h\nindex 7485bd47fdd0..7ff2c6d55490 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_type.h\n+++ b/drivers/net/ethernet/intel/i40e/i40e_type.h\n@@ -1337,6 +1337,9 @@ struct i40e_hw_port_stats {\n #define I40E_SR_PCIE_ALT_MODULE_MAX_SIZE\t1024\n #define I40E_SR_CONTROL_WORD_1_SHIFT\t\t0x06\n #define I40E_SR_CONTROL_WORD_1_MASK\t(0x03 << I40E_SR_CONTROL_WORD_1_SHIFT)\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": [
        "S87",
        "v5",
        "6/7"
    ]
}