Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1217709/?format=api
{ "id": 1217709, "url": "http://patchwork.ozlabs.org/api/patches/1217709/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20200105072922.3810260-1-jeffrey.t.kirsher@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": "<20200105072922.3810260-1-jeffrey.t.kirsher@intel.com>", "list_archive_url": null, "date": "2020-01-05T07:29:22", "name": "[net,v2] e1000e: Revert \"e1000e: Make watchdog use delayed work\"", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "c3bcbb4352a877a8827c3e402049637045cb08f9", "submitter": { "id": 473, "url": "http://patchwork.ozlabs.org/api/people/473/?format=api", "name": "Kirsher, Jeffrey T", "email": "jeffrey.t.kirsher@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/20200105072922.3810260-1-jeffrey.t.kirsher@intel.com/mbox/", "series": [ { "id": 151255, "url": "http://patchwork.ozlabs.org/api/series/151255/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=151255", "date": "2020-01-05T07:29:22", "name": "[net,v2] e1000e: Revert \"e1000e: Make watchdog use delayed work\"", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/151255/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1217709/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1217709/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@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" ], "Authentication-Results": [ "ozlabs.org; spf=pass (sender SPF authorized)\n\tsmtp.mailfrom=osuosl.org (client-ip=140.211.166.138;\n\thelo=whitealder.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org;\n\tdmarc=fail (p=none dis=none) header.from=intel.com" ], "Received": [ "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 47r9JH35Jnz9sP3\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSun, 5 Jan 2020 18:29:34 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 6F7CB85D5C;\n\tSun, 5 Jan 2020 07:29:32 +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 E2VKIFs0i3TK; Sun, 5 Jan 2020 07:29:29 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id CCEA585D26;\n\tSun, 5 Jan 2020 07:29:29 +0000 (UTC)", "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id 18BBD1BF427\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tSun, 5 Jan 2020 07:29:28 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 1401085247\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tSun, 5 Jan 2020 07:29:28 +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 ajACN4dcrgln for <intel-wired-lan@lists.osuosl.org>;\n\tSun, 5 Jan 2020 07:29:26 +0000 (UTC)", "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n\tby fraxinus.osuosl.org (Postfix) with ESMTPS id D020685239\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tSun, 5 Jan 2020 07:29:26 +0000 (UTC)", "from fmsmga005.fm.intel.com ([10.253.24.32])\n\tby fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t04 Jan 2020 23:29:26 -0800", "from jtkirshe-desk1.jf.intel.com ([134.134.177.74])\n\tby fmsmga005.fm.intel.com with ESMTP; 04 Jan 2020 23:29:25 -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-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.69,397,1571727600\"; d=\"scan'208\";a=\"420406236\"", "From": "Jeff Kirsher <jeffrey.t.kirsher@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Sat, 4 Jan 2020 23:29:22 -0800", "Message-Id": "<20200105072922.3810260-1-jeffrey.t.kirsher@intel.com>", "X-Mailer": "git-send-email 2.24.1", "MIME-Version": "1.0", "Subject": "[Intel-wired-lan] [net v2] e1000e: Revert \"e1000e: Make watchdog\n\tuse delayed work\"", "X-BeenThere": "intel-wired-lan@osuosl.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.osuosl.org>", "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>", "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "intel-wired-lan-bounces@osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>" }, "content": "This reverts commit 59653e6497d16f7ac1d9db088f3959f57ee8c3db.\n\nThis is due to this commit causing driver crashes and connections to\nreset unexpectedly.\n\nSigned-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>\n---\nv2: fix the partial revert of Alex Duyck's patch to remove the use of\n __E1000_DOWN bit\n\n drivers/net/ethernet/intel/e1000e/e1000.h | 5 +-\n drivers/net/ethernet/intel/e1000e/netdev.c | 54 ++++++++++------------\n 2 files changed, 27 insertions(+), 32 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/e1000e/e1000.h b/drivers/net/ethernet/intel/e1000e/e1000.h\nindex 6c51b1bad8c4..37a2314d3e6b 100644\n--- a/drivers/net/ethernet/intel/e1000e/e1000.h\n+++ b/drivers/net/ethernet/intel/e1000e/e1000.h\n@@ -185,13 +185,12 @@ struct e1000_phy_regs {\n \n /* board specific private data structure */\n struct e1000_adapter {\n+\tstruct timer_list watchdog_timer;\n \tstruct timer_list phy_info_timer;\n \tstruct timer_list blink_timer;\n \n \tstruct work_struct reset_task;\n-\tstruct delayed_work watchdog_task;\n-\n-\tstruct workqueue_struct *e1000_workqueue;\n+\tstruct work_struct watchdog_task;\n \n \tconst struct e1000_info *ei;\n \ndiff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c\nindex fe7997c18a10..7c5b18d87b49 100644\n--- a/drivers/net/ethernet/intel/e1000e/netdev.c\n+++ b/drivers/net/ethernet/intel/e1000e/netdev.c\n@@ -1780,8 +1780,7 @@ static irqreturn_t e1000_intr_msi(int __always_unused irq, void *data)\n \t\t}\n \t\t/* guard against interrupt when we're going down */\n \t\tif (!test_bit(__E1000_DOWN, &adapter->state))\n-\t\t\tmod_delayed_work(adapter->e1000_workqueue,\n-\t\t\t\t\t &adapter->watchdog_task, HZ);\n+\t\t\tmod_timer(&adapter->watchdog_timer, jiffies + 1);\n \t}\n \n \t/* Reset on uncorrectable ECC error */\n@@ -1861,8 +1860,7 @@ static irqreturn_t e1000_intr(int __always_unused irq, void *data)\n \t\t}\n \t\t/* guard against interrupt when we're going down */\n \t\tif (!test_bit(__E1000_DOWN, &adapter->state))\n-\t\t\tmod_delayed_work(adapter->e1000_workqueue,\n-\t\t\t\t\t &adapter->watchdog_task, HZ);\n+\t\t\tmod_timer(&adapter->watchdog_timer, jiffies + 1);\n \t}\n \n \t/* Reset on uncorrectable ECC error */\n@@ -1907,8 +1905,7 @@ static irqreturn_t e1000_msix_other(int __always_unused irq, void *data)\n \t\thw->mac.get_link_status = true;\n \t\t/* guard against interrupt when we're going down */\n \t\tif (!test_bit(__E1000_DOWN, &adapter->state))\n-\t\t\tmod_delayed_work(adapter->e1000_workqueue,\n-\t\t\t\t\t &adapter->watchdog_task, HZ);\n+\t\t\tmod_timer(&adapter->watchdog_timer, jiffies + 1);\n \t}\n \n \tif (!test_bit(__E1000_DOWN, &adapter->state))\n@@ -4284,6 +4281,7 @@ void e1000e_down(struct e1000_adapter *adapter, bool reset)\n \n \tnapi_synchronize(&adapter->napi);\n \n+\tdel_timer_sync(&adapter->watchdog_timer);\n \tdel_timer_sync(&adapter->phy_info_timer);\n \n \tspin_lock(&adapter->stats64_lock);\n@@ -5155,11 +5153,25 @@ static void e1000e_check_82574_phy_workaround(struct e1000_adapter *adapter)\n \t}\n }\n \n+/**\n+ * e1000_watchdog - Timer Call-back\n+ * @data: pointer to adapter cast into an unsigned long\n+ **/\n+static void e1000_watchdog(struct timer_list *t)\n+{\n+\tstruct e1000_adapter *adapter = from_timer(adapter, t, watchdog_timer);\n+\n+\t/* Do the rest outside of interrupt context */\n+\tschedule_work(&adapter->watchdog_task);\n+\n+\t/* TODO: make this use queue_delayed_work() */\n+}\n+\n static void e1000_watchdog_task(struct work_struct *work)\n {\n \tstruct e1000_adapter *adapter = container_of(work,\n \t\t\t\t\t\t struct e1000_adapter,\n-\t\t\t\t\t\t watchdog_task.work);\n+\t\t\t\t\t\t watchdog_task);\n \tstruct net_device *netdev = adapter->netdev;\n \tstruct e1000_mac_info *mac = &adapter->hw.mac;\n \tstruct e1000_phy_info *phy = &adapter->hw.phy;\n@@ -5407,9 +5419,8 @@ static void e1000_watchdog_task(struct work_struct *work)\n \n \t/* Reset the timer */\n \tif (!test_bit(__E1000_DOWN, &adapter->state))\n-\t\tqueue_delayed_work(adapter->e1000_workqueue,\n-\t\t\t\t &adapter->watchdog_task,\n-\t\t\t\t round_jiffies(2 * HZ));\n+\t\tmod_timer(&adapter->watchdog_timer,\n+\t\t\t round_jiffies(jiffies + 2 * HZ));\n }\n \n #define E1000_TX_FLAGS_CSUM\t\t0x00000001\n@@ -7449,21 +7460,11 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)\n \t\tgoto err_eeprom;\n \t}\n \n-\tadapter->e1000_workqueue = alloc_workqueue(\"%s\", WQ_MEM_RECLAIM, 0,\n-\t\t\t\t\t\t e1000e_driver_name);\n-\n-\tif (!adapter->e1000_workqueue) {\n-\t\terr = -ENOMEM;\n-\t\tgoto err_workqueue;\n-\t}\n-\n-\tINIT_DELAYED_WORK(&adapter->watchdog_task, e1000_watchdog_task);\n-\tqueue_delayed_work(adapter->e1000_workqueue, &adapter->watchdog_task,\n-\t\t\t 0);\n-\n+\ttimer_setup(&adapter->watchdog_timer, e1000_watchdog, 0);\n \ttimer_setup(&adapter->phy_info_timer, e1000_update_phy_info, 0);\n \n \tINIT_WORK(&adapter->reset_task, e1000_reset_task);\n+\tINIT_WORK(&adapter->watchdog_task, e1000_watchdog_task);\n \tINIT_WORK(&adapter->downshift_task, e1000e_downshift_workaround);\n \tINIT_WORK(&adapter->update_phy_task, e1000e_update_phy_task);\n \tINIT_WORK(&adapter->print_hang_task, e1000_print_hw_hang);\n@@ -7557,9 +7558,6 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)\n \treturn 0;\n \n err_register:\n-\tflush_workqueue(adapter->e1000_workqueue);\n-\tdestroy_workqueue(adapter->e1000_workqueue);\n-err_workqueue:\n \tif (!(adapter->flags & FLAG_HAS_AMT))\n \t\te1000e_release_hw_control(adapter);\n err_eeprom:\n@@ -7604,17 +7602,15 @@ static void e1000_remove(struct pci_dev *pdev)\n \t * from being rescheduled.\n \t */\n \tset_bit(__E1000_DOWN, &adapter->state);\n+\tdel_timer_sync(&adapter->watchdog_timer);\n \tdel_timer_sync(&adapter->phy_info_timer);\n \n \tcancel_work_sync(&adapter->reset_task);\n+\tcancel_work_sync(&adapter->watchdog_task);\n \tcancel_work_sync(&adapter->downshift_task);\n \tcancel_work_sync(&adapter->update_phy_task);\n \tcancel_work_sync(&adapter->print_hang_task);\n \n-\tcancel_delayed_work(&adapter->watchdog_task);\n-\tflush_workqueue(adapter->e1000_workqueue);\n-\tdestroy_workqueue(adapter->e1000_workqueue);\n-\n \tif (adapter->flags & FLAG_HAS_HW_TIMESTAMP) {\n \t\tcancel_work_sync(&adapter->tx_hwtstamp_work);\n \t\tif (adapter->tx_hwtstamp_skb) {\n", "prefixes": [ "net", "v2" ] }