Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/781902/?format=api
{ "id": 781902, "url": "http://patchwork.ozlabs.org/api/patches/781902/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20170628152226.25369-3-gedwards@ddn.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": "<20170628152226.25369-3-gedwards@ddn.com>", "list_archive_url": null, "date": "2017-06-28T15:22:25", "name": "[2/3] igb: expose mailbox unlock method", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "c0b56d40a87650b4181bee64c4627214580b8816", "submitter": { "id": 71885, "url": "http://patchwork.ozlabs.org/api/people/71885/?format=api", "name": "Greg Edwards", "email": "gedwards@ddn.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/20170628152226.25369-3-gedwards@ddn.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/781902/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/781902/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" ], "Received": [ "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\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 3wyYhJ4djpz9s74\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 29 Jun 2017 06:06:08 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 2DC3A836A0;\n\tWed, 28 Jun 2017 20:06:07 +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 BDxn3MrcamW4; Wed, 28 Jun 2017 20:06:04 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 8D664822DD;\n\tWed, 28 Jun 2017 20:06:04 +0000 (UTC)", "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id A74B01C0DE5\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 28 Jun 2017 15:28:20 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 9E39386BC4\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 28 Jun 2017 15:28:20 +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 5xeo13EdUBwZ for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 28 Jun 2017 15:28:19 +0000 (UTC)", "from legacy.ddn.com (legacy.ddn.com [64.47.133.206])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id 7370D86D8A\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 28 Jun 2017 15:28:19 +0000 (UTC)", "from LAX-EX-CAHT1.datadirect.datadirectnet.com (10.8.103.81) by\n\tLAX-EX-CAHT2.datadirect.datadirectnet.com (10.8.103.82) with\n\tMicrosoft SMTP\n\tServer (TLS) id 14.3.319.2; Wed, 28 Jun 2017 08:22:58 -0700", "from psuche.colorado.datadirectnet.com (10.8.30.130) by\n\tLAX-EX-CAHT1.datadirect.datadirectnet.com (10.8.103.81) with\n\tMicrosoft SMTP\n\tServer (TLS) id 14.3.319.2; Wed, 28 Jun 2017 08:22:57 -0700" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "from auto-whitelisted by SQLgrey-1.7.6", "From": "Greg Edwards <gedwards@ddn.com>", "To": "<intel-wired-lan@lists.osuosl.org>", "Date": "Wed, 28 Jun 2017 09:22:25 -0600", "Message-ID": "<20170628152226.25369-3-gedwards@ddn.com>", "X-Mailer": "git-send-email 2.9.4", "In-Reply-To": "<20170628152226.25369-1-gedwards@ddn.com>", "References": "<20170628152226.25369-1-gedwards@ddn.com>", "MIME-Version": "1.0", "X-Originating-IP": "[10.8.30.130]", "X-Mailman-Approved-At": "Wed, 28 Jun 2017 20:06:03 +0000", "Cc": "Greg Edwards <gedwards@ddn.com>", "Subject": "[Intel-wired-lan] [PATCH 2/3] igb: expose mailbox unlock method", "X-BeenThere": "intel-wired-lan@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.osuosl.org>", "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<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\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>", "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": "Add a mailbox unlock method to e1000_mbx_operations, which will be used\nto unlock the PF/VF mailbox by the PF.\n\nSigned-off-by: Greg Edwards <gedwards@ddn.com>\n---\n drivers/net/ethernet/intel/igb/e1000_hw.h | 1 +\n drivers/net/ethernet/intel/igb/e1000_mbx.c | 39 ++++++++++++++++++++++++++++++\n drivers/net/ethernet/intel/igb/e1000_mbx.h | 1 +\n 3 files changed, 41 insertions(+)", "diff": "diff --git a/drivers/net/ethernet/intel/igb/e1000_hw.h b/drivers/net/ethernet/intel/igb/e1000_hw.h\nindex fd7865a8d2e3..6076f258a0a5 100644\n--- a/drivers/net/ethernet/intel/igb/e1000_hw.h\n+++ b/drivers/net/ethernet/intel/igb/e1000_hw.h\n@@ -499,6 +499,7 @@ struct e1000_mbx_operations {\n \ts32 (*check_for_msg)(struct e1000_hw *hw, u16 mbx_id);\n \ts32 (*check_for_ack)(struct e1000_hw *hw, u16 mbx_id);\n \ts32 (*check_for_rst)(struct e1000_hw *hw, u16 mbx_id);\n+\ts32 (*unlock)(struct e1000_hw *hw, u16 mbx_id);\n };\n \n struct e1000_mbx_stats {\ndiff --git a/drivers/net/ethernet/intel/igb/e1000_mbx.c b/drivers/net/ethernet/intel/igb/e1000_mbx.c\nindex 00e263f0c030..6aa44723507b 100644\n--- a/drivers/net/ethernet/intel/igb/e1000_mbx.c\n+++ b/drivers/net/ethernet/intel/igb/e1000_mbx.c\n@@ -125,6 +125,24 @@ s32 igb_check_for_rst(struct e1000_hw *hw, u16 mbx_id)\n }\n \n /**\n+ * igb_unlock_mbx - unlock the mailbox\n+ * @hw: pointer to the HW structure\n+ * @mbx_id: id of mailbox to check\n+ *\n+ * returns SUCCESS if the mailbox was unlocked or else ERR_MBX\n+ **/\n+s32 igb_unlock_mbx(struct e1000_hw *hw, u16 mbx_id)\n+{\n+\tstruct e1000_mbx_info *mbx = &hw->mbx;\n+\ts32 ret_val = -E1000_ERR_MBX;\n+\n+\tif (mbx->ops.unlock)\n+\t\tret_val = mbx->ops.unlock(hw, mbx_id);\n+\n+\treturn ret_val;\n+}\n+\n+/**\n * igb_poll_for_msg - Wait for message notification\n * @hw: pointer to the HW structure\n * @mbx_id: id of mailbox to write\n@@ -341,6 +359,26 @@ static s32 igb_obtain_mbx_lock_pf(struct e1000_hw *hw, u16 vf_number)\n }\n \n /**\n+ * igb_release_mbx_lock_pf - release mailbox lock\n+ * @hw: pointer to the HW structure\n+ * @vf_number: the VF index\n+ *\n+ * return SUCCESS if we released the mailbox lock\n+ **/\n+static s32 igb_release_mbx_lock_pf(struct e1000_hw *hw, u16 vf_number)\n+{\n+\tu32 p2v_mailbox;\n+\n+\t/* drop PF lock of mailbox, if set */\n+\tp2v_mailbox = rd32(E1000_P2VMAILBOX(vf_number));\n+\tif (p2v_mailbox & E1000_P2VMAILBOX_PFU)\n+\t\twr32(E1000_P2VMAILBOX(vf_number),\n+\t\t p2v_mailbox & ~E1000_P2VMAILBOX_PFU);\n+\n+\treturn 0;\n+}\n+\n+/**\n * igb_write_mbx_pf - Places a message in the mailbox\n * @hw: pointer to the HW structure\n * @msg: The message buffer\n@@ -437,6 +475,7 @@ s32 igb_init_mbx_params_pf(struct e1000_hw *hw)\n \tmbx->ops.check_for_msg = igb_check_for_msg_pf;\n \tmbx->ops.check_for_ack = igb_check_for_ack_pf;\n \tmbx->ops.check_for_rst = igb_check_for_rst_pf;\n+\tmbx->ops.unlock = igb_release_mbx_lock_pf;\n \n \tmbx->stats.msgs_tx = 0;\n \tmbx->stats.msgs_rx = 0;\ndiff --git a/drivers/net/ethernet/intel/igb/e1000_mbx.h b/drivers/net/ethernet/intel/igb/e1000_mbx.h\nindex 73d90aeb48b2..a98c5dc60afd 100644\n--- a/drivers/net/ethernet/intel/igb/e1000_mbx.h\n+++ b/drivers/net/ethernet/intel/igb/e1000_mbx.h\n@@ -72,6 +72,7 @@ s32 igb_write_mbx(struct e1000_hw *hw, u32 *msg, u16 size, u16 mbx_id);\n s32 igb_check_for_msg(struct e1000_hw *hw, u16 mbx_id);\n s32 igb_check_for_ack(struct e1000_hw *hw, u16 mbx_id);\n s32 igb_check_for_rst(struct e1000_hw *hw, u16 mbx_id);\n+s32 igb_unlock_mbx(struct e1000_hw *hw, u16 mbx_id);\n s32 igb_init_mbx_params_pf(struct e1000_hw *hw);\n \n #endif /* _E1000_MBX_H_ */\n", "prefixes": [ "2/3" ] }