get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 772708,
    "url": "http://patchwork.ozlabs.org/api/patches/772708/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20170607213621.18256-5-anthony.l.nguyen@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": "<20170607213621.18256-5-anthony.l.nguyen@intel.com>",
    "list_archive_url": null,
    "date": "2017-06-07T21:36:21",
    "name": "[5/5] ixgbe: Disable flow control for XFI",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "b46e19c2a9d07976432613d85f9e247873908701",
    "submitter": {
        "id": 68875,
        "url": "http://patchwork.ozlabs.org/api/people/68875/?format=api",
        "name": "Tony Nguyen",
        "email": "anthony.l.nguyen@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/20170607213621.18256-5-anthony.l.nguyen@intel.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/772708/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/772708/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"
        ],
        "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 3wjhlz0s0dz9s4q\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu,  8 Jun 2017 07:39:43 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 98AF92FDB0;\n\tWed,  7 Jun 2017 21:39:41 +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 VTQChiU7v-83; Wed,  7 Jun 2017 21:39:39 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id 7F048302CB;\n\tWed,  7 Jun 2017 21:39:39 +0000 (UTC)",
            "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 34B461C0DFA\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed,  7 Jun 2017 21:39:35 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 2AA2F82110\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed,  7 Jun 2017 21:39:35 +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 H6kkdb1hzLyv for <intel-wired-lan@lists.osuosl.org>;\n\tWed,  7 Jun 2017 21:39:33 +0000 (UTC)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id C62ED822AB\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed,  7 Jun 2017 21:39:33 +0000 (UTC)",
            "from orsmga004.jf.intel.com ([10.7.209.38])\n\tby orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t07 Jun 2017 14:39:32 -0700",
            "from anguy11-linux.jf.intel.com ([134.134.145.139])\n\tby orsmga004.jf.intel.com with ESMTP; 07 Jun 2017 14:39:32 -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.39,311,1493708400\"; d=\"scan'208\";a=\"95714308\"",
        "From": "Tony Nguyen <anthony.l.nguyen@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Wed,  7 Jun 2017 14:36:21 -0700",
        "Message-Id": "<20170607213621.18256-5-anthony.l.nguyen@intel.com>",
        "X-Mailer": "git-send-email 2.9.3",
        "In-Reply-To": "<20170607213621.18256-1-anthony.l.nguyen@intel.com>",
        "References": "<20170607213621.18256-1-anthony.l.nguyen@intel.com>",
        "Subject": "[Intel-wired-lan] [PATCH 5/5] ixgbe: Disable flow control for XFI",
        "X-BeenThere": "intel-wired-lan@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.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>",
        "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": "Flow control autonegotiation is not supported for XFI.  Make sure that\nixgbe_device_supports_autoneg_fc() returns false and\nhw->fc.disable_fc_autoneg is set to true to avoid running the fc_autoneg\nfunction for that device.\n\nSigned-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>\nSigned-off-by: Emil Tantilov <emil.s.tantilov@intel.com>\n---\n drivers/net/ethernet/intel/ixgbe/ixgbe_common.c |  5 ++-\n drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c   | 57 ++++++++++++++-----------\n 2 files changed, 35 insertions(+), 27 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c\nindex 40ae7db..2c19070 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c\n@@ -97,7 +97,10 @@ bool ixgbe_device_supports_autoneg_fc(struct ixgbe_hw *hw)\n \n \t\tbreak;\n \tcase ixgbe_media_type_backplane:\n-\t\tsupported = true;\n+\t\tif (hw->device_id == IXGBE_DEV_ID_X550EM_X_XFI)\n+\t\t\tsupported = false;\n+\t\telse\n+\t\t\tsupported = true;\n \t\tbreak;\n \tcase ixgbe_media_type_copper:\n \t\t/* only some copper devices support flow control autoneg */\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c\nindex ba97685..4c8e545 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c\n@@ -2843,7 +2843,7 @@ static s32 ixgbe_setup_fc_x550em(struct ixgbe_hw *hw)\n {\n \tbool pause, asm_dir;\n \tu32 reg_val;\n-\ts32 rc;\n+\ts32 rc = 0;\n \n \t/* Validate the requested mode */\n \tif (hw->fc.strict_ieee && hw->fc.requested_mode == ixgbe_fc_rx_pause) {\n@@ -2886,32 +2886,37 @@ static s32 ixgbe_setup_fc_x550em(struct ixgbe_hw *hw)\n \t\treturn IXGBE_ERR_CONFIG;\n \t}\n \n-\tif (hw->device_id != IXGBE_DEV_ID_X550EM_X_KR &&\n-\t    hw->device_id != IXGBE_DEV_ID_X550EM_A_KR &&\n-\t    hw->device_id != IXGBE_DEV_ID_X550EM_A_KR_L)\n-\t\treturn 0;\n-\n-\trc = hw->mac.ops.read_iosf_sb_reg(hw,\n-\t\t\t\t\t  IXGBE_KRM_AN_CNTL_1(hw->bus.lan_id),\n-\t\t\t\t\t  IXGBE_SB_IOSF_TARGET_KR_PHY,\n-\t\t\t\t\t  &reg_val);\n-\tif (rc)\n-\t\treturn rc;\n-\n-\treg_val &= ~(IXGBE_KRM_AN_CNTL_1_SYM_PAUSE |\n-\t\t     IXGBE_KRM_AN_CNTL_1_ASM_PAUSE);\n-\tif (pause)\n-\t\treg_val |= IXGBE_KRM_AN_CNTL_1_SYM_PAUSE;\n-\tif (asm_dir)\n-\t\treg_val |= IXGBE_KRM_AN_CNTL_1_ASM_PAUSE;\n-\trc = hw->mac.ops.write_iosf_sb_reg(hw,\n-\t\t\t\t\t   IXGBE_KRM_AN_CNTL_1(hw->bus.lan_id),\n-\t\t\t\t\t   IXGBE_SB_IOSF_TARGET_KR_PHY,\n-\t\t\t\t\t   reg_val);\n-\n-\t/* This device does not fully support AN. */\n-\thw->fc.disable_fc_autoneg = true;\n+\tswitch (hw->device_id) {\n+\tcase IXGBE_DEV_ID_X550EM_X_KR:\n+\tcase IXGBE_DEV_ID_X550EM_A_KR:\n+\tcase IXGBE_DEV_ID_X550EM_A_KR_L:\n+\t\trc = hw->mac.ops.read_iosf_sb_reg(hw,\n+\t\t\t\t\t    IXGBE_KRM_AN_CNTL_1(hw->bus.lan_id),\n+\t\t\t\t\t    IXGBE_SB_IOSF_TARGET_KR_PHY,\n+\t\t\t\t\t    &reg_val);\n+\t\tif (rc)\n+\t\t\treturn rc;\n \n+\t\treg_val &= ~(IXGBE_KRM_AN_CNTL_1_SYM_PAUSE |\n+\t\t\t     IXGBE_KRM_AN_CNTL_1_ASM_PAUSE);\n+\t\tif (pause)\n+\t\t\treg_val |= IXGBE_KRM_AN_CNTL_1_SYM_PAUSE;\n+\t\tif (asm_dir)\n+\t\t\treg_val |= IXGBE_KRM_AN_CNTL_1_ASM_PAUSE;\n+\t\trc = hw->mac.ops.write_iosf_sb_reg(hw,\n+\t\t\t\t\t    IXGBE_KRM_AN_CNTL_1(hw->bus.lan_id),\n+\t\t\t\t\t    IXGBE_SB_IOSF_TARGET_KR_PHY,\n+\t\t\t\t\t    reg_val);\n+\n+\t\t/* This device does not fully support AN. */\n+\t\thw->fc.disable_fc_autoneg = true;\n+\t\tbreak;\n+\tcase IXGBE_DEV_ID_X550EM_X_XFI:\n+\t\thw->fc.disable_fc_autoneg = true;\n+\t\tbreak;\n+\tdefault:\n+\t\tbreak;\n+\t}\n \treturn rc;\n }\n \n",
    "prefixes": [
        "5/5"
    ]
}