get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 637292,
    "url": "http://patchwork.ozlabs.org/api/patches/637292/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1466197813-17401-1-git-send-email-donald.c.skidmore@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": "<1466197813-17401-1-git-send-email-donald.c.skidmore@intel.com>",
    "list_archive_url": null,
    "date": "2016-06-17T21:10:13",
    "name": "ixgbevf: Correct parameter sent to LED function",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "d49e3ec05493bc6be75f904192d86feb7e76144c",
    "submitter": {
        "id": 4487,
        "url": "http://patchwork.ozlabs.org/api/people/4487/?format=api",
        "name": "Skidmore, Donald C",
        "email": "donald.c.skidmore@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/1466197813-17401-1-git-send-email-donald.c.skidmore@intel.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/637292/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/637292/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<intel-wired-lan-bounces@lists.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"
        ],
        "Received": [
            "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\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 3rWWdd4DDwz9t2S\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 18 Jun 2016 06:12:52 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 9321A335CC;\n\tFri, 17 Jun 2016 20:12:50 +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 CoZZZZZzVuhE; Fri, 17 Jun 2016 20:12:48 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id A4E6C331C6;\n\tFri, 17 Jun 2016 20:12:48 +0000 (UTC)",
            "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id 9EEDC1C077B\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 17 Jun 2016 20:12:47 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 97C8BA65DC\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 17 Jun 2016 20:12:47 +0000 (UTC)",
            "from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id lRSaqcqPbUCU for <intel-wired-lan@lists.osuosl.org>;\n\tFri, 17 Jun 2016 20:12:46 +0000 (UTC)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id D2214A65D5\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 17 Jun 2016 20:12:46 +0000 (UTC)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga102.fm.intel.com with ESMTP; 17 Jun 2016 13:12:31 -0700",
            "from dcskidmo-m40.jf.intel.com ([134.134.3.25])\n\tby fmsmga001.fm.intel.com with ESMTP; 17 Jun 2016 13:12:31 -0700"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.26,485,1459839600\"; d=\"scan'208\";a=\"990051305\"",
        "From": "Donald C Skidmore <donald.c.skidmore@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Fri, 17 Jun 2016 17:10:13 -0400",
        "Message-Id": "<1466197813-17401-1-git-send-email-donald.c.skidmore@intel.com>",
        "X-Mailer": "git-send-email 2.4.3",
        "Subject": "[Intel-wired-lan] [PATCH] ixgbevf: Correct parameter sent to LED\n\tfunction",
        "X-BeenThere": "intel-wired-lan@lists.osuosl.org",
        "X-Mailman-Version": "2.1.18-1",
        "Precedence": "list",
        "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.lists.osuosl.org>",
        "List-Unsubscribe": "<http://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>",
        "List-Post": "<mailto:intel-wired-lan@lists.osuosl.org>",
        "List-Help": "<mailto:intel-wired-lan-request@lists.osuosl.org?subject=help>",
        "List-Subscribe": "<http://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=subscribe>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "intel-wired-lan-bounces@lists.osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@lists.osuosl.org>"
    },
    "content": "The second parameter of these functions is the index to the led we\nare interested in affecting.  However we were mistakingly passing\nthe offset in the register.  This patch corrects that and adds some\nbonds checking which would hopefully make bugs like this more noticeable\nin the future.\n\nSigned-off-by: Don Skidmore <donald.c.skidmore@intel.com>\n---\n drivers/net/ethernet/intel/ixgbe/ixgbe_common.c  | 12 ++++++++++++\n drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c |  4 ++--\n 2 files changed, 14 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c\nindex f8defc7..ce881a7 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c\n@@ -763,6 +763,9 @@ s32 ixgbe_led_on_generic(struct ixgbe_hw *hw, u32 index)\n {\n \tu32 led_reg = IXGBE_READ_REG(hw, IXGBE_LEDCTL);\n \n+\tif (index > 3)\n+\t\treturn IXGBE_ERR_PARAM;\n+\n \t/* To turn on the LED, set mode to ON. */\n \tled_reg &= ~IXGBE_LED_MODE_MASK(index);\n \tled_reg |= IXGBE_LED_ON << IXGBE_LED_MODE_SHIFT(index);\n@@ -781,6 +784,9 @@ s32 ixgbe_led_off_generic(struct ixgbe_hw *hw, u32 index)\n {\n \tu32 led_reg = IXGBE_READ_REG(hw, IXGBE_LEDCTL);\n \n+\tif (index > 3)\n+\t\treturn IXGBE_ERR_PARAM;\n+\n \t/* To turn off the LED, set mode to OFF. */\n \tled_reg &= ~IXGBE_LED_MODE_MASK(index);\n \tled_reg |= IXGBE_LED_OFF << IXGBE_LED_MODE_SHIFT(index);\n@@ -2698,6 +2704,9 @@ s32 ixgbe_blink_led_start_generic(struct ixgbe_hw *hw, u32 index)\n \tbool locked = false;\n \ts32 ret_val;\n \n+\tif (index > 3)\n+\t\treturn IXGBE_ERR_PARAM;\n+\n \t/*\n \t * Link must be up to auto-blink the LEDs;\n \t * Force it if link is down.\n@@ -2741,6 +2750,9 @@ s32 ixgbe_blink_led_stop_generic(struct ixgbe_hw *hw, u32 index)\n \tbool locked = false;\n \ts32 ret_val;\n \n+\tif (index > 3)\n+\t\treturn IXGBE_ERR_PARAM;\n+\n \tret_val = hw->mac.ops.prot_autoc_read(hw, &locked, &autoc_reg);\n \tif (ret_val)\n \t\treturn ret_val;\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c\nindex 716e643..9547191 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c\n@@ -2206,11 +2206,11 @@ static int ixgbe_set_phys_id(struct net_device *netdev,\n \t\treturn 2;\n \n \tcase ETHTOOL_ID_ON:\n-\t\thw->mac.ops.led_on(hw, IXGBE_LED_ON);\n+\t\thw->mac.ops.led_on(hw, hw->bus.func);\n \t\tbreak;\n \n \tcase ETHTOOL_ID_OFF:\n-\t\thw->mac.ops.led_off(hw, IXGBE_LED_ON);\n+\t\thw->mac.ops.led_off(hw, hw->bus.func);\n \t\tbreak;\n \n \tcase ETHTOOL_ID_INACTIVE:\n",
    "prefixes": []
}