get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 44790,
    "url": "http://patches.dpdk.org/api/patches/44790/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180917092814.59921-4-xiaoyun.li@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": "<20180917092814.59921-4-xiaoyun.li@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180917092814.59921-4-xiaoyun.li@intel.com",
    "date": "2018-09-17T09:28:10",
    "name": "[v2,3/7] net/ixgbe/base: add FW recovery mode check",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "630378c6bdc9e4da6f7ae6c6a83e556e5c58203b",
    "submitter": {
        "id": 798,
        "url": "http://patches.dpdk.org/api/people/798/?format=api",
        "name": "Li, Xiaoyun",
        "email": "xiaoyun.li@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/20180917092814.59921-4-xiaoyun.li@intel.com/mbox/",
    "series": [
        {
            "id": 1350,
            "url": "http://patches.dpdk.org/api/series/1350/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1350",
            "date": "2018-09-17T09:28:07",
            "name": "update ixgbe base code",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/1350/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/44790/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/44790/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 50F14569B;\n\tMon, 17 Sep 2018 11:36:57 +0200 (CEST)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id 85DFF4F9C\n\tfor <dev@dpdk.org>; Mon, 17 Sep 2018 11:36:53 +0200 (CEST)",
            "from fmsmga004.fm.intel.com ([10.253.24.48])\n\tby fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t17 Sep 2018 02:36:53 -0700",
            "from dpdk-xiaoyun3.sh.intel.com ([10.67.119.41])\n\tby fmsmga004.fm.intel.com with ESMTP; 17 Sep 2018 02:36:52 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.53,384,1531810800\"; d=\"scan'208\";a=\"89406536\"",
        "From": "Xiaoyun Li <xiaoyun.li@intel.com>",
        "To": "qi.z.zhang@intel.com,\n\twenzhuo.lu@intel.com,\n\tferruh.yigit@intel.com",
        "Cc": "dev@dpdk.org,\n\tXiaoyun Li <xiaoyun.li@intel.com>",
        "Date": "Mon, 17 Sep 2018 17:28:10 +0800",
        "Message-Id": "<20180917092814.59921-4-xiaoyun.li@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20180917092814.59921-1-xiaoyun.li@intel.com>",
        "References": "<20180910163753.85966-1-xiaoyun.li@intel.com>\n\t<20180917092814.59921-1-xiaoyun.li@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 3/7] net/ixgbe/base: add FW recovery mode check",
        "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": "Add FM NVM recovery mode check. Allow the software to detect this.\n\nSigned-off-by: Xiaoyun Li <xiaoyun.li@intel.com>\n---\n drivers/net/ixgbe/base/ixgbe_api.c  | 12 ++++++++++++\n drivers/net/ixgbe/base/ixgbe_api.h  |  1 +\n drivers/net/ixgbe/base/ixgbe_type.h |  4 ++++\n drivers/net/ixgbe/base/ixgbe_x550.c | 16 ++++++++++++++++\n drivers/net/ixgbe/base/ixgbe_x550.h |  1 +\n 5 files changed, 34 insertions(+)",
    "diff": "diff --git a/drivers/net/ixgbe/base/ixgbe_api.c b/drivers/net/ixgbe/base/ixgbe_api.c\nindex 3450d401f..873c07999 100644\n--- a/drivers/net/ixgbe/base/ixgbe_api.c\n+++ b/drivers/net/ixgbe/base/ixgbe_api.c\n@@ -1327,6 +1327,18 @@ void ixgbe_restore_mdd_vf(struct ixgbe_hw *hw, u32 vf)\n \t\thw->mac.ops.restore_mdd_vf(hw, vf);\n }\n \n+/**\n+ *  ixgbe_fw_recovery_mode - Check if in FW NVM recovery mode\n+ *  @hw: pointer to hardware structure\n+ *\n+ **/\n+bool ixgbe_fw_recovery_mode(struct ixgbe_hw *hw)\n+{\n+\tif (hw->mac.ops.fw_recovery_mode)\n+\t\treturn hw->mac.ops.fw_recovery_mode(hw);\n+\treturn false;\n+}\n+\n /**\n  *  ixgbe_enter_lplu - Transition to low power states\n  *  @hw: pointer to hardware structure\ndiff --git a/drivers/net/ixgbe/base/ixgbe_api.h b/drivers/net/ixgbe/base/ixgbe_api.h\nindex 8ec951e60..ff8f7b261 100644\n--- a/drivers/net/ixgbe/base/ixgbe_api.h\n+++ b/drivers/net/ixgbe/base/ixgbe_api.h\n@@ -185,6 +185,7 @@ void ixgbe_disable_mdd(struct ixgbe_hw *hw);\n void ixgbe_enable_mdd(struct ixgbe_hw *hw);\n void ixgbe_mdd_event(struct ixgbe_hw *hw, u32 *vf_bitmap);\n void ixgbe_restore_mdd_vf(struct ixgbe_hw *hw, u32 vf);\n+bool ixgbe_fw_recovery_mode(struct ixgbe_hw *hw);\n s32 ixgbe_enter_lplu(struct ixgbe_hw *hw);\n s32 ixgbe_handle_lasi(struct ixgbe_hw *hw);\n void ixgbe_set_rate_select_speed(struct ixgbe_hw *hw, ixgbe_link_speed speed);\ndiff --git a/drivers/net/ixgbe/base/ixgbe_type.h b/drivers/net/ixgbe/base/ixgbe_type.h\nindex ff3546ece..ea34bb979 100644\n--- a/drivers/net/ixgbe/base/ixgbe_type.h\n+++ b/drivers/net/ixgbe/base/ixgbe_type.h\n@@ -1067,6 +1067,9 @@ struct ixgbe_dmac_config {\n #define IXGBE_FWSM_MODE_MASK\t0xE\n #define IXGBE_FWSM_TS_ENABLED\t0x1\n #define IXGBE_FWSM_FW_MODE_PT\t0x4\n+#define IXGBE_FWSM_FW_NVM_RECOVERY_MODE (1 << 5)\n+#define IXGBE_FWSM_EXT_ERR_IND_MASK 0x01F80000\n+#define IXGBE_FWSM_FW_VAL_BIT\t(1 << 15)\n \n /* ARC Subsystem registers */\n #define IXGBE_HICR\t\t0x15F00\n@@ -4016,6 +4019,7 @@ struct ixgbe_mac_operations {\n \tvoid (*enable_mdd)(struct ixgbe_hw *hw);\n \tvoid (*mdd_event)(struct ixgbe_hw *hw, u32 *vf_bitmap);\n \tvoid (*restore_mdd_vf)(struct ixgbe_hw *hw, u32 vf);\n+\tbool (*fw_recovery_mode)(struct ixgbe_hw *hw);\n };\n \n struct ixgbe_phy_operations {\ndiff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c\nindex a44d95e95..c9f1563a9 100644\n--- a/drivers/net/ixgbe/base/ixgbe_x550.c\n+++ b/drivers/net/ixgbe/base/ixgbe_x550.c\n@@ -53,6 +53,7 @@ s32 ixgbe_init_ops_X550(struct ixgbe_hw *hw)\n \tmac->ops.enable_mdd = ixgbe_enable_mdd_X550;\n \tmac->ops.mdd_event = ixgbe_mdd_event_X550;\n \tmac->ops.restore_mdd_vf = ixgbe_restore_mdd_vf_X550;\n+\tmac->ops.fw_recovery_mode = ixgbe_fw_recovery_mode_X550;\n \tmac->ops.disable_rx = ixgbe_disable_rx_x550;\n \t/* Manageability interface */\n \tmac->ops.set_fw_drv_ver = ixgbe_set_fw_drv_ver_x550;\n@@ -4632,3 +4633,18 @@ s32 ixgbe_set_fw_drv_ver_x550(struct ixgbe_hw *hw, u8 maj, u8 min,\n \n \treturn ret_val;\n }\n+\n+/**\n+ * ixgbe_fw_recovery_mode_X550 - Check FW NVM recovery mode\n+ * @hw: pointer t hardware structure\n+ *\n+ * Returns true if in FW NVM recovery mode.\n+ **/\n+bool ixgbe_fw_recovery_mode_X550(struct ixgbe_hw *hw)\n+{\n+\tu32 fwsm;\n+\n+\tfwsm = IXGBE_READ_REG(hw, IXGBE_FWSM_BY_MAC(hw));\n+\n+\treturn !!(fwsm & IXGBE_FWSM_FW_NVM_RECOVERY_MODE);\n+}\ndiff --git a/drivers/net/ixgbe/base/ixgbe_x550.h b/drivers/net/ixgbe/base/ixgbe_x550.h\nindex f90007ce8..3bd98f243 100644\n--- a/drivers/net/ixgbe/base/ixgbe_x550.h\n+++ b/drivers/net/ixgbe/base/ixgbe_x550.h\n@@ -92,4 +92,5 @@ s32 ixgbe_reset_phy_t_X550em(struct ixgbe_hw *hw);\n s32 ixgbe_identify_sfp_module_X550em(struct ixgbe_hw *hw);\n s32 ixgbe_led_on_t_X550em(struct ixgbe_hw *hw, u32 led_idx);\n s32 ixgbe_led_off_t_X550em(struct ixgbe_hw *hw, u32 led_idx);\n+bool ixgbe_fw_recovery_mode_X550(struct ixgbe_hw *hw);\n #endif /* _IXGBE_X550_H_ */\n",
    "prefixes": [
        "v2",
        "3/7"
    ]
}