get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1283210,
    "url": "http://patchwork.ozlabs.org/api/patches/1283210/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20200505040154.24080-1-kai.heng.feng@canonical.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": "<20200505040154.24080-1-kai.heng.feng@canonical.com>",
    "list_archive_url": null,
    "date": "2020-05-05T04:01:54",
    "name": "[v2] igb: Report speed and duplex as unknown when device is runtime suspended",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "abb2a39666a69452550f52f3d8891d4803c254b5",
    "submitter": {
        "id": 70328,
        "url": "http://patchwork.ozlabs.org/api/people/70328/?format=api",
        "name": "Kai-Heng Feng",
        "email": "kai.heng.feng@canonical.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/20200505040154.24080-1-kai.heng.feng@canonical.com/mbox/",
    "series": [
        {
            "id": 174664,
            "url": "http://patchwork.ozlabs.org/api/series/174664/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=174664",
            "date": "2020-05-05T04:01:54",
            "name": "[v2] igb: Report speed and duplex as unknown when device is runtime suspended",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/174664/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1283210/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1283210/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 spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org\n (client-ip=140.211.166.138; helo=whitealder.osuosl.org;\n envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=<UNKNOWN>)",
            "ozlabs.org;\n dmarc=fail (p=none dis=none) header.from=canonical.com"
        ],
        "Received": [
            "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 49GQz93SFGz9sSW\n\tfor <incoming@patchwork.ozlabs.org>; Tue,  5 May 2020 14:02:12 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 81B2E878E6;\n\tTue,  5 May 2020 04:02:10 +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 WmZFAWUWBpLB; Tue,  5 May 2020 04:02:09 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id CC0E9878D0;\n\tTue,  5 May 2020 04:02:09 +0000 (UTC)",
            "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n by ash.osuosl.org (Postfix) with ESMTP id 416081BF955\n for <intel-wired-lan@lists.osuosl.org>; Tue,  5 May 2020 04:02:08 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n by whitealder.osuosl.org (Postfix) with ESMTP id 391C4878D0\n for <intel-wired-lan@lists.osuosl.org>; Tue,  5 May 2020 04:02:08 +0000 (UTC)",
            "from whitealder.osuosl.org ([127.0.0.1])\n by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n with ESMTP id 9--TgFqjpwY6 for <intel-wired-lan@lists.osuosl.org>;\n Tue,  5 May 2020 04:02:07 +0000 (UTC)",
            "from youngberry.canonical.com (youngberry.canonical.com\n [91.189.89.112])\n by whitealder.osuosl.org (Postfix) with ESMTPS id 1C73E87727\n for <intel-wired-lan@lists.osuosl.org>; Tue,  5 May 2020 04:02:07 +0000 (UTC)",
            "from 61-220-137-37.hinet-ip.hinet.net ([61.220.137.37]\n helo=localhost) by youngberry.canonical.com with esmtpsa\n (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2)\n (envelope-from <kai.heng.feng@canonical.com>)\n id 1jVomO-0001hb-Mx; Tue, 05 May 2020 04:02:01 +0000"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6",
        "From": "Kai-Heng Feng <kai.heng.feng@canonical.com>",
        "To": "jeffrey.t.kirsher@intel.com",
        "Date": "Tue,  5 May 2020 12:01:54 +0800",
        "Message-Id": "<20200505040154.24080-1-kai.heng.feng@canonical.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "Subject": "[Intel-wired-lan] [PATCH v2] igb: Report speed and duplex as\n unknown when device is runtime suspended",
        "X-BeenThere": "intel-wired-lan@osuosl.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n <intel-wired-lan.osuosl.org>",
        "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>,\n <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 <mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>",
        "Cc": "\"open list:NETWORKING DRIVERS\" <netdev@vger.kernel.org>,\n open list <linux-kernel@vger.kernel.org>,\n Kai-Heng Feng <kai.heng.feng@canonical.com>,\n \"moderated list:INTEL ETHERNET DRIVERS\" <intel-wired-lan@lists.osuosl.org>,\n \"David S. Miller\" <davem@davemloft.net>",
        "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": "igb device gets runtime suspended when there's no link partner. We can't\nget correct speed under that state:\n$ cat /sys/class/net/enp3s0/speed\n1000\n\nIn addition to that, an error can also be spotted in dmesg:\n[  385.991957] igb 0000:03:00.0 enp3s0: PCIe link lost\n\nSince device can only be runtime suspended when there's no link partner,\nwe can skip reading register and let the following logic set speed and\nduplex with correct status.\n\nThe more generic approach will be wrap get_link_ksettings() with begin()\nand complete() callbacks. However, for this particular issue, begin()\ncalls igb_runtime_resume() , which tries to rtnl_lock() while the lock\nis already hold by upper ethtool layer.\n\nSo let's take this approach until the igb_runtime_resume() no longer\nneeds to hold rtnl_lock.\n\nCc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>\nCc: Aaron Brown <aaron.f.brown@intel.com>\nSuggested-by: Alexander Duyck <alexander.duyck@gmail.com>\nSigned-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>\n---\nv2:\n - Don't early return the routine so other info can be set.\n\n drivers/net/ethernet/intel/igb/igb_ethtool.c | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c\nindex 39d3b76a6f5d..2cd003c5ad43 100644\n--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c\n+++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c\n@@ -143,7 +143,8 @@ static int igb_get_link_ksettings(struct net_device *netdev,\n \tu32 speed;\n \tu32 supported, advertising;\n \n-\tstatus = rd32(E1000_STATUS);\n+\tstatus = pm_runtime_suspended(&adapter->pdev->dev) ?\n+\t\t 0 : rd32(E1000_STATUS);\n \tif (hw->phy.media_type == e1000_media_type_copper) {\n \n \t\tsupported = (SUPPORTED_10baseT_Half |\n",
    "prefixes": [
        "v2"
    ]
}