get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 459052,
    "url": "http://patchwork.ozlabs.org/api/patches/459052/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1428450342-48517-4-git-send-email-catherine.sullivan@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": "<1428450342-48517-4-git-send-email-catherine.sullivan@intel.com>",
    "list_archive_url": null,
    "date": "2015-04-07T23:45:33",
    "name": "[net-next,S3,04/13] i40e: notify VFs of link state",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "c1127c05711394af02369bbccba53d875230cb8b",
    "submitter": {
        "id": 13931,
        "url": "http://patchwork.ozlabs.org/api/people/13931/?format=api",
        "name": "Catherine Sullivan",
        "email": "catherine.sullivan@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/1428450342-48517-4-git-send-email-catherine.sullivan@intel.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/459052/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/459052/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 silver.osuosl.org (silver.osuosl.org [140.211.166.136])\n\tby ozlabs.org (Postfix) with ESMTP id 8CCDA140187\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed,  8 Apr 2015 09:42:30 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 81C0C3342F;\n\tTue,  7 Apr 2015 23:42:29 +0000 (UTC)",
            "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id Ir3kaSuzkkYA; Tue,  7 Apr 2015 23:42:26 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id E151133420;\n\tTue,  7 Apr 2015 23:42:26 +0000 (UTC)",
            "from whitealder.osuosl.org (whitealder.osuosl.org\n\t[140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 537981C265F\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue,  7 Apr 2015 23:42:25 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 4F5BA90D90\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue,  7 Apr 2015 23:42:25 +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 QtbaI7HTaWZg for <intel-wired-lan@lists.osuosl.org>;\n\tTue,  7 Apr 2015 23:42:24 +0000 (UTC)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id B94FB8C49B\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue,  7 Apr 2015 23:42:24 +0000 (UTC)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby orsmga103.jf.intel.com with ESMTP; 07 Apr 2015 16:42:24 -0700",
            "from catheri1-tigger.jf.intel.com ([134.134.176.92])\n\tby FMSMGA003.fm.intel.com with ESMTP; 07 Apr 2015 16:42:24 -0700"
        ],
        "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.11,540,1422950400\"; d=\"scan'208\";a=\"477975382\"",
        "From": "Catherine Sullivan <catherine.sullivan@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Tue,  7 Apr 2015 19:45:33 -0400",
        "Message-Id": "<1428450342-48517-4-git-send-email-catherine.sullivan@intel.com>",
        "X-Mailer": "git-send-email 1.9.3",
        "In-Reply-To": "<1428450342-48517-1-git-send-email-catherine.sullivan@intel.com>",
        "References": "<1428450342-48517-1-git-send-email-catherine.sullivan@intel.com>",
        "Subject": "[Intel-wired-lan] [net-next S3 04/13] i40e: notify VFs of link state",
        "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": "From: Mitch Williams <mitch.a.williams@intel.com>\n\nGratuitously notify VFs of link state when they activate their queues.\nIn general, this is the last thing that a VF driver will do as it opens\nits interface, so this is a good time to notify the VF.\n\nCurrently, VF devices assume link is up unless told otherwise, which\nmeans that VFs instantiated on a PF with no link will report the wrong\nstate. This change corrects that issue.\n\nSigned-off-by: Mitch Williams <mitch.a.williams@intel.com>\nChange-ID: Iea53622904ecc681ac3f8938d81c30033ef9a0a6\n---\n drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 50 ++++++++++++++--------\n 1 file changed, 31 insertions(+), 19 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 9b3fc83..8df2b52 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c\n@@ -25,6 +25,7 @@\n  ******************************************************************************/\n \n #include \"i40e.h\"\n+static void i40e_vc_notify_vf_link_state(struct i40e_vf *vf);\n \n /***********************misc routines*****************************/\n \n@@ -1767,6 +1768,7 @@ int i40e_vc_process_vf_msg(struct i40e_pf *pf, u16 vf_id, u32 v_opcode,\n \t\tbreak;\n \tcase I40E_VIRTCHNL_OP_ENABLE_QUEUES:\n \t\tret = i40e_vc_enable_queues_msg(vf, msg, msglen);\n+\t\ti40e_vc_notify_vf_link_state(vf);\n \t\tbreak;\n \tcase I40E_VIRTCHNL_OP_DISABLE_QUEUES:\n \t\tret = i40e_vc_disable_queues_msg(vf, msg, msglen);\n@@ -1875,35 +1877,45 @@ static void i40e_vc_vf_broadcast(struct i40e_pf *pf,\n \n /**\n  * i40e_vc_notify_link_state\n- * @pf: pointer to the PF structure\n+ * @vf: pointer to the VF structure\n  *\n- * send a link status message to all VFs on a given PF\n+ * send a link status message to a single VF\n  **/\n-void i40e_vc_notify_link_state(struct i40e_pf *pf)\n+static void i40e_vc_notify_vf_link_state(struct i40e_vf *vf)\n {\n \tstruct i40e_virtchnl_pf_event pfe;\n+\tstruct i40e_pf *pf = vf->pf;\n \tstruct i40e_hw *hw = &pf->hw;\n-\tstruct i40e_vf *vf = pf->vf;\n \tstruct i40e_link_status *ls = &pf->hw.phy.link_info;\n-\tint i;\n+\tint abs_vf_id = vf->vf_id + hw->func_caps.vf_base_id;\n \n \tpfe.event = I40E_VIRTCHNL_EVENT_LINK_CHANGE;\n \tpfe.severity = I40E_PF_EVENT_SEVERITY_INFO;\n-\tfor (i = 0; i < pf->num_alloc_vfs; i++, vf++) {\n-\t\tint abs_vf_id = vf->vf_id + hw->func_caps.vf_base_id;\n-\t\tif (vf->link_forced) {\n-\t\t\tpfe.event_data.link_event.link_status = vf->link_up;\n-\t\t\tpfe.event_data.link_event.link_speed =\n-\t\t\t\t(vf->link_up ? I40E_LINK_SPEED_40GB : 0);\n-\t\t} else {\n-\t\t\tpfe.event_data.link_event.link_status =\n-\t\t\t\tls->link_info & I40E_AQ_LINK_UP;\n-\t\t\tpfe.event_data.link_event.link_speed = ls->link_speed;\n-\t\t}\n-\t\ti40e_aq_send_msg_to_vf(hw, abs_vf_id, I40E_VIRTCHNL_OP_EVENT,\n-\t\t\t\t       0, (u8 *)&pfe, sizeof(pfe),\n-\t\t\t\t       NULL);\n+\tif (vf->link_forced) {\n+\t\tpfe.event_data.link_event.link_status = vf->link_up;\n+\t\tpfe.event_data.link_event.link_speed =\n+\t\t\t(vf->link_up ? I40E_LINK_SPEED_40GB : 0);\n+\t} else {\n+\t\tpfe.event_data.link_event.link_status =\n+\t\t\tls->link_info & I40E_AQ_LINK_UP;\n+\t\tpfe.event_data.link_event.link_speed = ls->link_speed;\n \t}\n+\ti40e_aq_send_msg_to_vf(hw, abs_vf_id, I40E_VIRTCHNL_OP_EVENT,\n+\t\t\t       0, (u8 *)&pfe, sizeof(pfe), NULL);\n+}\n+\n+/**\n+ * i40e_vc_notify_link_state\n+ * @pf: pointer to the PF structure\n+ *\n+ * send a link status message to all VFs on a given PF\n+ **/\n+void i40e_vc_notify_link_state(struct i40e_pf *pf)\n+{\n+\tint i;\n+\n+\tfor (i = 0; i < pf->num_alloc_vfs; i++)\n+\t\ti40e_vc_notify_vf_link_state(&pf->vf[i]);\n }\n \n /**\n",
    "prefixes": [
        "net-next",
        "S3",
        "04/13"
    ]
}