get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 808456,
    "url": "http://patchwork.ozlabs.org/api/patches/808456/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20170831231613.15805-3-sthemmin@microsoft.com/",
    "project": {
        "id": 7,
        "url": "http://patchwork.ozlabs.org/api/projects/7/?format=api",
        "name": "Linux network development",
        "link_name": "netdev",
        "list_id": "netdev.vger.kernel.org",
        "list_email": "netdev@vger.kernel.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20170831231613.15805-3-sthemmin@microsoft.com>",
    "list_archive_url": null,
    "date": "2017-08-31T23:16:13",
    "name": "[net-next,2/2] netvsc: allow driver to be removed even if VF is present",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "de00e5cc7ea45eb6649d704f7095e6aa9d309094",
    "submitter": {
        "id": 21389,
        "url": "http://patchwork.ozlabs.org/api/people/21389/?format=api",
        "name": "Stephen Hemminger",
        "email": "stephen@networkplumber.org"
    },
    "delegate": {
        "id": 34,
        "url": "http://patchwork.ozlabs.org/api/users/34/?format=api",
        "username": "davem",
        "first_name": "David",
        "last_name": "Miller",
        "email": "davem@davemloft.net"
    },
    "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/20170831231613.15805-3-sthemmin@microsoft.com/mbox/",
    "series": [
        {
            "id": 918,
            "url": "http://patchwork.ozlabs.org/api/series/918/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=918",
            "date": "2017-08-31T23:16:11",
            "name": "netvsc: transparent VF related cleanups",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/918/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/808456/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/808456/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<netdev-owner@vger.kernel.org>",
        "X-Original-To": "patchwork-incoming@ozlabs.org",
        "Delivered-To": "patchwork-incoming@ozlabs.org",
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=networkplumber-org.20150623.gappssmtp.com\n\theader.i=@networkplumber-org.20150623.gappssmtp.com\n\theader.b=\"S2NCWROt\"; dkim-atps=neutral"
        ],
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xjytG3lvFz9s7p\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri,  1 Sep 2017 09:16:22 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751843AbdHaXQU (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tThu, 31 Aug 2017 19:16:20 -0400",
            "from mail-pg0-f53.google.com ([74.125.83.53]:34679 \"EHLO\n\tmail-pg0-f53.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751787AbdHaXQS (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Thu, 31 Aug 2017 19:16:18 -0400",
            "by mail-pg0-f53.google.com with SMTP id t193so3128199pgc.1\n\tfor <netdev@vger.kernel.org>; Thu, 31 Aug 2017 16:16:18 -0700 (PDT)",
            "from xeon-e3.lan (76-14-207-240.or.wavecable.com. [76.14.207.240])\n\tby smtp.gmail.com with ESMTPSA id\n\tz127sm872163pfb.64.2017.08.31.16.16.16\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 31 Aug 2017 16:16:16 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=networkplumber-org.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=ZCUmVn2SFK9YnnSdsmSVNP3gaheiA06ZFnc1OWMdp2w=;\n\tb=S2NCWROt7V5dHUjC6hKqYNNUl4npUVP/wf6BRjaVq/mSZj7ZSaXQ6NR4MsBAwh/wkg\n\tNwUBRGrwIzKQ6YsZhkUyuMYtDvuYwborWckoRt8QctpFu8iTOwJf/IZE9U0pKSi5uiZP\n\te/KfZfJpEBMVpH2hgQrt8xBbS5gWYkk32fW/krLGMgNYWZVo7dlFMIQcMGSNlMBp0gyo\n\t4eFp9ZcOzUUXqIh2wNctxXhw+D2z4AyCK986fiFuI5l36TOz4MFIUFPYtmNg6kk0Ej0m\n\tshNOZs+6E3pJq546PKIkyhXMDTRECWGhYVTf343ccE17phERmKLqzInK76gx4G5D6ocE\n\tMrTg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=ZCUmVn2SFK9YnnSdsmSVNP3gaheiA06ZFnc1OWMdp2w=;\n\tb=XoDS0mzM/8GgNOV+279D2uOSMO8DcsK8c7B1U494l06Fupg9kMqKK8FL1IhNo0zF5U\n\tyzGMqH0SnrmOcpxKO1gf1dIQTsBH0YxREHglBFnVvTDzwNsC3FvPQcS+8JdkGjSiLnF2\n\t1LCtFD0E7MVYruC8X+F8JoPdiAeh/EHOPXLffvbCAvfolRVbwj1jvEaqSovKv/G57hNx\n\tmo//lNz2Zxmnd75qT0IeooM7XR/z1nREoafjnkSKmj/u0XOyB0RBMSv9/yAz9eR2sqo8\n\tk+KrodBnG+WyLoPpYtMrlt97+UlSLlAiqHVajXSO6v9yHzUeLPo+fkHZgIO/nm1XIbOk\n\tBiWA==",
        "X-Gm-Message-State": "AHPjjUjI3IcgTWqxuhCKRJ2disWBqzcIIVg+3QNwDMHP6HrvGpqgD4N1\n\tux13Pinc9GZANU9v",
        "X-Google-Smtp-Source": "ADKCNb51tUM2aTBnE98HtgBuwj/DAmt/SBQUZKnhUW41EQstD8/jwJ07N0FdFJyX4P1RkCujcwMGvg==",
        "X-Received": "by 10.99.97.17 with SMTP id v17mr70560pgb.433.1504221377936;\n\tThu, 31 Aug 2017 16:16:17 -0700 (PDT)",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "X-Google-Original-From": "Stephen Hemminger <sthemmin@microsoft.com>",
        "To": "kys@microsoft.com, haiyangz@microsoft.com, sthemmin@microsoft.com",
        "Cc": "devel@linuxdriverproject.org, netdev@vger.kernel.org",
        "Subject": "[PATCH net-next 2/2] netvsc: allow driver to be removed even if VF\n\tis present",
        "Date": "Thu, 31 Aug 2017 16:16:13 -0700",
        "Message-Id": "<20170831231613.15805-3-sthemmin@microsoft.com>",
        "X-Mailer": "git-send-email 2.11.0",
        "In-Reply-To": "<20170831231613.15805-1-sthemmin@microsoft.com>",
        "References": "<20170831231613.15805-1-sthemmin@microsoft.com>",
        "Sender": "netdev-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<netdev.vger.kernel.org>",
        "X-Mailing-List": "netdev@vger.kernel.org"
    },
    "content": "If VF is attached then can still allow netvsc driver module to\nbe removed. Just have to make sure and do the cleanup.\n\nAlso, avoid extra rtnl round trip when calling unregister.\n\nSigned-off-by: Stephen Hemminger <sthemmin@microsoft.com>\n---\n drivers/net/hyperv/netvsc_drv.c | 17 +++++++++--------\n 1 file changed, 9 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c\nindex 128165e49c9a..97ed4bdc439f 100644\n--- a/drivers/net/hyperv/netvsc_drv.c\n+++ b/drivers/net/hyperv/netvsc_drv.c\n@@ -1834,9 +1834,6 @@ static int netvsc_register_vf(struct net_device *vf_netdev)\n \n \tnetdev_info(ndev, \"VF registering: %s\\n\", vf_netdev->name);\n \n-\t/* Prevent this module from being unloaded while VF is registered */\n-\ttry_module_get(THIS_MODULE);\n-\n \tdev_hold(vf_netdev);\n \trcu_assign_pointer(net_device_ctx->vf_netdev, vf_netdev);\n \treturn NOTIFY_OK;\n@@ -1880,10 +1877,11 @@ static int netvsc_unregister_vf(struct net_device *vf_netdev)\n \n \tnetdev_info(ndev, \"VF unregistering: %s\\n\", vf_netdev->name);\n \n+\tnetdev_rx_handler_unregister(vf_netdev);\n \tnetdev_upper_dev_unlink(vf_netdev, ndev);\n \tRCU_INIT_POINTER(net_device_ctx->vf_netdev, NULL);\n \tdev_put(vf_netdev);\n-\tmodule_put(THIS_MODULE);\n+\n \treturn NOTIFY_OK;\n }\n \n@@ -1987,11 +1985,11 @@ static int netvsc_probe(struct hv_device *dev,\n \n static int netvsc_remove(struct hv_device *dev)\n {\n-\tstruct net_device *net;\n \tstruct net_device_context *ndev_ctx;\n+\tstruct net_device *vf_netdev;\n+\tstruct net_device *net;\n \n \tnet = hv_get_drvdata(dev);\n-\n \tif (net == NULL) {\n \t\tdev_err(&dev->device, \"No net device to remove\\n\");\n \t\treturn 0;\n@@ -2008,12 +2006,15 @@ static int netvsc_remove(struct hv_device *dev)\n \t * removed. Also blocks mtu and channel changes.\n \t */\n \trtnl_lock();\n+\tvf_netdev = rtnl_dereference(ndev_ctx->vf_netdev);\n+\tif (vf_netdev)\n+\t\tnetvsc_unregister_vf(vf_netdev);\n+\n \trndis_filter_device_remove(dev,\n \t\t\t\t   rtnl_dereference(ndev_ctx->nvdev));\n+\tunregister_netdevice(net);\n \trtnl_unlock();\n \n-\tunregister_netdev(net);\n-\n \thv_set_drvdata(dev, NULL);\n \n \tfree_percpu(ndev_ctx->vf_stats);\n",
    "prefixes": [
        "net-next",
        "2/2"
    ]
}