Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/680962/?format=api
{ "id": 680962, "url": "http://patchwork.ozlabs.org/api/patches/680962/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1476224818-16844-6-git-send-email-bimmy.pujari@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": "<1476224818-16844-6-git-send-email-bimmy.pujari@intel.com>", "list_archive_url": null, "date": "2016-10-11T22:26:57", "name": "[next,S50,5/6] i40e: Implementation of ERROR state for NVM update state machine", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "bce03db2a3512fdd091ebd5888cf27ea0687e051", "submitter": { "id": 68919, "url": "http://patchwork.ozlabs.org/api/people/68919/?format=api", "name": "Pujari, Bimmy", "email": "bimmy.pujari@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/1476224818-16844-6-git-send-email-bimmy.pujari@intel.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/680962/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/680962/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 3sts8f2PSZz9s9N\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 12 Oct 2016 09:28:33 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 1958B88F4C;\n\tTue, 11 Oct 2016 22:28:31 +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 35jKw1nlBNrF; Tue, 11 Oct 2016 22:28:29 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 7AFDF8A341;\n\tTue, 11 Oct 2016 22:28:29 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id D5D771CEB01\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 11 Oct 2016 22:28:27 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id D13A388F45\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 11 Oct 2016 22:28:27 +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 EWie+mZ0tjvL for <intel-wired-lan@lists.osuosl.org>;\n\tTue, 11 Oct 2016 22:28:26 +0000 (UTC)", "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id C324288B28\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 11 Oct 2016 22:28:26 +0000 (UTC)", "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby fmsmga105.fm.intel.com with ESMTP; 11 Oct 2016 15:28:25 -0700", "from bimmy.jf.intel.com (HELO bimmy.linux1.jf.intel.com)\n\t([134.134.2.167])\n\tby orsmga001.jf.intel.com with ESMTP; 11 Oct 2016 15:28:25 -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,479,1473145200\"; d=\"scan'208\";\n\ta=\"1043428138\"", "From": "Bimmy Pujari <bimmy.pujari@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Tue, 11 Oct 2016 15:26:57 -0700", "Message-Id": "<1476224818-16844-6-git-send-email-bimmy.pujari@intel.com>", "X-Mailer": "git-send-email 2.4.11", "In-Reply-To": "<1476224818-16844-1-git-send-email-bimmy.pujari@intel.com>", "References": "<1476224818-16844-1-git-send-email-bimmy.pujari@intel.com>", "Cc": "Maciej Sosin <maciej.sosin@intel.com>", "Subject": "[Intel-wired-lan] [next PATCH S50 5/6] i40e: Implementation of\n\tERROR state for NVM update state machine", "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: Maciej Sosin <maciej.sosin@intel.com>\n\nThis patch adds I40E_NVMUPD_STATE_ERROR state for NVM update.\nWithout this patch driver has no possibility to return NVM image write\nfailure.This state is being set when ARQ rises error.\narq_last_status is also updated every time when ARQ event comes,\nnot only on error cases.\n\nSigned-off-by: Maciej Sosin <maciej.sosin@intel.com>\nChange-ID: I67ce43ba22a240773c2821b436e96054db0b7c81\n---\n drivers/net/ethernet/intel/i40e/i40e_adminq.c | 4 ++--\n drivers/net/ethernet/intel/i40e/i40e_nvm.c | 16 ++++++++++++++++\n drivers/net/ethernet/intel/i40e/i40e_type.h | 1 +\n drivers/net/ethernet/intel/i40evf/i40e_adminq.c | 4 ++--\n drivers/net/ethernet/intel/i40evf/i40e_type.h | 1 +\n 5 files changed, 22 insertions(+), 4 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq.c b/drivers/net/ethernet/intel/i40e/i40e_adminq.c\nindex 738b42a..56fb272 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_adminq.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_adminq.c\n@@ -964,11 +964,11 @@ i40e_status i40e_clean_arq_element(struct i40e_hw *hw,\n \tdesc = I40E_ADMINQ_DESC(hw->aq.arq, ntc);\n \tdesc_idx = ntc;\n \n+\thw->aq.arq_last_status =\n+\t\t(enum i40e_admin_queue_err)le16_to_cpu(desc->retval);\n \tflags = le16_to_cpu(desc->flags);\n \tif (flags & I40E_AQ_FLAG_ERR) {\n \t\tret_code = I40E_ERR_ADMIN_QUEUE_ERROR;\n-\t\thw->aq.arq_last_status =\n-\t\t\t(enum i40e_admin_queue_err)le16_to_cpu(desc->retval);\n \t\ti40e_debug(hw,\n \t\t\t I40E_DEBUG_AQ_MESSAGE,\n \t\t\t \"AQRX: Event received with error 0x%X.\\n\",\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_nvm.c b/drivers/net/ethernet/intel/i40e/i40e_nvm.c\nindex 954efe3..38ee18f 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_nvm.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_nvm.c\n@@ -722,9 +722,20 @@ i40e_status i40e_nvmupd_command(struct i40e_hw *hw,\n \t\t\t*((u16 *)&bytes[2]) = hw->nvm_wait_opcode;\n \t\t}\n \n+\t\t/* Clear error status on read */\n+\t\tif (hw->nvmupd_state == I40E_NVMUPD_STATE_ERROR)\n+\t\t\thw->nvmupd_state = I40E_NVMUPD_STATE_INIT;\n+\n \t\treturn 0;\n \t}\n \n+\t/* Clear status even it is not read and log */\n+\tif (hw->nvmupd_state == I40E_NVMUPD_STATE_ERROR) {\n+\t\ti40e_debug(hw, I40E_DEBUG_NVM,\n+\t\t\t \"Clearing I40E_NVMUPD_STATE_ERROR state without reading\\n\");\n+\t\thw->nvmupd_state = I40E_NVMUPD_STATE_INIT;\n+\t}\n+\n \tswitch (hw->nvmupd_state) {\n \tcase I40E_NVMUPD_STATE_INIT:\n \t\tstatus = i40e_nvmupd_state_init(hw, cmd, bytes, perrno);\n@@ -1074,6 +1085,11 @@ void i40e_nvmupd_check_wait_event(struct i40e_hw *hw, u16 opcode)\n \t\t}\n \t\thw->nvm_wait_opcode = 0;\n \n+\t\tif (hw->aq.arq_last_status) {\n+\t\t\thw->nvmupd_state = I40E_NVMUPD_STATE_ERROR;\n+\t\t\treturn;\n+\t\t}\n+\n \t\tswitch (hw->nvmupd_state) {\n \t\tcase I40E_NVMUPD_STATE_INIT_WAIT:\n \t\t\thw->nvmupd_state = I40E_NVMUPD_STATE_INIT;\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_type.h b/drivers/net/ethernet/intel/i40e/i40e_type.h\nindex bd5f13b..d9a2660 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_type.h\n+++ b/drivers/net/ethernet/intel/i40e/i40e_type.h\n@@ -366,6 +366,7 @@ enum i40e_nvmupd_state {\n \tI40E_NVMUPD_STATE_WRITING,\n \tI40E_NVMUPD_STATE_INIT_WAIT,\n \tI40E_NVMUPD_STATE_WRITE_WAIT,\n+\tI40E_NVMUPD_STATE_ERROR\n };\n \n /* nvm_access definition and its masks/shifts need to be accessible to\ndiff --git a/drivers/net/ethernet/intel/i40evf/i40e_adminq.c b/drivers/net/ethernet/intel/i40evf/i40e_adminq.c\nindex 44f7ed7..9638515 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40e_adminq.c\n+++ b/drivers/net/ethernet/intel/i40evf/i40e_adminq.c\n@@ -912,11 +912,11 @@ i40e_status i40evf_clean_arq_element(struct i40e_hw *hw,\n \tdesc = I40E_ADMINQ_DESC(hw->aq.arq, ntc);\n \tdesc_idx = ntc;\n \n+\thw->aq.arq_last_status =\n+\t\t(enum i40e_admin_queue_err)le16_to_cpu(desc->retval);\n \tflags = le16_to_cpu(desc->flags);\n \tif (flags & I40E_AQ_FLAG_ERR) {\n \t\tret_code = I40E_ERR_ADMIN_QUEUE_ERROR;\n-\t\thw->aq.arq_last_status =\n-\t\t\t(enum i40e_admin_queue_err)le16_to_cpu(desc->retval);\n \t\ti40e_debug(hw,\n \t\t\t I40E_DEBUG_AQ_MESSAGE,\n \t\t\t \"AQRX: Event received with error 0x%X.\\n\",\ndiff --git a/drivers/net/ethernet/intel/i40evf/i40e_type.h b/drivers/net/ethernet/intel/i40evf/i40e_type.h\nindex 97f96e0..ca7afe5 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40e_type.h\n+++ b/drivers/net/ethernet/intel/i40evf/i40e_type.h\n@@ -348,6 +348,7 @@ enum i40e_nvmupd_state {\n \tI40E_NVMUPD_STATE_WRITING,\n \tI40E_NVMUPD_STATE_INIT_WAIT,\n \tI40E_NVMUPD_STATE_WRITE_WAIT,\n+\tI40E_NVMUPD_STATE_ERROR\n };\n \n /* nvm_access definition and its masks/shifts need to be accessible to\n", "prefixes": [ "next", "S50", "5/6" ] }