Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/690624/?format=api
{ "id": 690624, "url": "http://patchwork.ozlabs.org/api/patches/690624/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20161102234447.17181-3-jacob.e.keller@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": "<20161102234447.17181-3-jacob.e.keller@intel.com>", "list_archive_url": null, "date": "2016-11-02T23:44:46", "name": "[3/4] fm10k: request reset when mbx->state changes", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "7b175139ae6788c1f836733a87c534950e62a255", "submitter": { "id": 9784, "url": "http://patchwork.ozlabs.org/api/people/9784/?format=api", "name": "Jacob Keller", "email": "jacob.e.keller@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/20161102234447.17181-3-jacob.e.keller@intel.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/690624/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/690624/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 (smtp3.osuosl.org [140.211.166.136])\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 3t8Ppk0xdxz9vDS\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 3 Nov 2016 10:45:02 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 80F9A32260;\n\tWed, 2 Nov 2016 23:45:00 +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 cp6P4YNhI0dh; Wed, 2 Nov 2016 23:44:55 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id 16C4D32210;\n\tWed, 2 Nov 2016 23:44:54 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id E89311C2BF0\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 2 Nov 2016 23:44:51 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id E285A956D3\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 2 Nov 2016 23:44:51 +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 YcU90+T866JJ for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 2 Nov 2016 23:44:51 +0000 (UTC)", "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 4BB43956D4\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 2 Nov 2016 23:44:51 +0000 (UTC)", "from fmsmga002.fm.intel.com ([10.253.24.26])\n\tby orsmga102.jf.intel.com with ESMTP; 02 Nov 2016 16:44:50 -0700", "from jekeller-desk.amr.corp.intel.com (HELO\n\tjekeller-desk.jekeller.internal) ([134.134.3.116])\n\tby fmsmga002.fm.intel.com with ESMTP; 02 Nov 2016 16:44:50 -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.31,436,1473145200\"; d=\"scan'208\";\n\ta=\"1079796768\"", "From": "Jacob Keller <jacob.e.keller@intel.com>", "To": "Intel Wired LAN <intel-wired-lan@lists.osuosl.org>", "Date": "Wed, 2 Nov 2016 16:44:46 -0700", "Message-Id": "<20161102234447.17181-3-jacob.e.keller@intel.com>", "X-Mailer": "git-send-email 2.10.1.777.gd068e6b", "In-Reply-To": "<20161102234447.17181-1-jacob.e.keller@intel.com>", "References": "<20161102234447.17181-1-jacob.e.keller@intel.com>", "Cc": "Ngai-Mint Kwan <ngai-mint.kwan@intel.com>", "Subject": "[Intel-wired-lan] [PATCH 3/4] fm10k: request reset when mbx->state\n\tchanges", "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: Ngai-Mint Kwan <ngai-mint.kwan@intel.com>\n\nMultiple IES API resets can cause a race condition where the mailbox\ninterrupt request bits can be cleared before being handled. This can\nleave certain mailbox messages from the PF to be untreated and the PF\nwill enter in some inactive state. If this situation occurs, the IES API\nwill initiate a mailbox version reset which, then, trigger a mailbox\nstate change. Once this mailbox transition occurs (from OPEN to CONNECT\nstate), a request for reset will be returned.\n\nThis ensures that PF will undergo a reset whenever IES API encounters an\nunknown global mailbox interrupt event or whenever the IES API\nterminates.\n\nSigned-off-by: Ngai-Mint Kwan <ngai-mint.kwan@intel.com>\nSigned-off-by: Jacob Keller <jacob.e.keller@intel.com>\n---\n drivers/net/ethernet/intel/fm10k/fm10k_mbx.c | 10 +++++++---\n drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 6 +++++-\n 2 files changed, 12 insertions(+), 4 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_mbx.c b/drivers/net/ethernet/intel/fm10k/fm10k_mbx.c\nindex c9dfa6564fcf..334088a101c3 100644\n--- a/drivers/net/ethernet/intel/fm10k/fm10k_mbx.c\n+++ b/drivers/net/ethernet/intel/fm10k/fm10k_mbx.c\n@@ -2011,9 +2011,10 @@ static void fm10k_sm_mbx_create_reply(struct fm10k_hw *hw,\n * function can also be used to respond to an error as the connection\n * resetting would also be a means of dealing with errors.\n **/\n-static void fm10k_sm_mbx_process_reset(struct fm10k_hw *hw,\n-\t\t\t\t struct fm10k_mbx_info *mbx)\n+static s32 fm10k_sm_mbx_process_reset(struct fm10k_hw *hw,\n+\t\t\t\t struct fm10k_mbx_info *mbx)\n {\n+\ts32 err = 0;\n \tconst enum fm10k_mbx_state state = mbx->state;\n \n \tswitch (state) {\n@@ -2026,6 +2027,7 @@ static void fm10k_sm_mbx_process_reset(struct fm10k_hw *hw,\n \tcase FM10K_STATE_OPEN:\n \t\t/* flush any incomplete work */\n \t\tfm10k_sm_mbx_connect_reset(mbx);\n+\t\terr = FM10K_ERR_RESET_REQUESTED;\n \t\tbreak;\n \tcase FM10K_STATE_CONNECT:\n \t\t/* Update remote value to match local value */\n@@ -2035,6 +2037,8 @@ static void fm10k_sm_mbx_process_reset(struct fm10k_hw *hw,\n \t}\n \n \tfm10k_sm_mbx_create_reply(hw, mbx, mbx->tail);\n+\n+\treturn err;\n }\n \n /**\n@@ -2115,7 +2119,7 @@ static s32 fm10k_sm_mbx_process(struct fm10k_hw *hw,\n \n \tswitch (FM10K_MSG_HDR_FIELD_GET(mbx->mbx_hdr, SM_VER)) {\n \tcase 0:\n-\t\tfm10k_sm_mbx_process_reset(hw, mbx);\n+\t\terr = fm10k_sm_mbx_process_reset(hw, mbx);\n \t\tbreak;\n \tcase FM10K_SM_MBX_VERSION:\n \t\terr = fm10k_sm_mbx_process_version_1(hw, mbx);\ndiff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c\nindex b1a2f8437d59..e372a5823480 100644\n--- a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c\n+++ b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c\n@@ -1144,6 +1144,7 @@ static irqreturn_t fm10k_msix_mbx_pf(int __always_unused irq, void *data)\n \tstruct fm10k_hw *hw = &interface->hw;\n \tstruct fm10k_mbx_info *mbx = &hw->mbx;\n \tu32 eicr;\n+\ts32 err = 0;\n \n \t/* unmask any set bits related to this interrupt */\n \teicr = fm10k_read_reg(hw, FM10K_EICR);\n@@ -1159,12 +1160,15 @@ static irqreturn_t fm10k_msix_mbx_pf(int __always_unused irq, void *data)\n \n \t/* service mailboxes */\n \tif (fm10k_mbx_trylock(interface)) {\n-\t\tmbx->ops.process(hw, mbx);\n+\t\terr = mbx->ops.process(hw, mbx);\n \t\t/* handle VFLRE events */\n \t\tfm10k_iov_event(interface);\n \t\tfm10k_mbx_unlock(interface);\n \t}\n \n+\tif (err == FM10K_ERR_RESET_REQUESTED)\n+\t\tinterface->flags |= FM10K_FLAG_RESET_REQUESTED;\n+\n \t/* if switch toggled state we should reset GLORTs */\n \tif (eicr & FM10K_EICR_SWITCHNOTREADY) {\n \t\t/* force link down for at least 4 seconds */\n", "prefixes": [ "3/4" ] }