get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1282917,
    "url": "http://patchwork.ozlabs.org/api/patches/1282917/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20200504173218.1724-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": "<20200504173218.1724-1-kai.heng.feng@canonical.com>",
    "list_archive_url": null,
    "date": "2020-05-04T17:32:18",
    "name": "igb: Report speed and duplex as unknown when device is runtime suspended",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": false,
    "hash": "d2ee4ddae015fbd25e53d35168e779ac51dde581",
    "submitter": {
        "id": 70328,
        "url": "http://patchwork.ozlabs.org/api/people/70328/?format=api",
        "name": "Kai-Heng Feng",
        "email": "kai.heng.feng@canonical.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20200504173218.1724-1-kai.heng.feng@canonical.com/mbox/",
    "series": [
        {
            "id": 174566,
            "url": "http://patchwork.ozlabs.org/api/series/174566/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=174566",
            "date": "2020-05-04T17:32:18",
            "name": "igb: Report speed and duplex as unknown when device is runtime suspended",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/174566/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1282917/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1282917/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 49G90s0F1kz9sSd\n\tfor <incoming@patchwork.ozlabs.org>; Tue,  5 May 2020 03:32:42 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 7FB078872A;\n\tMon,  4 May 2020 17:32:40 +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 hSzmEkzjPKVH; Mon,  4 May 2020 17:32:38 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 2842088683;\n\tMon,  4 May 2020 17:32:33 +0000 (UTC)",
            "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n by ash.osuosl.org (Postfix) with ESMTP id 758321BF328\n for <intel-wired-lan@lists.osuosl.org>; Mon,  4 May 2020 17:32:31 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n by silver.osuosl.org (Postfix) with ESMTP id 706CC20490\n for <intel-wired-lan@lists.osuosl.org>; Mon,  4 May 2020 17:32:31 +0000 (UTC)",
            "from silver.osuosl.org ([127.0.0.1])\n by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n with ESMTP id 3rbLrpSplg9F for <intel-wired-lan@lists.osuosl.org>;\n Mon,  4 May 2020 17:32:30 +0000 (UTC)",
            "from youngberry.canonical.com (youngberry.canonical.com\n [91.189.89.112])\n by silver.osuosl.org (Postfix) with ESMTPS id 681F320452\n for <intel-wired-lan@lists.osuosl.org>; Mon,  4 May 2020 17:32:30 +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 1jVex5-0007yZ-Bd; Mon, 04 May 2020 17:32:23 +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 01:32:18 +0800",
        "Message-Id": "<20200504173218.1724-1-kai.heng.feng@canonical.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "Subject": "[Intel-wired-lan] [PATCH] igb: Report speed and duplex as unknown\n 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 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>,\n open list <linux-kernel@vger.kernel.org>",
        "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 directly report the speed and duplex as unknown.\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\nSuggested-by: Alexander Duyck <alexander.duyck@gmail.com>\nSigned-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>\n---\n drivers/net/ethernet/intel/igb/igb_ethtool.c | 6 ++++++\n 1 file changed, 6 insertions(+)",
    "diff": "diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c\nindex 39d3b76a6f5d..b429bca4aa6a 100644\n--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c\n+++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c\n@@ -143,6 +143,12 @@ static int igb_get_link_ksettings(struct net_device *netdev,\n \tu32 speed;\n \tu32 supported, advertising;\n \n+\tif (pm_runtime_suspended(&adapter->pdev->dev)) {\n+\t\tcmd->base.duplex = DUPLEX_UNKNOWN;\n+\t\tcmd->base.speed = SPEED_UNKNOWN;\n+\t\treturn 0;\n+\t}\n+\n \tstatus = rd32(E1000_STATUS);\n \tif (hw->phy.media_type == e1000_media_type_copper) {\n \n",
    "prefixes": []
}