From patchwork Tue Dec 1 01:22:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Yu X-Patchwork-Id: 11941739 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ADC3DC71155 for ; Tue, 1 Dec 2020 01:20:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7985021973 for ; Tue, 1 Dec 2020 01:20:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389236AbgLABUJ (ORCPT ); Mon, 30 Nov 2020 20:20:09 -0500 Received: from mga04.intel.com ([192.55.52.120]:22830 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728932AbgLABUJ (ORCPT ); Mon, 30 Nov 2020 20:20:09 -0500 IronPort-SDR: GC6mnQRZdXI+SwddVEKYduUN/aFSyKe3GbfPi/J27nGV4pLsUP+Bf3KMvcDSmBJT34qC8SSWcE 8t9PAtp8f++A== X-IronPort-AV: E=McAfee;i="6000,8403,9821"; a="170177455" X-IronPort-AV: E=Sophos;i="5.78,382,1599548400"; d="scan'208";a="170177455" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2020 17:19:28 -0800 IronPort-SDR: 0mj4k8xHOEc7kaYnDBIfwvuFreMJRA6EqTktv3jNhc8ZMeQ+ltM69Kba3vm4JjIj/2xahgAlIw XUKCNkJi/79Q== X-IronPort-AV: E=Sophos;i="5.78,382,1599548400"; d="scan'208";a="314771314" Received: from chenyu-office.sh.intel.com ([10.239.158.173]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2020 17:19:24 -0800 From: Chen Yu To: Jesse Brandeburg , Tony Nguyen , Jakub Kicinski , Kai-Heng Feng , Paul Menzel Cc: "David S. Miller" , "Rafael J. Wysocki" , Len Brown , "Neftin, Sasha" , "Kirsher, Jeffrey T" , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "Brandt, Todd E" , Chen Yu Subject: [PATCH 2/2][v3] e1000e: Remove the runtime suspend restriction on CNP+ Date: Tue, 1 Dec 2020 09:22:09 +0800 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Although there is platform issue of runtime suspend support on CNP, it would be more flexible to let the user decide whether to disable runtime or not because: 1. This can be done in userspace via echo on > /sys/devices/pci0000\:00/0000\:00\:1f.d/power/control 2. More and more NICs would support runtime suspend, disabling the runtime suspend on them by default would impact the validation. Only disable runtime suspend on CNP in case of any user space regression. Signed-off-by: Chen Yu --- 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 b210bba3f20a..d06435267dc8 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c @@ -7674,7 +7674,7 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent) dev_pm_set_driver_flags(&pdev->dev, DPM_FLAG_SMART_PREPARE); - if (pci_dev_run_wake(pdev) && hw->mac.type < e1000_pch_cnp) + if (pci_dev_run_wake(pdev) && hw->mac.type != e1000_pch_cnp) pm_runtime_put_noidle(&pdev->dev); return 0;