Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/654205/?format=api
{ "id": 654205, "url": "http://patchwork.ozlabs.org/api/patches/654205/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20160729214631.1864.51421.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": "<20160729214631.1864.51421.stgit@localhost6.localdomain6>", "list_archive_url": null, "date": "2016-07-29T21:46:31", "name": "ixgbe: use atomic bitwise operations when handling reset requests", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "34557c47a82bc5f5bba61279b9dc4e44660af26e", "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/20160729214631.1864.51421.stgit@localhost6.localdomain6/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/654205/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/654205/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 whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\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 3s1MhP3YGkz9t0G\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 30 Jul 2016 07:44:53 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id C3B94919ED;\n\tFri, 29 Jul 2016 21:44:51 +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 vz+EzgoSCaiv; Fri, 29 Jul 2016 21:44:49 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id CC0419179E;\n\tFri, 29 Jul 2016 21:44:49 +0000 (UTC)", "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 90C001C24E7\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 29 Jul 2016 21:44:48 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 8BE8E3095F\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 29 Jul 2016 21:44:48 +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 9vSmYY3G8HOh for <intel-wired-lan@lists.osuosl.org>;\n\tFri, 29 Jul 2016 21:44:47 +0000 (UTC)", "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby silver.osuosl.org (Postfix) with ESMTP id 4EAB5313C9\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 29 Jul 2016 21:44:47 +0000 (UTC)", "from fmsmga004.fm.intel.com ([10.253.24.48])\n\tby fmsmga101.fm.intel.com with ESMTP; 29 Jul 2016 14:44:47 -0700", "from estantil-desk3.jf.intel.com (HELO localhost6.localdomain6)\n\t([134.134.3.186])\n\tby fmsmga004.fm.intel.com with ESMTP; 29 Jul 2016 14:44:46 -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.28,441,1464678000\"; d=\"scan'208\";a=\"147733474\"", "From": "Emil Tantilov <emil.s.tantilov@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Fri, 29 Jul 2016 14:46:31 -0700", "Message-ID": "<20160729214631.1864.51421.stgit@localhost6.localdomain6>", "User-Agent": "StGit/0.17.1-17-ge4e0", "MIME-Version": "1.0", "Subject": "[Intel-wired-lan] [PATCH] ixgbe: use atomic bitwise operations when\n\thandling reset requests", "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": "Use atomic bitwise operations when setting and checking reset\nrequests. This should help with possible races in the service task.\n\nSigned-off-by: Emil Tantilov <emil.s.tantilov@intel.com>\n---\n drivers/net/ethernet/intel/ixgbe/ixgbe.h | 2 +-\n drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 16 +++++++---------\n 2 files changed, 8 insertions(+), 10 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h\nindex 9475ff9..5628e2d 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h\n@@ -653,7 +653,6 @@ struct ixgbe_adapter {\n #define IXGBE_FLAG2_TEMP_SENSOR_EVENT\t\tBIT(3)\n #define IXGBE_FLAG2_SEARCH_FOR_SFP\t\tBIT(4)\n #define IXGBE_FLAG2_SFP_NEEDS_RESET\t\tBIT(5)\n-#define IXGBE_FLAG2_RESET_REQUESTED\t\tBIT(6)\n #define IXGBE_FLAG2_FDIR_REQUIRES_REINIT\tBIT(7)\n #define IXGBE_FLAG2_RSS_FIELD_IPV4_UDP\t\tBIT(8)\n #define IXGBE_FLAG2_RSS_FIELD_IPV6_UDP\t\tBIT(9)\n@@ -840,6 +839,7 @@ enum ixgbe_state_t {\n \t__IXGBE_IN_SFP_INIT,\n \t__IXGBE_PTP_RUNNING,\n \t__IXGBE_PTP_TX_IN_PROGRESS,\n+\t__IXGBE_RESET_REQUESTED,\n };\n \n struct ixgbe_cb {\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\nindex f687b76..60b8e6e 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n@@ -1103,7 +1103,7 @@ static void ixgbe_tx_timeout_reset(struct ixgbe_adapter *adapter)\n \n \t/* Do the reset outside of interrupt context */\n \tif (!test_bit(__IXGBE_DOWN, &adapter->state)) {\n-\t\tadapter->flags2 |= IXGBE_FLAG2_RESET_REQUESTED;\n+\t\tset_bit(__IXGBE_RESET_REQUESTED, &adapter->state);\n \t\te_warn(drv, \"initiating reset due to tx timeout\\n\");\n \t\tixgbe_service_event_schedule(adapter);\n \t}\n@@ -2777,7 +2777,7 @@ static irqreturn_t ixgbe_msix_other(int irq, void *data)\n \t\t}\n \t\tif (eicr & IXGBE_EICR_ECC) {\n \t\t\te_info(link, \"Received ECC Err, initiating reset\\n\");\n-\t\t\tadapter->flags2 |= IXGBE_FLAG2_RESET_REQUESTED;\n+\t\t\tset_bit(__IXGBE_RESET_REQUESTED, &adapter->state);\n \t\t\tixgbe_service_event_schedule(adapter);\n \t\t\tIXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_ECC);\n \t\t}\n@@ -3007,7 +3007,7 @@ static irqreturn_t ixgbe_intr(int irq, void *data)\n \tcase ixgbe_mac_x550em_a:\n \t\tif (eicr & IXGBE_EICR_ECC) {\n \t\t\te_info(link, \"Received ECC Err, initiating reset\\n\");\n-\t\t\tadapter->flags2 |= IXGBE_FLAG2_RESET_REQUESTED;\n+\t\t\tset_bit(__IXGBE_RESET_REQUESTED, &adapter->state);\n \t\t\tixgbe_service_event_schedule(adapter);\n \t\t\tIXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_ECC);\n \t\t}\n@@ -5494,8 +5494,8 @@ void ixgbe_down(struct ixgbe_adapter *adapter)\n \n \tixgbe_napi_disable_all(adapter);\n \n-\tadapter->flags2 &= ~(IXGBE_FLAG2_FDIR_REQUIRES_REINIT |\n-\t\t\t IXGBE_FLAG2_RESET_REQUESTED);\n+\tclear_bit(__IXGBE_RESET_REQUESTED, &adapter->state);\n+\tadapter->flags2 &= ~IXGBE_FLAG2_FDIR_REQUIRES_REINIT;\n \tadapter->flags &= ~IXGBE_FLAG_NEED_LINK_UPDATE;\n \n \tdel_timer_sync(&adapter->service_timer);\n@@ -6915,7 +6915,7 @@ static void ixgbe_watchdog_flush_tx(struct ixgbe_adapter *adapter)\n \t\t\t * (Do the reset outside of interrupt context).\n \t\t\t */\n \t\t\te_warn(drv, \"initiating reset to clear Tx work after link loss\\n\");\n-\t\t\tadapter->flags2 |= IXGBE_FLAG2_RESET_REQUESTED;\n+\t\t\tset_bit(__IXGBE_RESET_REQUESTED, &adapter->state);\n \t\t}\n \t}\n }\n@@ -7181,11 +7181,9 @@ static void ixgbe_phy_interrupt_subtask(struct ixgbe_adapter *adapter)\n \n static void ixgbe_reset_subtask(struct ixgbe_adapter *adapter)\n {\n-\tif (!(adapter->flags2 & IXGBE_FLAG2_RESET_REQUESTED))\n+\tif (!test_and_clear_bit(__IXGBE_RESET_REQUESTED, &adapter->state))\n \t\treturn;\n \n-\tadapter->flags2 &= ~IXGBE_FLAG2_RESET_REQUESTED;\n-\n \t/* If we're already down, removing or resetting, just bail */\n \tif (test_bit(__IXGBE_DOWN, &adapter->state) ||\n \t test_bit(__IXGBE_REMOVING, &adapter->state) ||\n", "prefixes": [] }