Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/558705/?format=api
{ "id": 558705, "url": "http://patchwork.ozlabs.org/api/patches/558705/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20151218013255.24602.41039.stgit@localhost6.localdomain6/", "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": "<20151218013255.24602.41039.stgit@localhost6.localdomain6>", "list_archive_url": null, "date": "2015-12-18T01:32:55", "name": "ixgbevf: use bit operations for setting and checking resets", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "8baadaf7d0e149bd0923a2c52ee96eddf71a391d", "submitter": { "id": 1670, "url": "http://patchwork.ozlabs.org/api/people/1670/?format=api", "name": "Tantilov, Emil S", "email": "emil.s.tantilov@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/20151218013255.24602.41039.stgit@localhost6.localdomain6/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/558705/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/558705/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 fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ozlabs.org (Postfix) with ESMTP id 2DCAF140157\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 18 Dec 2015 12:37:00 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 65256A66DB;\n\tFri, 18 Dec 2015 01:36:59 +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 slgQ6KwrRrUE; Fri, 18 Dec 2015 01:36:58 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id E0FA6A65F6;\n\tFri, 18 Dec 2015 01:36:58 +0000 (UTC)", "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id 4649F1C0F1F\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 18 Dec 2015 01:36:57 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 3FA31A65F6\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 18 Dec 2015 01:36:57 +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 3Glsz4YIrKHy for <intel-wired-lan@lists.osuosl.org>;\n\tFri, 18 Dec 2015 01:36:56 +0000 (UTC)", "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 6669EA65E9\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 18 Dec 2015 01:36:56 +0000 (UTC)", "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby orsmga101.jf.intel.com with ESMTP; 17 Dec 2015 17:36:56 -0800", "from estantil-desk3.jf.intel.com (HELO localhost6.localdomain6)\n\t([134.134.3.186])\n\tby orsmga002.jf.intel.com with ESMTP; 17 Dec 2015 17:36:55 -0800" ], "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.20,443,1444719600\"; d=\"scan'208\";a=\"873925214\"", "From": "Emil Tantilov <emil.s.tantilov@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Thu, 17 Dec 2015 17:32:55 -0800", "Message-ID": "<20151218013255.24602.41039.stgit@localhost6.localdomain6>", "User-Agent": "StGit/0.17.1-4-g4a0c1-dirty", "MIME-Version": "1.0", "Subject": "[Intel-wired-lan] [PATCH] ixgbevf: use bit operations for setting\n\tand checking resets", "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>", "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": "Move the reset flags to adapter->state in order to make use of bit\noperations.\n\nThis is an alternative patch to the one previously submitted by\nJohn Greene.\n\nSuggested-by: Alexander Duyck <aduyck@mirantis.com>\nReported-by: Scott Otto <otts62@yahoo.com>\nReported-by: John Greene <jogreene@redhat.com>\nSigned-off-by: Emil Tantilov <emil.s.tantilov@intel.com>\n---\n drivers/net/ethernet/intel/ixgbevf/ixgbevf.h | 9 ++-------\n drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 15 ++++++---------\n 2 files changed, 8 insertions(+), 16 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h b/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h\nindex 68ec7daa..f72dd1f 100644\n--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h\n+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h\n@@ -403,13 +403,6 @@ struct ixgbevf_adapter {\n \tu32 alloc_rx_page_failed;\n \tu32 alloc_rx_buff_failed;\n \n-\t/* Some features need tri-state capability,\n-\t * thus the additional *_CAPABLE flags.\n-\t */\n-\tu32 flags;\n-#define IXGBEVF_FLAG_RESET_REQUESTED\t\t(u32)(1)\n-#define IXGBEVF_FLAG_QUEUE_RESET_REQUESTED\t(u32)(1 << 2)\n-\n \tstruct msix_entry *msix_entries;\n \n \t/* OS defined structs */\n@@ -461,6 +454,8 @@ enum ixbgevf_state_t {\n \t__IXGBEVF_REMOVING,\n \t__IXGBEVF_SERVICE_SCHED,\n \t__IXGBEVF_SERVICE_INITED,\n+\t__IXGBEVF_RESET_REQUESTED,\n+\t__IXGBEVF_QUEUE_RESET_REQUESTED,\n };\n \n enum ixgbevf_boards {\ndiff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c\nindex 3558f01..0b451d9 100644\n--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c\n+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c\n@@ -268,7 +268,7 @@ static void ixgbevf_tx_timeout_reset(struct ixgbevf_adapter *adapter)\n {\n \t/* Do the reset outside of interrupt context */\n \tif (!test_bit(__IXGBEVF_DOWN, &adapter->state)) {\n-\t\tadapter->flags |= IXGBEVF_FLAG_RESET_REQUESTED;\n+\t\tset_bit(__IXGBEVF_RESET_REQUESTED, &adapter->state);\n \t\tixgbevf_service_event_schedule(adapter);\n \t}\n }\n@@ -1984,7 +1984,7 @@ static int ixgbevf_configure_dcb(struct ixgbevf_adapter *adapter)\n \t\thw->mbx.timeout = 0;\n \n \t\t/* wait for watchdog to come around and bail us out */\n-\t\tadapter->flags |= IXGBEVF_FLAG_QUEUE_RESET_REQUESTED;\n+\t\tset_bit(__IXGBEVF_QUEUE_RESET_REQUESTED, &adapter->state);\n \t}\n \n \treturn 0;\n@@ -2749,11 +2749,9 @@ static void ixgbevf_service_timer(unsigned long data)\n \n static void ixgbevf_reset_subtask(struct ixgbevf_adapter *adapter)\n {\n-\tif (!(adapter->flags & IXGBEVF_FLAG_RESET_REQUESTED))\n+\tif (!test_and_clear_bit(__IXGBEVF_RESET_REQUESTED, &adapter->state))\n \t\treturn;\n \n-\tadapter->flags &= ~IXGBEVF_FLAG_RESET_REQUESTED;\n-\n \t/* If we're already down or resetting, just bail */\n \tif (test_bit(__IXGBEVF_DOWN, &adapter->state) ||\n \t test_bit(__IXGBEVF_RESETTING, &adapter->state))\n@@ -2821,7 +2819,7 @@ static void ixgbevf_watchdog_update_link(struct ixgbevf_adapter *adapter)\n \n \t/* if check for link returns error we will need to reset */\n \tif (err && time_after(jiffies, adapter->last_reset + (10 * HZ))) {\n-\t\tadapter->flags |= IXGBEVF_FLAG_RESET_REQUESTED;\n+\t\tset_bit(__IXGBEVF_RESET_REQUESTED, &adapter->state);\n \t\tlink_up = false;\n \t}\n \n@@ -3222,11 +3220,10 @@ static void ixgbevf_queue_reset_subtask(struct ixgbevf_adapter *adapter)\n {\n \tstruct net_device *dev = adapter->netdev;\n \n-\tif (!(adapter->flags & IXGBEVF_FLAG_QUEUE_RESET_REQUESTED))\n+\tif (!test_and_clear_bit(__IXGBEVF_QUEUE_RESET_REQUESTED,\n+\t\t\t\t&adapter->state))\n \t\treturn;\n \n-\tadapter->flags &= ~IXGBEVF_FLAG_QUEUE_RESET_REQUESTED;\n-\n \t/* if interface is down do nothing */\n \tif (test_bit(__IXGBEVF_DOWN, &adapter->state) ||\n \t test_bit(__IXGBEVF_RESETTING, &adapter->state))\n", "prefixes": [] }