Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1116319/?format=api
{ "id": 1116319, "url": "http://patchwork.ozlabs.org/api/patches/1116319/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20190615002935.16397-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": "<20190615002935.16397-1-jeffrey.t.kirsher@intel.com>", "list_archive_url": null, "date": "2019-06-15T00:29:35", "name": "[next,v2] e1000e: Reduce boot time by tightening sleep ranges", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "6874e666539401813794697edf5d4c4cf7c5b91e", "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/20190615002935.16397-1-jeffrey.t.kirsher@intel.com/mbox/", "series": [ { "id": 114007, "url": "http://patchwork.ozlabs.org/api/series/114007/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=114007", "date": "2019-06-15T00:29:35", "name": "[next,v2] e1000e: Reduce boot time by tightening sleep ranges", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/114007/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1116319/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1116319/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;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.136; helo=silver.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 silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\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 45Qddj6YRfz9sNC\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 15 Jun 2019 10:29:27 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 08558203B8;\n\tSat, 15 Jun 2019 00:29:25 +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 vetjGxu-ITMK; Sat, 15 Jun 2019 00:29:22 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id 691442039D;\n\tSat, 15 Jun 2019 00:29:22 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 535211BF82D\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tSat, 15 Jun 2019 00:29:21 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 4FF8B884D5\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tSat, 15 Jun 2019 00:29:21 +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 qI+H2BV5-BJU for <intel-wired-lan@lists.osuosl.org>;\n\tSat, 15 Jun 2019 00:29:20 +0000 (UTC)", "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 59C36884CD\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tSat, 15 Jun 2019 00:29:20 +0000 (UTC)", "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t14 Jun 2019 17:29:19 -0700", "from jtkirshe-desk1.jf.intel.com ([134.134.177.96])\n\tby orsmga001.jf.intel.com with ESMTP; 14 Jun 2019 17:29:19 -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-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "From": "Jeff Kirsher <jeffrey.t.kirsher@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Fri, 14 Jun 2019 17:29:35 -0700", "Message-Id": "<20190615002935.16397-1-jeffrey.t.kirsher@intel.com>", "X-Mailer": "git-send-email 2.21.0", "MIME-Version": "1.0", "Subject": "[Intel-wired-lan] [next v2] e1000e: Reduce boot time by tightening\n\tsleep ranges", "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>", "Cc": "Paul Menzel <pmenzel@molgen.mpg.de>,\n\tArjan van de Ven <arjan@linux.intel.com>", "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": "From: Arjan van de Ven <arjan@linux.intel.com>\n\nThe e1000e driver is a great user of the usleep_range() API,\nand has nice ranges that in principle help power management.\n\nHowever the ranges that are used only during system startup are\nvery long (and can add easily 100 msec to the boot time) while\nthe power savings of such long ranges is irrelevant due to the\none-off, boot only, nature of these functions.\n\nThis patch shrinks some of the longest ranges to be shorter\n(while still using a power friendly 1 msec range); this saves\n100msec+ of boot time on my BDW NUCs\n\nSigned-off-by: Arjan van de Ven <arjan@linux.intel.com>\nSigned-off-by: Paul Menzel <pmenzel@molgen.mpg.de>\n---\nv2: fixed up patch to apply cleanly to the upstream e1000e driver\n\n .../net/ethernet/intel/e1000e/80003es2lan.c | 2 +-\n drivers/net/ethernet/intel/e1000e/82571.c | 2 +-\n drivers/net/ethernet/intel/e1000e/ethtool.c | 14 ++++++-------\n drivers/net/ethernet/intel/e1000e/ich8lan.c | 20 +++++++++----------\n drivers/net/ethernet/intel/e1000e/mac.c | 2 +-\n drivers/net/ethernet/intel/e1000e/netdev.c | 14 ++++++-------\n drivers/net/ethernet/intel/e1000e/nvm.c | 2 +-\n 7 files changed, 28 insertions(+), 28 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/e1000e/80003es2lan.c b/drivers/net/ethernet/intel/e1000e/80003es2lan.c\nindex f86d55657959..4b103cca8a39 100644\n--- a/drivers/net/ethernet/intel/e1000e/80003es2lan.c\n+++ b/drivers/net/ethernet/intel/e1000e/80003es2lan.c\n@@ -680,7 +680,7 @@ static s32 e1000_reset_hw_80003es2lan(struct e1000_hw *hw)\n \tew32(TCTL, E1000_TCTL_PSP);\n \te1e_flush();\n \n-\tusleep_range(10000, 20000);\n+\tusleep_range(10000, 11000);\n \n \tctrl = er32(CTRL);\n \ndiff --git a/drivers/net/ethernet/intel/e1000e/82571.c b/drivers/net/ethernet/intel/e1000e/82571.c\nindex b9309302c29e..2c1bab377b2a 100644\n--- a/drivers/net/ethernet/intel/e1000e/82571.c\n+++ b/drivers/net/ethernet/intel/e1000e/82571.c\n@@ -959,7 +959,7 @@ static s32 e1000_reset_hw_82571(struct e1000_hw *hw)\n \tew32(TCTL, tctl);\n \te1e_flush();\n \n-\tusleep_range(10000, 20000);\n+\tusleep_range(10000, 11000);\n \n \t/* Must acquire the MDIO ownership before MAC reset.\n \t * Ownership defaults to firmware after a reset.\ndiff --git a/drivers/net/ethernet/intel/e1000e/ethtool.c b/drivers/net/ethernet/intel/e1000e/ethtool.c\nindex 02ebf208f48b..08342698386d 100644\n--- a/drivers/net/ethernet/intel/e1000e/ethtool.c\n+++ b/drivers/net/ethernet/intel/e1000e/ethtool.c\n@@ -1014,7 +1014,7 @@ static int e1000_intr_test(struct e1000_adapter *adapter, u64 *data)\n \t/* Disable all the interrupts */\n \tew32(IMC, 0xFFFFFFFF);\n \te1e_flush();\n-\tusleep_range(10000, 20000);\n+\tusleep_range(10000, 11000);\n \n \t/* Test each interrupt */\n \tfor (i = 0; i < 10; i++) {\n@@ -1046,7 +1046,7 @@ static int e1000_intr_test(struct e1000_adapter *adapter, u64 *data)\n \t\t\tew32(IMC, mask);\n \t\t\tew32(ICS, mask);\n \t\t\te1e_flush();\n-\t\t\tusleep_range(10000, 20000);\n+\t\t\tusleep_range(10000, 11000);\n \n \t\t\tif (adapter->test_icr & mask) {\n \t\t\t\t*data = 3;\n@@ -1064,7 +1064,7 @@ static int e1000_intr_test(struct e1000_adapter *adapter, u64 *data)\n \t\tew32(IMS, mask);\n \t\tew32(ICS, mask);\n \t\te1e_flush();\n-\t\tusleep_range(10000, 20000);\n+\t\tusleep_range(10000, 11000);\n \n \t\tif (!(adapter->test_icr & mask)) {\n \t\t\t*data = 4;\n@@ -1082,7 +1082,7 @@ static int e1000_intr_test(struct e1000_adapter *adapter, u64 *data)\n \t\t\tew32(IMC, ~mask & 0x00007FFF);\n \t\t\tew32(ICS, ~mask & 0x00007FFF);\n \t\t\te1e_flush();\n-\t\t\tusleep_range(10000, 20000);\n+\t\t\tusleep_range(10000, 11000);\n \n \t\t\tif (adapter->test_icr) {\n \t\t\t\t*data = 5;\n@@ -1094,7 +1094,7 @@ static int e1000_intr_test(struct e1000_adapter *adapter, u64 *data)\n \t/* Disable all the interrupts */\n \tew32(IMC, 0xFFFFFFFF);\n \te1e_flush();\n-\tusleep_range(10000, 20000);\n+\tusleep_range(10000, 11000);\n \n \t/* Unhook test interrupt handler */\n \tfree_irq(irq, netdev);\n@@ -1470,7 +1470,7 @@ static int e1000_set_82571_fiber_loopback(struct e1000_adapter *adapter)\n \t */\n \tew32(SCTL, E1000_SCTL_ENABLE_SERDES_LOOPBACK);\n \te1e_flush();\n-\tusleep_range(10000, 20000);\n+\tusleep_range(10000, 11000);\n \n \treturn 0;\n }\n@@ -1584,7 +1584,7 @@ static void e1000_loopback_cleanup(struct e1000_adapter *adapter)\n \t\t hw->phy.media_type == e1000_media_type_internal_serdes) {\n \t\t\tew32(SCTL, E1000_SCTL_DISABLE_SERDES_LOOPBACK);\n \t\t\te1e_flush();\n-\t\t\tusleep_range(10000, 20000);\n+\t\t\tusleep_range(10000, 11000);\n \t\t\tbreak;\n \t\t}\n \t\t/* Fall Through */\ndiff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c\nindex cdae0efde8e6..395b05701480 100644\n--- a/drivers/net/ethernet/intel/e1000e/ich8lan.c\n+++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c\n@@ -271,7 +271,7 @@ static void e1000_toggle_lanphypc_pch_lpt(struct e1000_hw *hw)\n \t\tu16 count = 20;\n \n \t\tdo {\n-\t\t\tusleep_range(5000, 10000);\n+\t\t\tusleep_range(5000, 6000);\n \t\t} while (!(er32(CTRL_EXT) & E1000_CTRL_EXT_LPCD) && count--);\n \n \t\tmsleep(30);\n@@ -405,7 +405,7 @@ static s32 e1000_init_phy_workarounds_pchlan(struct e1000_hw *hw)\n \t/* Ungate automatic PHY configuration on non-managed 82579 */\n \tif ((hw->mac.type == e1000_pch2lan) &&\n \t !(fwsm & E1000_ICH_FWSM_FW_VALID)) {\n-\t\tusleep_range(10000, 20000);\n+\t\tusleep_range(10000, 11000);\n \t\te1000_gate_hw_phy_config_ich8lan(hw, false);\n \t}\n \n@@ -531,7 +531,7 @@ static s32 e1000_init_phy_params_ich8lan(struct e1000_hw *hw)\n \tphy->id = 0;\n \twhile ((e1000_phy_unknown == e1000e_get_phy_type_from_id(phy->id)) &&\n \t (i++ < 100)) {\n-\t\tusleep_range(1000, 2000);\n+\t\tusleep_range(1000, 1100);\n \t\tret_val = e1000e_get_phy_id(hw);\n \t\tif (ret_val)\n \t\t\treturn ret_val;\n@@ -1244,7 +1244,7 @@ static s32 e1000_disable_ulp_lpt_lp(struct e1000_hw *hw, bool force)\n \t\t\t\tgoto out;\n \t\t\t}\n \n-\t\t\tusleep_range(10000, 20000);\n+\t\t\tusleep_range(10000, 11000);\n \t\t}\n \t\te_dbg(\"ULP_CONFIG_DONE cleared after %dmsec\\n\", i * 10);\n \n@@ -1999,7 +1999,7 @@ static s32 e1000_check_reset_block_ich8lan(struct e1000_hw *hw)\n \n \twhile ((blocked = !(er32(FWSM) & E1000_ICH_FWSM_RSPCIPHY)) &&\n \t (i++ < 30))\n-\t\tusleep_range(10000, 20000);\n+\t\tusleep_range(10000, 11000);\n \treturn blocked ? E1000_BLK_PHY_RESET : 0;\n }\n \n@@ -2818,7 +2818,7 @@ static s32 e1000_post_phy_reset_ich8lan(struct e1000_hw *hw)\n \t\treturn 0;\n \n \t/* Allow time for h/w to get to quiescent state after reset */\n-\tusleep_range(10000, 20000);\n+\tusleep_range(10000, 11000);\n \n \t/* Perform any necessary post-reset workarounds */\n \tswitch (hw->mac.type) {\n@@ -2854,7 +2854,7 @@ static s32 e1000_post_phy_reset_ich8lan(struct e1000_hw *hw)\n \tif (hw->mac.type == e1000_pch2lan) {\n \t\t/* Ungate automatic PHY configuration on non-managed 82579 */\n \t\tif (!(er32(FWSM) & E1000_ICH_FWSM_FW_VALID)) {\n-\t\t\tusleep_range(10000, 20000);\n+\t\t\tusleep_range(10000, 11000);\n \t\t\te1000_gate_hw_phy_config_ich8lan(hw, false);\n \t\t}\n \n@@ -3875,7 +3875,7 @@ static s32 e1000_update_nvm_checksum_spt(struct e1000_hw *hw)\n \t */\n \tif (!ret_val) {\n \t\tnvm->ops.reload(hw);\n-\t\tusleep_range(10000, 20000);\n+\t\tusleep_range(10000, 11000);\n \t}\n \n out:\n@@ -4026,7 +4026,7 @@ static s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw)\n \t */\n \tif (!ret_val) {\n \t\tnvm->ops.reload(hw);\n-\t\tusleep_range(10000, 20000);\n+\t\tusleep_range(10000, 11000);\n \t}\n \n out:\n@@ -4650,7 +4650,7 @@ static s32 e1000_reset_hw_ich8lan(struct e1000_hw *hw)\n \tew32(TCTL, E1000_TCTL_PSP);\n \te1e_flush();\n \n-\tusleep_range(10000, 20000);\n+\tusleep_range(10000, 11000);\n \n \t/* Workaround for ICH8 bit corruption issue in FIFO memory */\n \tif (hw->mac.type == e1000_ich8lan) {\ndiff --git a/drivers/net/ethernet/intel/e1000e/mac.c b/drivers/net/ethernet/intel/e1000e/mac.c\nindex 4abd55d646c5..e531976f8a67 100644\n--- a/drivers/net/ethernet/intel/e1000e/mac.c\n+++ b/drivers/net/ethernet/intel/e1000e/mac.c\n@@ -797,7 +797,7 @@ static s32 e1000_poll_fiber_serdes_link_generic(struct e1000_hw *hw)\n \t * milliseconds even if the other end is doing it in SW).\n \t */\n \tfor (i = 0; i < FIBER_LINK_UP_LIMIT; i++) {\n-\t\tusleep_range(10000, 20000);\n+\t\tusleep_range(10000, 11000);\n \t\tstatus = er32(STATUS);\n \t\tif (status & E1000_STATUS_LU)\n \t\t\tbreak;\ndiff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c\nindex 298e03e213be..bc743d77f20a 100644\n--- a/drivers/net/ethernet/intel/e1000e/netdev.c\n+++ b/drivers/net/ethernet/intel/e1000e/netdev.c\n@@ -3208,7 +3208,7 @@ static void e1000_configure_rx(struct e1000_adapter *adapter)\n \tif (!(adapter->flags2 & FLAG2_NO_DISABLE_RX))\n \t\tew32(RCTL, rctl & ~E1000_RCTL_EN);\n \te1e_flush();\n-\tusleep_range(10000, 20000);\n+\tusleep_range(10000, 11000);\n \n \tif (adapter->flags2 & FLAG2_DMA_BURST) {\n \t\t/* set the writeback threshold (only takes effect if the RDTR\n@@ -4272,7 +4272,7 @@ void e1000e_down(struct e1000_adapter *adapter, bool reset)\n \n \t/* flush both disables and wait for them to finish */\n \te1e_flush();\n-\tusleep_range(10000, 20000);\n+\tusleep_range(10000, 11000);\n \n \te1000_irq_disable(adapter);\n \n@@ -4310,7 +4310,7 @@ void e1000e_reinit_locked(struct e1000_adapter *adapter)\n {\n \tmight_sleep();\n \twhile (test_and_set_bit(__E1000_RESETTING, &adapter->state))\n-\t\tusleep_range(1000, 2000);\n+\t\tusleep_range(1000, 1100);\n \te1000e_down(adapter, true);\n \te1000e_up(adapter);\n \tclear_bit(__E1000_RESETTING, &adapter->state);\n@@ -4707,7 +4707,7 @@ int e1000e_close(struct net_device *netdev)\n \tint count = E1000_CHECK_RESET_COUNT;\n \n \twhile (test_bit(__E1000_RESETTING, &adapter->state) && count--)\n-\t\tusleep_range(10000, 20000);\n+\t\tusleep_range(10000, 11000);\n \n \tWARN_ON(test_bit(__E1000_RESETTING, &adapter->state));\n \n@@ -6037,7 +6037,7 @@ static int e1000_change_mtu(struct net_device *netdev, int new_mtu)\n \t}\n \n \twhile (test_and_set_bit(__E1000_RESETTING, &adapter->state))\n-\t\tusleep_range(1000, 2000);\n+\t\tusleep_range(1000, 1100);\n \t/* e1000e_down -> e1000e_reset dependent on max_frame_size & mtu */\n \tadapter->max_frame_size = max_frame;\n \te_info(\"changing MTU from %d to %d\\n\", netdev->mtu, new_mtu);\n@@ -6317,7 +6317,7 @@ static int e1000e_pm_freeze(struct device *dev)\n \t\tint count = E1000_CHECK_RESET_COUNT;\n \n \t\twhile (test_bit(__E1000_RESETTING, &adapter->state) && count--)\n-\t\t\tusleep_range(10000, 20000);\n+\t\t\tusleep_range(10000, 11000);\n \n \t\tWARN_ON(test_bit(__E1000_RESETTING, &adapter->state));\n \n@@ -6732,7 +6732,7 @@ static int e1000e_pm_runtime_suspend(struct device *dev)\n \t\tint count = E1000_CHECK_RESET_COUNT;\n \n \t\twhile (test_bit(__E1000_RESETTING, &adapter->state) && count--)\n-\t\t\tusleep_range(10000, 20000);\n+\t\t\tusleep_range(10000, 11000);\n \n \t\tWARN_ON(test_bit(__E1000_RESETTING, &adapter->state));\n \ndiff --git a/drivers/net/ethernet/intel/e1000e/nvm.c b/drivers/net/ethernet/intel/e1000e/nvm.c\nindex 937f9af22d26..e609f4df86f4 100644\n--- a/drivers/net/ethernet/intel/e1000e/nvm.c\n+++ b/drivers/net/ethernet/intel/e1000e/nvm.c\n@@ -392,7 +392,7 @@ s32 e1000e_write_nvm_spi(struct e1000_hw *hw, u16 offset, u16 words, u16 *data)\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n-\t\tusleep_range(10000, 20000);\n+\t\tusleep_range(10000, 11000);\n \t\tnvm->ops.release(hw);\n \t}\n \n", "prefixes": [ "next", "v2" ] }