get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 560316,
    "url": "http://patchwork.ozlabs.org/api/patches/560316/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1450827283-34667-1-git-send-email-mitch.a.williams@intel.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": "<1450827283-34667-1-git-send-email-mitch.a.williams@intel.com>",
    "list_archive_url": null,
    "date": "2015-12-22T23:34:42",
    "name": "[next,1/2] i40e: change log messages and error returns",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "af0c5ea16c110e5e7ffc8770918d95e1091212df",
    "submitter": {
        "id": 967,
        "url": "http://patchwork.ozlabs.org/api/people/967/?format=api",
        "name": "Mitch Williams",
        "email": "mitch.a.williams@intel.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/1450827283-34667-1-git-send-email-mitch.a.williams@intel.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/560316/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/560316/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 whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ozlabs.org (Postfix) with ESMTP id 9E40314031D\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 23 Dec 2015 10:33:08 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id EF84892594;\n\tTue, 22 Dec 2015 23:33:07 +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 TMoX5Orr4cjf; Tue, 22 Dec 2015 23:33:05 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 0390A8F482;\n\tTue, 22 Dec 2015 23:33:05 +0000 (UTC)",
            "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id 23C4E1C1064\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 22 Dec 2015 23:33:04 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 1FB21A5727\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 22 Dec 2015 23:33:04 +0000 (UTC)",
            "from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id x9eRvPKIoeo5 for <intel-wired-lan@lists.osuosl.org>;\n\tTue, 22 Dec 2015 23:33:03 +0000 (UTC)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 8E9F5A55C7\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 22 Dec 2015 23:33:03 +0000 (UTC)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby fmsmga102.fm.intel.com with ESMTP; 22 Dec 2015 15:33:03 -0800",
            "from mawilli1-mobl.jf.intel.com ([10.166.12.51])\n\tby orsmga001.jf.intel.com with ESMTP; 22 Dec 2015 15:33:03 -0800"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.20,466,1444719600\"; d=\"scan'208\";a=\"846761444\"",
        "From": "Mitch Williams <mitch.a.williams@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Tue, 22 Dec 2015 15:34:42 -0800",
        "Message-Id": "<1450827283-34667-1-git-send-email-mitch.a.williams@intel.com>",
        "X-Mailer": "git-send-email 2.5.0",
        "Subject": "[Intel-wired-lan] [next PATCH 1/2] i40e: change log messages and\n\terror returns",
        "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": "When VFs are being reset, there is a brief window of time when they\ncannot be configured because they don't have a VSI to configure. If\na script is quick, it can fall through that window. To avoid\ndefenestration, log a useful error message and return -EAGAIN.\n\nSigned-off-by: Mitch Williams <mitch.a.williams@intel.com>\n---\n drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 27 ++++++++++++++--------\n 1 file changed, 18 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c\nindex aa58a49..b8deb50 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c\n@@ -2078,9 +2078,9 @@ int i40e_ndo_set_vf_mac(struct net_device *netdev, int vf_id, u8 *mac)\n \tvf = &(pf->vf[vf_id]);\n \tvsi = pf->vsi[vf->lan_vsi_idx];\n \tif (!test_bit(I40E_VF_STAT_INIT, &vf->vf_states)) {\n-\t\tdev_err(&pf->pdev->dev,\n-\t\t\t\"Uninitialized VF %d\\n\", vf_id);\n-\t\tret = -EINVAL;\n+\t\tdev_err(&pf->pdev->dev, \"VF %d still in reset. Try again.\\n\",\n+\t\t\tvf_id);\n+\t\tret = -EAGAIN;\n \t\tgoto error_param;\n \t}\n \n@@ -2162,8 +2162,9 @@ int i40e_ndo_set_vf_port_vlan(struct net_device *netdev,\n \tvf = &(pf->vf[vf_id]);\n \tvsi = pf->vsi[vf->lan_vsi_idx];\n \tif (!test_bit(I40E_VF_STAT_INIT, &vf->vf_states)) {\n-\t\tdev_err(&pf->pdev->dev, \"Uninitialized VF %d\\n\", vf_id);\n-\t\tret = -EINVAL;\n+\t\tdev_err(&pf->pdev->dev, \"VF %d still in reset. Try again.\\n\",\n+\t\t\tvf_id);\n+\t\tret = -EAGAIN;\n \t\tgoto error_pvid;\n \t}\n \n@@ -2282,8 +2283,9 @@ int i40e_ndo_set_vf_bw(struct net_device *netdev, int vf_id, int min_tx_rate,\n \tvf = &(pf->vf[vf_id]);\n \tvsi = pf->vsi[vf->lan_vsi_idx];\n \tif (!test_bit(I40E_VF_STAT_INIT, &vf->vf_states)) {\n-\t\tdev_err(&pf->pdev->dev, \"Uninitialized VF %d.\\n\", vf_id);\n-\t\tret = -EINVAL;\n+\t\tdev_err(&pf->pdev->dev, \"VF %d still in reset. Try again.\\n\",\n+\t\t\tvf_id);\n+\t\tret = -EAGAIN;\n \t\tgoto error;\n \t}\n \n@@ -2356,8 +2358,9 @@ int i40e_ndo_get_vf_config(struct net_device *netdev,\n \t/* first vsi is always the LAN vsi */\n \tvsi = pf->vsi[vf->lan_vsi_idx];\n \tif (!test_bit(I40E_VF_STAT_INIT, &vf->vf_states)) {\n-\t\tdev_err(&pf->pdev->dev, \"Uninitialized VF %d\\n\", vf_id);\n-\t\tret = -EINVAL;\n+\t\tdev_err(&pf->pdev->dev, \"VF %d still in reset. Try again.\\n\",\n+\t\t\tvf_id);\n+\t\tret = -EAGAIN;\n \t\tgoto error_param;\n \t}\n \n@@ -2472,6 +2475,12 @@ int i40e_ndo_set_vf_spoofchk(struct net_device *netdev, int vf_id, bool enable)\n \t}\n \n \tvf = &(pf->vf[vf_id]);\n+\tif (!test_bit(I40E_VF_STAT_INIT, &vf->vf_states)) {\n+\t\tdev_err(&pf->pdev->dev, \"VF %d still in reset. Try again.\\n\",\n+\t\t\tvf_id);\n+\t\tret = -EAGAIN;\n+\t\tgoto out;\n+\t}\n \n \tif (enable == vf->spoofchk)\n \t\tgoto out;\n",
    "prefixes": [
        "next",
        "1/2"
    ]
}