From patchwork Tue Nov 7 22:13:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matt Turner X-Patchwork-Id: 835843 X-Patchwork-Delegate: jeffrey.t.kirsher@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=osuosl.org (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="jpXA+PyM"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yX8MW4l7lz9s5L for ; Thu, 9 Nov 2017 01:49:27 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id A33DA257B1; Wed, 8 Nov 2017 14:49:25 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 68LZlwlLZGMU; Wed, 8 Nov 2017 14:49:22 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 95B8E230F6; Wed, 8 Nov 2017 14:49:22 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 2B8FC1C02F3 for ; Tue, 7 Nov 2017 22:13:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 1E2ED8296A for ; Tue, 7 Nov 2017 22:13:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dWnwYzA5YmTR for ; Tue, 7 Nov 2017 22:13:42 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pg0-f68.google.com (mail-pg0-f68.google.com [74.125.83.68]) by whitealder.osuosl.org (Postfix) with ESMTPS id 8476A8288A for ; Tue, 7 Nov 2017 22:13:42 +0000 (UTC) Received: by mail-pg0-f68.google.com with SMTP id s2so559107pge.10 for ; Tue, 07 Nov 2017 14:13:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=yHz8hgfvK5QobDw8MMRzA5sdCgJ7dwazTK+WL1gh9ko=; b=jpXA+PyMq0C9Ob3H6ImgDA9jtfI8k+Exmw+mDGwyVT9yKoP5sHUkF3dHMKM4azLru8 9oWX7pTwG0QHgLDTGb9vQ3jsVbK6vqORCSss5vLh2wf9A+e5NK/v2Au744wHOKyOhDq+ t11IqMymFm8YrBU9j8IxtT5tOnyWlfwRRhtMyVj0k/kzJFJy+yFGjAPeHCHMjKs9bFfi H7jPbZaP1SR9E3iyKoC/KPvFHFbCkx7zGaAKVaA8SASSccqzxh0FkgO2DDCYP+ActL5+ ap3lL/DNIKe46XfN68+051vKs9kvyGzLdxiT1JvJF12LJLyzFI1MWQqPfxrt8n//yTRb 5+HQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=yHz8hgfvK5QobDw8MMRzA5sdCgJ7dwazTK+WL1gh9ko=; b=Kake6wKqot83dWVcRKd09YXQrFQZpzW49xTCrFScB+0wc64+vKPqGvIEcWQwzRBiac rmj1toT/iJ8S9iPJg8/DcQViceI0e9JNcXSsypvCPagLD96q8/7JiaaNBjgaZCL5CVX3 3ePTr/s6dRdwMDVZpQTGva1PDivc4+c93/BYUdLEmqVCD/69sST/2pPvQZAwxcsm4IaM 3YIjmbCg9fhaOAfOcPQbaKW3dkwMJwxF3vbJ/wLMHbwZFxVpCclXvzuU5GRnbiyi3A5S +5gpFuUsyNfeOFPZqsPIgkI1dO3n7rV/yndB5KGNDYn3hcrtpkmfPONmAhZwqwEbY5GS WD0w== X-Gm-Message-State: AJaThX6BNSU/jWX0/5PuZ8wvyJEZL4eMvpR+vb9UcrOz3E3bTooGfVSs 2YozZgM8EpTbHJ3n9943GJS1MR4S X-Google-Smtp-Source: ABhQp+SuSO1qdOixIuObbnRj9ivoddQQ6oUneakgEqPVkphHT5/P4XgjIffUXuczPH8P5ARoV0K9dQ== X-Received: by 10.98.89.82 with SMTP id n79mr212762pfb.133.1510092821886; Tue, 07 Nov 2017 14:13:41 -0800 (PST) Received: from localhost ([108.161.26.224]) by smtp.gmail.com with ESMTPSA id m195sm4474297pga.13.2017.11.07.14.13.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Nov 2017 14:13:38 -0800 (PST) From: Matt Turner To: intel-wired-lan@lists.osuosl.org Date: Tue, 7 Nov 2017 14:13:30 -0800 Message-Id: <20171107221332.28283-1-mattst88@gmail.com> X-Mailer: git-send-email 2.13.6 MIME-Version: 1.0 X-Mailman-Approved-At: Wed, 08 Nov 2017 14:49:21 +0000 Subject: [Intel-wired-lan] [PATCH 1/3] e1000e: Set HTHRESH when PTHRESH is used X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Matt Turner Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" From: Matt Turner According to section 12.0.3.4.13 "Receive Descriptor Control - RXDCTL" of the IntelĀ® 82579 Gigabit Ethernet PHY Datasheet v2.1: "HTHRESH should be given a non zero value when ever PTHRESH is used." In RXDCTL(0), PTHRESH lives at bits 5:0, and HTHREST lives at bits 13:8. Set only bit 8 of HTHREST as is done in e1000_flush_rx_ring(). Found by inspection. Signed-off-by: Matt Turner Tested-by: Aaron Brown --- drivers/net/ethernet/intel/e1000e/netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index 2dcb5463d9b8..286d0277284e 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c @@ -3285,7 +3285,7 @@ static void e1000_configure_rx(struct e1000_adapter *adapter) if (adapter->flags & FLAG_IS_ICH) { u32 rxdctl = er32(RXDCTL(0)); - ew32(RXDCTL(0), rxdctl | 0x3); + ew32(RXDCTL(0), rxdctl | 0x3 | BIT(8)); } pm_qos_update_request(&adapter->pm_qos_req, lat); From patchwork Tue Nov 7 22:13:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Turner X-Patchwork-Id: 835842 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=osuosl.org (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="dWS7X8vh"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yX8MW3klLz9s4q for ; Thu, 9 Nov 2017 01:49:25 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 8F5D88402F; Wed, 8 Nov 2017 14:49:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id s_V0i-q-HT2V; Wed, 8 Nov 2017 14:49:22 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id E3ACF83EF8; Wed, 8 Nov 2017 14:49:22 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 84D271C02F3 for ; Tue, 7 Nov 2017 22:13:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 78B992DB8E for ; Tue, 7 Nov 2017 22:13:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VeFGhTmUGNjw for ; Tue, 7 Nov 2017 22:13:43 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pg0-f66.google.com (mail-pg0-f66.google.com [74.125.83.66]) by silver.osuosl.org (Postfix) with ESMTPS id DB2882CFDE for ; Tue, 7 Nov 2017 22:13:43 +0000 (UTC) Received: by mail-pg0-f66.google.com with SMTP id b192so577827pga.2 for ; Tue, 07 Nov 2017 14:13:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=8K7bQBUMLIXg7n2KN+NIv2SyoHJT2KNLGshavZtwuv0=; b=dWS7X8vhMprnuPPtM9vV/WfPfp1kFADFNYqFwl3WSCr2CpRP5tb11R5KrkXNfm4rLA fWUqOyU4nRluAqxACgQVaYvcF74558h4KagD9ooRlb8N8e/cuIQFgFTQ1P0SrRhVqdxI 32530Bmntmip25J0Z0+gsRJNGRv7TYFSq4bxJRVxU5IkF9Fy0SLDZ6rBb4FlmIWQrvXF yJqsf4wQHT9Jb0fwdRCK0bfY5SdunmeCNAlucWNcw64+GGOojv2CZmMLO/X1GDxqAEDH RwQcmzFsu9bY66HUccIyvpAB0k668SEs76TLc5jL7kflNrXM/0lUIfoRfvwvr4vzRcIw 253g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=8K7bQBUMLIXg7n2KN+NIv2SyoHJT2KNLGshavZtwuv0=; b=iiQAfRhEypBD73UC5SdO5b4V1wSasQfK7LefJmu66yEZtzIJrDg6UjFA3eTyAC3BUU 7DssDdpe19lbYrv2Uy6q8Ex7qZjYkWchMAIYdBUlsRfPNiVuHnt6rWiZ9dqPua1Mjf4A o0XcfI8F4CCgiY3bg4OHyLJvmQMh00uFqq1opv6a9PscI5D2HfusBIoXyG+IJ6l0npQU aMugTu2E3ThqzdZc2CLHW8RWiD6QAu7A+dqYFmLQ+OXQrrroaDfyyRDsWDponeJOZV4n oOVKyyIuPen8NO1CArqLuFEeGNsEtkrM9SsrFX3yzUMe7+aTKB7JcOv4Y5ViHaqQTy+d p+JQ== X-Gm-Message-State: AJaThX5wuBB1r+qaCZuBVJ7nJ0JIjnlwgQRVd8DrXn3x+HH8Ckk4UjWL /+vf4fkytjjne9D3TYjqUKZB8QsB X-Google-Smtp-Source: ABhQp+Q8hLLdKC8gysxm5OKPlHmcV1H1PbeqJ+XNxDl4SP2jtdH1HEM1RqcaDD4N4rTfwtB+AOV/fQ== X-Received: by 10.101.77.210 with SMTP id q18mr193609pgt.95.1510092823237; Tue, 07 Nov 2017 14:13:43 -0800 (PST) Received: from localhost ([108.161.26.224]) by smtp.gmail.com with ESMTPSA id a70sm4433080pfa.94.2017.11.07.14.13.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Nov 2017 14:13:42 -0800 (PST) From: Matt Turner To: intel-wired-lan@lists.osuosl.org Date: Tue, 7 Nov 2017 14:13:31 -0800 Message-Id: <20171107221332.28283-2-mattst88@gmail.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171107221332.28283-1-mattst88@gmail.com> References: <20171107221332.28283-1-mattst88@gmail.com> X-Mailman-Approved-At: Wed, 08 Nov 2017 14:49:21 +0000 Subject: [Intel-wired-lan] [PATCH 2/3] e1000e: Alert the user that C-states will be disabled by enabling jumbo frames X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Matt Turner MIME-Version: 1.0 Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" From: Matt Turner I personally spent a long time trying to decypher why my CPU would not reach deeper C-states. Let's just tell the next user what's going on. Signed-off-by: Matt Turner --- drivers/net/ethernet/intel/e1000e/netdev.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index 286d0277284e..4dcff481c4b4 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c @@ -3288,6 +3288,9 @@ static void e1000_configure_rx(struct e1000_adapter *adapter) ew32(RXDCTL(0), rxdctl | 0x3 | BIT(8)); } + dev_info(&adapter->pdev->dev, + "Some CPU C-states have been disabled in order to " + "enable jumbo frames\n"); pm_qos_update_request(&adapter->pm_qos_req, lat); } else { pm_qos_update_request(&adapter->pm_qos_req, From patchwork Tue Nov 7 22:13:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Turner X-Patchwork-Id: 835841 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=osuosl.org (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="MPdWCpLZ"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yX8MW4l6dz9s4s for ; Thu, 9 Nov 2017 01:49:27 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id B8D37230F6; Wed, 8 Nov 2017 14:49:25 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5veAAK0lxsqL; Wed, 8 Nov 2017 14:49:24 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 35B8124527; Wed, 8 Nov 2017 14:49:23 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 1C9821C02F3 for ; Tue, 7 Nov 2017 22:13:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 132A18874B for ; Tue, 7 Nov 2017 22:13:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3j8rCLPwwtri for ; Tue, 7 Nov 2017 22:13:45 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pg0-f68.google.com (mail-pg0-f68.google.com [74.125.83.68]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 4F10181FD4 for ; Tue, 7 Nov 2017 22:13:45 +0000 (UTC) Received: by mail-pg0-f68.google.com with SMTP id m18so552724pgd.13 for ; Tue, 07 Nov 2017 14:13:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=UHH5KlNGm43vo3oxsanIEAH1mHxAmXj7Ws/et6IUT38=; b=MPdWCpLZVaEL/w4n9IJbG49x1vDNMd6urPDRk+m3RzCr2u3GE5z4Q/tcoYgzyOvbd/ Y0LsnWKJ0sRCX94VnE8o+gdPPcxtI8QxtwBKaJ8sngSifcOH9IvDZTpZSzonDEC1JJZJ N3nqgianCVD1mRtkLDrN9kuoj1NAGWuFFBtnE2QFkajCtXQHo8n//wokVqbE177zb4ah evPnrgaHVNrYbarkR3pyPTMqNbRuFg9znjs979Z8Y18rUM++3hrjY8j0R25Mp117C8jt cBtVITyugBS00Fbh7w5pCcBYD0Jk12qm/jg0+dUf37dIfgRuvXh7VbzawnRXjvEFvKlJ vt/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=UHH5KlNGm43vo3oxsanIEAH1mHxAmXj7Ws/et6IUT38=; b=CpCts3ksxHtoSCsRDtHmZn3WZty1c0A3v5EBagXdSOxnTX5d+tn9cR/NMrSfL6HS6w nbAEXYBepmFGbBZgGtO8zd1egaE5vvwsBC171HuJO2mj+l+PYlWH27A+8yh37nurITJK CdE9Khi0si+Akt9EDTAXCB8UmDzMBf5gMOzmNEj4jB9RHx4zUpSd6Fn9C3xazXipX27v O5CbllIHbzD2RJzVWSr9dc16BmtvMXPfKF6ouT8KI8Tdy7ulOpKmdWFO+1C7G92Gagla ATKBnkFpC8Znbz/M9UgSAqu7f6F+GXgaCt/uHZGl+DvTOM6YGnZr8VUyiUV5alud1Vbz Y+Og== X-Gm-Message-State: AJaThX6q/zYcu0iXgo6O0jIqlCy5Z7ShgxomckLdMQ89WZuOa2XVtszV a1t4xMc/krMYDhXbfTAeaRRRXBHR X-Google-Smtp-Source: ABhQp+RkcmVcPAc4OyumKLugR4bHCcyf3PduEpF00NzOMQHbUk7zTrrq61Xw3JiSbY+iHNunvBJCdw== X-Received: by 10.159.253.147 with SMTP id q19mr220241pls.54.1510092824597; Tue, 07 Nov 2017 14:13:44 -0800 (PST) Received: from localhost ([108.161.26.224]) by smtp.gmail.com with ESMTPSA id 22sm4734710pfn.24.2017.11.07.14.13.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Nov 2017 14:13:43 -0800 (PST) From: Matt Turner To: intel-wired-lan@lists.osuosl.org Date: Tue, 7 Nov 2017 14:13:32 -0800 Message-Id: <20171107221332.28283-3-mattst88@gmail.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171107221332.28283-1-mattst88@gmail.com> References: <20171107221332.28283-1-mattst88@gmail.com> X-Mailman-Approved-At: Wed, 08 Nov 2017 14:49:21 +0000 Subject: [Intel-wired-lan] [PATCH 3/3] e1000e: Disable jumbo receive workaround on Lynx Point and newer X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Matt Turner MIME-Version: 1.0 Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" From: Matt Turner Commit 3e35d9918cbb ("e1000e: adjust PM QoS request") expanded the application of what is evidently a hardware workaround to apply to all e1000e devices. Prior to the commit, it applied only to e1000_pch2lan (Sandy Bridge era) and the commit message notes that other earlier parts such as ICH9 and ICH10 suffer from the problem as well. The workaround works by preventing the CPU from entering deep sleep states, which increases energy consumption significantly. My Skylake CPU reaches the C10 state the PC8 package state with the MTU for its I219-LM set to 1500. At an MTU of 9000, it can only reach the C1E state and no low power package state at all. With this patch, the CPU again reaches the C10 state and (only) the PC2 package state. Not ideal, but an improvement nonetheless. Signed-off-by: Matt Turner --- This patch is speculative -- I'm an Intel employee (not in the networking division), but I have no idea where to find documentation about the hardware bug in question. I'm hoping that someone more in the know can check if the hardware was fixed in subsequent generations and this workaround can be disabled. I have chosen the pch2 cut off only because nothing further is mentioned about the bug in git history. drivers/net/ethernet/intel/e1000e/netdev.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index 4dcff481c4b4..553f8bd45eea 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c @@ -3277,7 +3277,8 @@ static void e1000_configure_rx(struct e1000_adapter *adapter) /* With jumbo frames, excessive C-state transition latencies result * in dropped transactions. */ - if (adapter->netdev->mtu > ETH_DATA_LEN) { + if (adapter->hw.mac.type <= e1000_pch2lan && + adapter->netdev->mtu > ETH_DATA_LEN) { u32 lat = ((er32(PBA) & E1000_PBA_RXA_MASK) * 1024 - adapter->max_frame_size) * 8 / 1000; @@ -3292,9 +3293,6 @@ static void e1000_configure_rx(struct e1000_adapter *adapter) "Some CPU C-states have been disabled in order to " "enable jumbo frames\n"); pm_qos_update_request(&adapter->pm_qos_req, lat); - } else { - pm_qos_update_request(&adapter->pm_qos_req, - PM_QOS_DEFAULT_VALUE); } /* Enable Receives */ @@ -4625,8 +4623,9 @@ int e1000e_open(struct net_device *netdev) e1000_update_mng_vlan(adapter); /* DMA latency requirement to workaround jumbo issue */ - pm_qos_add_request(&adapter->pm_qos_req, PM_QOS_CPU_DMA_LATENCY, - PM_QOS_DEFAULT_VALUE); + if (adapter->hw.mac.type <= e1000_pch2lan) + pm_qos_add_request(&adapter->pm_qos_req, PM_QOS_CPU_DMA_LATENCY, + PM_QOS_DEFAULT_VALUE); /* before we allocate an interrupt, we must be ready to handle it. * Setting DEBUG_SHIRQ in the kernel makes it fire an interrupt @@ -4669,7 +4668,8 @@ int e1000e_open(struct net_device *netdev) return 0; err_req_irq: - pm_qos_remove_request(&adapter->pm_qos_req); + if (adapter->hw.mac.type <= e1000_pch2lan) + pm_qos_remove_request(&adapter->pm_qos_req); e1000e_release_hw_control(adapter); e1000_power_down_phy(adapter); e1000e_free_rx_resources(adapter->rx_ring); @@ -4733,7 +4733,8 @@ int e1000e_close(struct net_device *netdev) !test_bit(__E1000_TESTING, &adapter->state)) e1000e_release_hw_control(adapter); - pm_qos_remove_request(&adapter->pm_qos_req); + if (adapter->hw.mac.type <= e1000_pch2lan) + pm_qos_remove_request(&adapter->pm_qos_req); pm_runtime_put_sync(&pdev->dev);