get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 18327,
    "url": "http://patches.dpdk.org/api/patches/18327/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1482313694-31602-8-git-send-email-wei.dai@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": "<1482313694-31602-8-git-send-email-wei.dai@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1482313694-31602-8-git-send-email-wei.dai@intel.com",
    "date": "2016-12-21T09:47:51",
    "name": "[dpdk-dev,v2,07/30] net/ixgbe/base: store link active LED",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "756769572acd0fe4f88b982455f9d630fde1c793",
    "submitter": {
        "id": 490,
        "url": "http://patches.dpdk.org/api/people/490/?format=api",
        "name": "Wei Dai",
        "email": "wei.dai@intel.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1482313694-31602-8-git-send-email-wei.dai@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/18327/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/18327/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 265CE10BE8;\n\tWed, 21 Dec 2016 10:52:08 +0100 (CET)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby dpdk.org (Postfix) with ESMTP id 0A9B310BD7\n\tfor <dev@dpdk.org>; Wed, 21 Dec 2016 10:51:57 +0100 (CET)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga103.fm.intel.com with ESMTP; 21 Dec 2016 01:51:57 -0800",
            "from dpdk4.bj.intel.com ([172.16.182.178])\n\tby fmsmga001.fm.intel.com with ESMTP; 21 Dec 2016 01:51:56 -0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos; i=\"5.33,382,1477983600\"; d=\"scan'208\";\n\ta=\"1084967421\"",
        "From": "Wei Dai <wei.dai@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "helin.zhang@intel.com, konstantin.ananyev@intel.com,\n\tWei Dai <wei.dai@intel.com>",
        "Date": "Wed, 21 Dec 2016 17:47:51 +0800",
        "Message-Id": "<1482313694-31602-8-git-send-email-wei.dai@intel.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1482313694-31602-1-git-send-email-wei.dai@intel.com>",
        "References": "<1482313694-31602-1-git-send-email-wei.dai@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 07/30] net/ixgbe/base: store link active LED",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/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 support to get the link active LED index via the LEDCTL register.\nIf the LEDCTL register does not have link active LED set then\nuse MAC default LED index.\nLink active LED is used for adapter identify/blink support.\n\nSigned-off-by: Wei Dai <wei.dai@intel.com>\n---\n drivers/net/ixgbe/base/ixgbe_common.c | 45 +++++++++++++++++++++++++++++++++++\n drivers/net/ixgbe/base/ixgbe_common.h |  1 +\n drivers/net/ixgbe/base/ixgbe_type.h   |  2 ++\n 3 files changed, 48 insertions(+)",
    "diff": "diff --git a/drivers/net/ixgbe/base/ixgbe_common.c b/drivers/net/ixgbe/base/ixgbe_common.c\nindex a6016dc..89b4b5f 100644\n--- a/drivers/net/ixgbe/base/ixgbe_common.c\n+++ b/drivers/net/ixgbe/base/ixgbe_common.c\n@@ -113,6 +113,7 @@ s32 ixgbe_init_ops_generic(struct ixgbe_hw *hw)\n \tmac->ops.led_off = ixgbe_led_off_generic;\n \tmac->ops.blink_led_start = ixgbe_blink_led_start_generic;\n \tmac->ops.blink_led_stop = ixgbe_blink_led_stop_generic;\n+\tmac->ops.init_led_link_act = ixgbe_init_led_link_act_generic;\n \n \t/* RAR, Multicast, VLAN */\n \tmac->ops.set_rar = ixgbe_set_rar_generic;\n@@ -497,6 +498,9 @@ s32 ixgbe_init_hw_generic(struct ixgbe_hw *hw)\n \t\tstatus = hw->mac.ops.start_hw(hw);\n \t}\n \n+\t/* Initialize the LED link active for LED blink support */\n+\thw->mac.ops.init_led_link_act(hw);\n+\n \treturn status;\n }\n \n@@ -1136,6 +1140,47 @@ s32 ixgbe_stop_adapter_generic(struct ixgbe_hw *hw)\n }\n \n /**\n+ *  ixgbe_init_led_link_act_generic - Store the LED index link/activity.\n+ *  @hw: pointer to hardware structure\n+ *\n+ *  Store the index for the link active LED. This will be used to support\n+ *  blinking the LED.\n+ **/\n+s32 ixgbe_init_led_link_act_generic(struct ixgbe_hw *hw)\n+{\n+\tstruct ixgbe_mac_info *mac = &hw->mac;\n+\tu32 led_reg, led_mode;\n+\tu16 i;\n+\n+\tled_reg = IXGBE_READ_REG(hw, IXGBE_LEDCTL);\n+\n+\t/* Get LED link active from the LEDCTL register */\n+\tfor (i = 0; i < 4; i++) {\n+\t\tled_mode = led_reg >> IXGBE_LED_MODE_SHIFT(i);\n+\n+\t\tif ((led_mode & IXGBE_LED_MODE_MASK_BASE) ==\n+\t\t     IXGBE_LED_LINK_ACTIVE) {\n+\t\t\tmac->led_link_act = i;\n+\t\t\treturn IXGBE_SUCCESS;\n+\t\t}\n+\t}\n+\n+\t/*\n+\t * If LEDCTL register does not have the LED link active set, then use\n+\t * known MAC defaults.\n+\t */\n+\tswitch (hw->mac.type) {\n+\tcase ixgbe_mac_X550EM_a:\n+\tcase ixgbe_mac_X550EM_x:\n+\t\tmac->led_link_act = 1;\n+\t\tbreak;\n+\tdefault:\n+\t\tmac->led_link_act = 2;\n+\t}\n+\treturn IXGBE_SUCCESS;\n+}\n+\n+/**\n  *  ixgbe_led_on_generic - Turns on the software controllable LEDs.\n  *  @hw: pointer to hardware structure\n  *  @index: led number to turn on\ndiff --git a/drivers/net/ixgbe/base/ixgbe_common.h b/drivers/net/ixgbe/base/ixgbe_common.h\nindex ae28206..93e80ea 100644\n--- a/drivers/net/ixgbe/base/ixgbe_common.h\n+++ b/drivers/net/ixgbe/base/ixgbe_common.h\n@@ -72,6 +72,7 @@ s32 ixgbe_stop_adapter_generic(struct ixgbe_hw *hw);\n \n s32 ixgbe_led_on_generic(struct ixgbe_hw *hw, u32 index);\n s32 ixgbe_led_off_generic(struct ixgbe_hw *hw, u32 index);\n+s32 ixgbe_init_led_link_act_generic(struct ixgbe_hw *hw);\n \n s32 ixgbe_init_eeprom_params_generic(struct ixgbe_hw *hw);\n s32 ixgbe_write_eeprom_generic(struct ixgbe_hw *hw, u16 offset, u16 data);\ndiff --git a/drivers/net/ixgbe/base/ixgbe_type.h b/drivers/net/ixgbe/base/ixgbe_type.h\nindex 5b2506a..b90ae6d 100644\n--- a/drivers/net/ixgbe/base/ixgbe_type.h\n+++ b/drivers/net/ixgbe/base/ixgbe_type.h\n@@ -3886,6 +3886,7 @@ struct ixgbe_mac_operations {\n \ts32 (*led_off)(struct ixgbe_hw *, u32);\n \ts32 (*blink_led_start)(struct ixgbe_hw *, u32);\n \ts32 (*blink_led_stop)(struct ixgbe_hw *, u32);\n+\ts32 (*init_led_link_act)(struct ixgbe_hw *);\n \n \t/* RAR, Multicast, VLAN */\n \ts32 (*set_rar)(struct ixgbe_hw *, u32, u8 *, u32, u32);\n@@ -4029,6 +4030,7 @@ struct ixgbe_mac_info {\n \tstruct ixgbe_dmac_config dmac_config;\n \tbool set_lben;\n \tu32  max_link_up_time;\n+\tu8   led_link_act;\n };\n \n struct ixgbe_phy_info {\n",
    "prefixes": [
        "dpdk-dev",
        "v2",
        "07/30"
    ]
}