get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 690212,
    "url": "http://patchwork.ozlabs.org/api/patches/690212/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/a93a0a56a25a4f5357e548af6e535f4d5e06ea74.1478039638.git.joe@perches.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": "<a93a0a56a25a4f5357e548af6e535f4d5e06ea74.1478039638.git.joe@perches.com>",
    "list_archive_url": null,
    "date": "2016-11-01T22:35:14",
    "name": "[net-next] i40evf: Move some i40evf_reset_task code to separate function",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "0f01393f498846e2efbc0475d6953d2b5c4ce22b",
    "submitter": {
        "id": 771,
        "url": "http://patchwork.ozlabs.org/api/people/771/?format=api",
        "name": "Joe Perches",
        "email": "joe@perches.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/a93a0a56a25a4f5357e548af6e535f4d5e06ea74.1478039638.git.joe@perches.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/690212/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/690212/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<intel-wired-lan-bounces@lists.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 hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\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 3t7mWf2m49z9t3K\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed,  2 Nov 2016 09:44:45 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id B6199921E7;\n\tTue,  1 Nov 2016 22:44:43 +0000 (UTC)",
            "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id TZO7cQ74OBBJ; Tue,  1 Nov 2016 22:44:43 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 40AF193096;\n\tTue,  1 Nov 2016 22:44:43 +0000 (UTC)",
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 520F81C2C3A\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue,  1 Nov 2016 22:44:42 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 4B43A93096\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue,  1 Nov 2016 22:44:42 +0000 (UTC)",
            "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id fJ++kIvTGpdw for <intel-wired-lan@lists.osuosl.org>;\n\tTue,  1 Nov 2016 22:44:41 +0000 (UTC)",
            "from smtprelay.hostedemail.com (smtprelay0231.hostedemail.com\n\t[216.40.44.231])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 109AD94A92\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue,  1 Nov 2016 22:44:40 +0000 (UTC)",
            "from smtprelay.hostedemail.com (10.5.19.251.rfc1918.com\n\t[10.5.19.251])\n\tby smtpgrave03.hostedemail.com (Postfix) with ESMTP id DCBB028E6E1\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue,  1 Nov 2016 22:35:24 +0000 (UTC)",
            "from filter.hostedemail.com (clb03-v110.bra.tucows.net\n\t[216.40.38.60])\n\tby smtprelay02.hostedemail.com (Postfix) with ESMTP id 1928412BA14;\n\tTue,  1 Nov 2016 22:35:22 +0000 (UTC)",
            "from joe-laptop.perches.com (unknown [47.151.132.55])\n\t(Authenticated sender: joe@perches.com)\n\tby omf04.hostedemail.com (Postfix) with ESMTPA;\n\tTue,  1 Nov 2016 22:35:21 +0000 (UTC)"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "from auto-whitelisted by SQLgrey-1.7.6",
        "X-Session-Marker": "6A6F6540706572636865732E636F6D",
        "X-Spam-Summary": "2, 0, 0, , d41d8cd98f00b204, joe@perches.com, :::::::,\n\tRULES_HIT:41:69:355:379:541:800:960:966:973:988:989:1260:1345:1437:1534:1543:1711:1730:1747:1777:1792:2194:2196:2199:2200:2393:2559:2562:3138:3139:3140:3141:3142:3354:3865:3866:3867:3868:3871:3872:3874:4250:4385:5007:6261:9010:9038:9592:10004:10848:11026:11473:11657:11658:11914:12043:12296:12438:12555:13161:13229:14181:14394:14721:21080:21451:30012:30045:30054:30055:30064:30070,\n\t0, RBL:none, CacheIP:none, Bayesian:0.5, 0.5, 0.5, Netcheck:none,\n\tDomainCache:0, MSF:not bulk, SPF:fn, MSBL:0, DNSBL:none,\n\tCustom_rules:0:0:0, LFtime:1, LUA_SUMMARY:none",
        "X-HE-Tag": "love43_68f316eb7fa51",
        "X-Filterd-Recvd-Size": "4622",
        "From": "Joe Perches <joe@perches.com>",
        "To": "Jeff Kirsher <jeffrey.t.kirsher@intel.com>",
        "Date": "Tue,  1 Nov 2016 15:35:14 -0700",
        "Message-Id": "<a93a0a56a25a4f5357e548af6e535f4d5e06ea74.1478039638.git.joe@perches.com>",
        "X-Mailer": "git-send-email 2.10.0.rc2.1.g053435c",
        "Cc": "netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org,\n\tlinux-kernel@vger.kernel.org",
        "Subject": "[Intel-wired-lan] [PATCH net-next] i40evf: Move some\n\ti40evf_reset_task code to separate function",
        "X-BeenThere": "intel-wired-lan@lists.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.lists.osuosl.org>",
        "List-Unsubscribe": "<http://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>",
        "List-Post": "<mailto:intel-wired-lan@lists.osuosl.org>",
        "List-Help": "<mailto:intel-wired-lan-request@lists.osuosl.org?subject=help>",
        "List-Subscribe": "<http://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.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@lists.osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@lists.osuosl.org>"
    },
    "content": "The i40evf_reset_task function is a couple hundred lines and it has\na separable block that disables vf.  Move that block to a new\ni40evf_disable_vf function to shorten i40evf_reset_task a bit.\n\nSigned-off-by: Joe Perches <joe@perches.com>\n---\n drivers/net/ethernet/intel/i40evf/i40evf_main.c | 86 +++++++++++++------------\n 1 file changed, 44 insertions(+), 42 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c\nindex db36744c6691..4cd3a47d888f 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c\n+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c\n@@ -1693,6 +1693,49 @@ static void i40evf_watchdog_task(struct work_struct *work)\n \tschedule_work(&adapter->adminq_task);\n }\n \n+static void i40evf_disable_vf(struct i40evf_adapter *adapter)\n+{\n+\tstruct i40evf_mac_filter *f, *ftmp;\n+\tstruct i40evf_vlan_filter *fv, *fvtmp;\n+\n+\tadapter->flags |= I40EVF_FLAG_PF_COMMS_FAILED;\n+\n+\tif (netif_running(adapter->netdev)) {\n+\t\tset_bit(__I40E_DOWN, &adapter->vsi.state);\n+\t\tnetif_carrier_off(adapter->netdev);\n+\t\tnetif_tx_disable(adapter->netdev);\n+\t\tadapter->link_up = false;\n+\t\ti40evf_napi_disable_all(adapter);\n+\t\ti40evf_irq_disable(adapter);\n+\t\ti40evf_free_traffic_irqs(adapter);\n+\t\ti40evf_free_all_tx_resources(adapter);\n+\t\ti40evf_free_all_rx_resources(adapter);\n+\t}\n+\n+\t/* Delete all of the filters, both MAC and VLAN. */\n+\tlist_for_each_entry_safe(f, ftmp, &adapter->mac_filter_list, list) {\n+\t\tlist_del(&f->list);\n+\t\tkfree(f);\n+\t}\n+\n+\tlist_for_each_entry_safe(fv, fvtmp, &adapter->vlan_filter_list, list) {\n+\t\tlist_del(&fv->list);\n+\t\tkfree(fv);\n+\t}\n+\n+\ti40evf_free_misc_irq(adapter);\n+\ti40evf_reset_interrupt_capability(adapter);\n+\ti40evf_free_queues(adapter);\n+\ti40evf_free_q_vectors(adapter);\n+\tkfree(adapter->vf_res);\n+\ti40evf_shutdown_adminq(&adapter->hw);\n+\tadapter->netdev->flags &= ~IFF_UP;\n+\tclear_bit(__I40EVF_IN_CRITICAL_TASK, &adapter->crit_section);\n+\tadapter->flags &= ~I40EVF_FLAG_RESET_PENDING;\n+\tadapter->state = __I40EVF_DOWN;\n+\tdev_info(&adapter->pdev->dev, \"Reset task did not complete, VF disabled\\n\");\n+}\n+\n #define I40EVF_RESET_WAIT_MS 10\n #define I40EVF_RESET_WAIT_COUNT 500\n /**\n@@ -1758,50 +1801,9 @@ static void i40evf_reset_task(struct work_struct *work)\n \tpci_set_master(adapter->pdev);\n \n \tif (i == I40EVF_RESET_WAIT_COUNT) {\n-\t\tstruct i40evf_mac_filter *ftmp;\n-\t\tstruct i40evf_vlan_filter *fv, *fvtmp;\n-\n-\t\t/* reset never finished */\n \t\tdev_err(&adapter->pdev->dev, \"Reset never finished (%x)\\n\",\n \t\t\treg_val);\n-\t\tadapter->flags |= I40EVF_FLAG_PF_COMMS_FAILED;\n-\n-\t\tif (netif_running(adapter->netdev)) {\n-\t\t\tset_bit(__I40E_DOWN, &adapter->vsi.state);\n-\t\t\tnetif_carrier_off(netdev);\n-\t\t\tnetif_tx_disable(netdev);\n-\t\t\tadapter->link_up = false;\n-\t\t\ti40evf_napi_disable_all(adapter);\n-\t\t\ti40evf_irq_disable(adapter);\n-\t\t\ti40evf_free_traffic_irqs(adapter);\n-\t\t\ti40evf_free_all_tx_resources(adapter);\n-\t\t\ti40evf_free_all_rx_resources(adapter);\n-\t\t}\n-\n-\t\t/* Delete all of the filters, both MAC and VLAN. */\n-\t\tlist_for_each_entry_safe(f, ftmp, &adapter->mac_filter_list,\n-\t\t\t\t\t list) {\n-\t\t\tlist_del(&f->list);\n-\t\t\tkfree(f);\n-\t\t}\n-\n-\t\tlist_for_each_entry_safe(fv, fvtmp, &adapter->vlan_filter_list,\n-\t\t\t\t\t list) {\n-\t\t\tlist_del(&fv->list);\n-\t\t\tkfree(fv);\n-\t\t}\n-\n-\t\ti40evf_free_misc_irq(adapter);\n-\t\ti40evf_reset_interrupt_capability(adapter);\n-\t\ti40evf_free_queues(adapter);\n-\t\ti40evf_free_q_vectors(adapter);\n-\t\tkfree(adapter->vf_res);\n-\t\ti40evf_shutdown_adminq(hw);\n-\t\tadapter->netdev->flags &= ~IFF_UP;\n-\t\tclear_bit(__I40EVF_IN_CRITICAL_TASK, &adapter->crit_section);\n-\t\tadapter->flags &= ~I40EVF_FLAG_RESET_PENDING;\n-\t\tadapter->state = __I40EVF_DOWN;\n-\t\tdev_info(&adapter->pdev->dev, \"Reset task did not complete, VF disabled\\n\");\n+\t\ti40evf_disable_vf(adapter);\n \t\treturn; /* Do not attempt to reinit. It's dead, Jim. */\n \t}\n \n",
    "prefixes": [
        "net-next"
    ]
}