Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/523619/?format=api
{ "id": 523619, "url": "http://patchwork.ozlabs.org/api/patches/523619/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1443478201-47450-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": "<1443478201-47450-1-git-send-email-mitch.a.williams@intel.com>", "list_archive_url": null, "date": "2015-09-28T22:10:01", "name": "[net] i40e/i40evf: check for stopped admin queue", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "7f63b01bfd89c897c34e733e608e66d2bced9977", "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/1443478201-47450-1-git-send-email-mitch.a.williams@intel.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/523619/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/523619/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\tby ozlabs.org (Postfix) with ESMTP id 51633140AF3\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 29 Sep 2015 08:08:47 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 9C9583322A;\n\tMon, 28 Sep 2015 22:08:46 +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 KG9OIR0K7Tjk; Mon, 28 Sep 2015 22:08:45 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id C895732E8F;\n\tMon, 28 Sep 2015 22:08:45 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 8B1881C1654\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 28 Sep 2015 22:08:44 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 8543F953B5\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 28 Sep 2015 22:08:44 +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 JFkAxluKdhwk for <intel-wired-lan@lists.osuosl.org>;\n\tMon, 28 Sep 2015 22:08:43 +0000 (UTC)", "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id D6E0D953A9\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 28 Sep 2015 22:08:43 +0000 (UTC)", "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby fmsmga102.fm.intel.com with ESMTP; 28 Sep 2015 15:08:43 -0700", "from mawilli1-mobl.jf.intel.com ([10.166.14.28])\n\tby orsmga001.jf.intel.com with ESMTP; 28 Sep 2015 15:08:43 -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.17,604,1437462000\"; d=\"scan'208\";a=\"779353947\"", "From": "Mitch Williams <mitch.a.williams@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Mon, 28 Sep 2015 15:10:01 -0700", "Message-Id": "<1443478201-47450-1-git-send-email-mitch.a.williams@intel.com>", "X-Mailer": "git-send-email 2.4.3", "Subject": "[Intel-wired-lan] [net PATCH] i40e/i40evf: check for stopped admin\n\tqueue", "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": "It's possible that while we are waiting for the spinlock, another\nentity (that owns the spinlock) has shut down the admin queue.\nIf we then attempt to use the queue, we will panic.\n\nAdd a check for this condition on the receive side. This matches\nan existing check on the send queue side.\n\nSigned-off-by: Mitch Williams <mitch.a.williams@intel.com>\n---\n drivers/net/ethernet/intel/i40e/i40e_adminq.c | 9 +++++++++\n drivers/net/ethernet/intel/i40evf/i40e_adminq.c | 9 +++++++++\n 2 files changed, 18 insertions(+)", "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq.c b/drivers/net/ethernet/intel/i40e/i40e_adminq.c\nindex 3e0d200..62488a6 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_adminq.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_adminq.c\n@@ -946,6 +946,13 @@ i40e_status i40e_clean_arq_element(struct i40e_hw *hw,\n \t/* take the lock before we start messing with the ring */\n \tmutex_lock(&hw->aq.arq_mutex);\n \n+\tif (hw->aq.arq.count == 0) {\n+\t\ti40e_debug(hw, I40E_DEBUG_AQ_MESSAGE,\n+\t\t\t \"AQRX: Admin queue not initialized.\\n\");\n+\t\tret_code = I40E_ERR_QUEUE_EMPTY;\n+\t\tgoto clean_arq_element_err;\n+\t}\n+\n \t/* set next_to_use to head */\n \tntu = (rd32(hw, hw->aq.arq.head) & I40E_PF_ARQH_ARQH_MASK);\n \tif (ntu == ntc) {\n@@ -1007,6 +1014,8 @@ clean_arq_element_out:\n \t/* Set pending if needed, unlock and return */\n \tif (pending != NULL)\n \t\t*pending = (ntc > ntu ? hw->aq.arq.count : 0) + (ntu - ntc);\n+\n+clean_arq_element_err:\n \tmutex_unlock(&hw->aq.arq_mutex);\n \n \tif (i40e_is_nvm_update_op(&e->desc)) {\ndiff --git a/drivers/net/ethernet/intel/i40evf/i40e_adminq.c b/drivers/net/ethernet/intel/i40evf/i40e_adminq.c\nindex c1d25f8..7f52ee1 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40e_adminq.c\n+++ b/drivers/net/ethernet/intel/i40evf/i40e_adminq.c\n@@ -898,6 +898,13 @@ i40e_status i40evf_clean_arq_element(struct i40e_hw *hw,\n \t/* take the lock before we start messing with the ring */\n \tmutex_lock(&hw->aq.arq_mutex);\n \n+\tif (hw->aq.arq.count == 0) {\n+\t\ti40e_debug(hw, I40E_DEBUG_AQ_MESSAGE,\n+\t\t\t \"AQRX: Admin queue not initialized.\\n\");\n+\t\tret_code = I40E_ERR_QUEUE_EMPTY;\n+\t\tgoto clean_arq_element_err;\n+\t}\n+\n \t/* set next_to_use to head */\n \tntu = (rd32(hw, hw->aq.arq.head) & I40E_PF_ARQH_ARQH_MASK);\n \tif (ntu == ntc) {\n@@ -959,6 +966,8 @@ clean_arq_element_out:\n \t/* Set pending if needed, unlock and return */\n \tif (pending != NULL)\n \t\t*pending = (ntc > ntu ? hw->aq.arq.count : 0) + (ntu - ntc);\n+\n+clean_arq_element_err:\n \tmutex_unlock(&hw->aq.arq_mutex);\n \n \treturn ret_code;\n", "prefixes": [ "net" ] }