get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 881847,
    "url": "http://patchwork.ozlabs.org/api/patches/881847/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20180306015553.10441-1-bpoirier@suse.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": "<20180306015553.10441-1-bpoirier@suse.com>",
    "list_archive_url": null,
    "date": "2018-03-06T01:55:52",
    "name": "[1/2] Revert \"e1000e: Separate signaling for link check/link up\"",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "68b743c0b8431b714ea2ff3e3feb1c08d211cf3b",
    "submitter": {
        "id": 67008,
        "url": "http://patchwork.ozlabs.org/api/people/67008/?format=api",
        "name": "Benjamin Poirier",
        "email": "bpoirier@suse.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/20180306015553.10441-1-bpoirier@suse.com/mbox/",
    "series": [
        {
            "id": 32078,
            "url": "http://patchwork.ozlabs.org/api/series/32078/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=32078",
            "date": "2018-03-06T01:55:52",
            "name": "[1/2] Revert \"e1000e: Separate signaling for link check/link up\"",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/32078/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/881847/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/881847/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=suse.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 3zwKd34jTZz9sbT\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue,  6 Mar 2018 12:56:22 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 506B986317;\n\tTue,  6 Mar 2018 01:56:21 +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 Q9ADZaS8GPhK; Tue,  6 Mar 2018 01:56:20 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 13C008642E;\n\tTue,  6 Mar 2018 01:56:20 +0000 (UTC)",
            "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 2C6D51CEF86\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue,  6 Mar 2018 01:56:19 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 269398642E\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue,  6 Mar 2018 01:56:19 +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 NiwQW9y-MVLq for <intel-wired-lan@lists.osuosl.org>;\n\tTue,  6 Mar 2018 01:56:18 +0000 (UTC)",
            "from mx2.suse.de (mx2.suse.de [195.135.220.15])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id EE45086317\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue,  6 Mar 2018 01:56:17 +0000 (UTC)",
            "from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254])\n\tby mx2.suse.de (Postfix) with ESMTP id 1E55DAE20;\n\tTue,  6 Mar 2018 01:56:15 +0000 (UTC)"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org",
            "by amavisd-new at test-mx.suse.de"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6",
        "From": "Benjamin Poirier <bpoirier@suse.com>",
        "To": "Jeff Kirsher <jeffrey.t.kirsher@intel.com>",
        "Date": "Tue,  6 Mar 2018 10:55:52 +0900",
        "Message-Id": "<20180306015553.10441-1-bpoirier@suse.com>",
        "X-Mailer": "git-send-email 2.16.2",
        "Subject": "[Intel-wired-lan] [PATCH 1/2] Revert \"e1000e: Separate signaling\n\tfor link check/link up\"",
        "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": "netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org,\n\tlinux-kernel@vger.kernel.org,\n\tLennart Sorensen <lsorense@csclub.uwaterloo.ca>",
        "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": "This reverts commit 19110cfbb34d4af0cdfe14cd243f3b09dc95b013.\nThis reverts commit 4110e02eb45ea447ec6f5459c9934de0a273fb91.\nThis reverts commit d3604515c9eda464a92e8e67aae82dfe07fe3c98.\n\nCommit 19110cfbb34d (\"e1000e: Separate signaling for link check/link up\")\nchanged what happens to the link status when there is an error which\nhappens after \"get_link_status = false\" in the copper check_for_link\ncallbacks. Previously, such an error would be ignored and the link\nconsidered up. After that commit, any error implies that the link is down.\n\nRevert commit 19110cfbb34d (\"e1000e: Separate signaling for link check/link\nup\") and its followups. After reverting, the race condition described in\nthe log of commit 19110cfbb34d is reintroduced. It may still be triggered\nby LSC events but this should keep the link down in case the link is\nelectrically unstable, as discussed. The race may no longer be\ntriggered by RXO events because commit 4aea7a5c5e94 (\"e1000e: Avoid\nreceiver overrun interrupt bursts\") restored reading icr in the Other\nhandler.\n\nLink: https://lkml.org/lkml/2018/3/1/789\nSigned-off-by: Benjamin Poirier <bpoirier@suse.com>\n---\n drivers/net/ethernet/intel/e1000e/ich8lan.c | 13 ++++---------\n drivers/net/ethernet/intel/e1000e/mac.c     | 13 ++++---------\n drivers/net/ethernet/intel/e1000e/netdev.c  |  2 +-\n 3 files changed, 9 insertions(+), 19 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c\nindex ff308b05d68c..d6d4ed7acf03 100644\n--- a/drivers/net/ethernet/intel/e1000e/ich8lan.c\n+++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c\n@@ -1367,9 +1367,6 @@ static s32 e1000_disable_ulp_lpt_lp(struct e1000_hw *hw, bool force)\n  *  Checks to see of the link status of the hardware has changed.  If a\n  *  change in link status has been detected, then we read the PHY registers\n  *  to get the current speed/duplex if link exists.\n- *\n- *  Returns a negative error code (-E1000_ERR_*) or 0 (link down) or 1 (link\n- *  up).\n  **/\n static s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)\n {\n@@ -1385,7 +1382,7 @@ static s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)\n \t * Change or Rx Sequence Error interrupt.\n \t */\n \tif (!mac->get_link_status)\n-\t\treturn 1;\n+\t\treturn 0;\n \n \t/* First we want to see if the MII Status Register reports\n \t * link.  If so, then we want to get the current speed/duplex\n@@ -1602,7 +1599,7 @@ static s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)\n \t * we have already determined whether we have link or not.\n \t */\n \tif (!mac->autoneg)\n-\t\treturn 1;\n+\t\treturn -E1000_ERR_CONFIG;\n \n \t/* Auto-Neg is enabled.  Auto Speed Detection takes care\n \t * of MAC speed/duplex configuration.  So we only need to\n@@ -1616,12 +1613,10 @@ static s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)\n \t * different link partner.\n \t */\n \tret_val = e1000e_config_fc_after_link_up(hw);\n-\tif (ret_val) {\n+\tif (ret_val)\n \t\te_dbg(\"Error configuring flow control\\n\");\n-\t\treturn ret_val;\n-\t}\n \n-\treturn 1;\n+\treturn ret_val;\n }\n \n static s32 e1000_get_variants_ich8lan(struct e1000_adapter *adapter)\ndiff --git a/drivers/net/ethernet/intel/e1000e/mac.c b/drivers/net/ethernet/intel/e1000e/mac.c\nindex db735644b312..b322011ec282 100644\n--- a/drivers/net/ethernet/intel/e1000e/mac.c\n+++ b/drivers/net/ethernet/intel/e1000e/mac.c\n@@ -410,9 +410,6 @@ void e1000e_clear_hw_cntrs_base(struct e1000_hw *hw)\n  *  Checks to see of the link status of the hardware has changed.  If a\n  *  change in link status has been detected, then we read the PHY registers\n  *  to get the current speed/duplex if link exists.\n- *\n- *  Returns a negative error code (-E1000_ERR_*) or 0 (link down) or 1 (link\n- *  up).\n  **/\n s32 e1000e_check_for_copper_link(struct e1000_hw *hw)\n {\n@@ -426,7 +423,7 @@ s32 e1000e_check_for_copper_link(struct e1000_hw *hw)\n \t * Change or Rx Sequence Error interrupt.\n \t */\n \tif (!mac->get_link_status)\n-\t\treturn 1;\n+\t\treturn 0;\n \n \t/* First we want to see if the MII Status Register reports\n \t * link.  If so, then we want to get the current speed/duplex\n@@ -450,7 +447,7 @@ s32 e1000e_check_for_copper_link(struct e1000_hw *hw)\n \t * we have already determined whether we have link or not.\n \t */\n \tif (!mac->autoneg)\n-\t\treturn 1;\n+\t\treturn -E1000_ERR_CONFIG;\n \n \t/* Auto-Neg is enabled.  Auto Speed Detection takes care\n \t * of MAC speed/duplex configuration.  So we only need to\n@@ -464,12 +461,10 @@ s32 e1000e_check_for_copper_link(struct e1000_hw *hw)\n \t * different link partner.\n \t */\n \tret_val = e1000e_config_fc_after_link_up(hw);\n-\tif (ret_val) {\n+\tif (ret_val)\n \t\te_dbg(\"Error configuring flow control\\n\");\n-\t\treturn ret_val;\n-\t}\n \n-\treturn 1;\n+\treturn ret_val;\n }\n \n /**\ndiff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c\nindex 9fd4050a91ca..8a3aa85b159c 100644\n--- a/drivers/net/ethernet/intel/e1000e/netdev.c\n+++ b/drivers/net/ethernet/intel/e1000e/netdev.c\n@@ -5090,7 +5090,7 @@ static bool e1000e_has_link(struct e1000_adapter *adapter)\n \tcase e1000_media_type_copper:\n \t\tif (hw->mac.get_link_status) {\n \t\t\tret_val = hw->mac.ops.check_for_link(hw);\n-\t\t\tlink_active = ret_val > 0;\n+\t\t\tlink_active = !hw->mac.get_link_status;\n \t\t} else {\n \t\t\tlink_active = true;\n \t\t}\n",
    "prefixes": [
        "1/2"
    ]
}