From mboxrd@z Thu Jan 1 00:00:00 1970 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=-12.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 817C8C388F9 for ; Wed, 11 Nov 2020 05:49:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2FE332220B for ; Wed, 11 Nov 2020 05:49:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726004AbgKKFto (ORCPT ); Wed, 11 Nov 2020 00:49:44 -0500 Received: from mga14.intel.com ([192.55.52.115]:60892 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725959AbgKKFtn (ORCPT ); Wed, 11 Nov 2020 00:49:43 -0500 IronPort-SDR: wxDOy10vg5XKZsj3fvB0KHbfJEhF5S3PKzIL3AYbUwEO9636maCJ4eG2z9bFtzPywiv4XTLgpK 4eMcX5NVAb0g== X-IronPort-AV: E=McAfee;i="6000,8403,9801"; a="169314878" X-IronPort-AV: E=Sophos;i="5.77,468,1596524400"; d="scan'208";a="169314878" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Nov 2020 21:49:42 -0800 IronPort-SDR: EFXgvL/vAHXVTKliiw1HruU9JpJ8S27UtCWTJV+oO6JxtDhNUxMZD+lgUSNc3L01R8rUrqUtvT dyKj0eSi6S+A== X-IronPort-AV: E=Sophos;i="5.77,468,1596524400"; d="scan'208";a="308336506" 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; 10 Nov 2020 21:49:39 -0800 From: Chen Yu To: intel-wired-lan@lists.osuosl.org Cc: "Neftin, Sasha" , Len Brown , "Rafael J. Wysocki" , "Brandt, Todd E" , Zhang Rui , Tony Nguyen , Jesse Brandeburg , linux-kernel@vger.kernel.org, Chen Yu Subject: [PATCH 4/4][RFC] e1000e: Disable the power management if hardware error detected during resume Date: Wed, 11 Nov 2020 13:52:07 +0800 Message-Id: <7eb46aa2f49f6c7a2ff0d6cc65ad4195781ae960.1605073208.git.yu.c.chen@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If the hardware error is detected during resume, the NIC might be in a unstable status and blocks the subsequent suspend afterwards. A broken device is not expected to impact the system wide suspend, and this patch disable the power management support of this NIC. So that the borken NIC will not be considered during suspend/resume, thus not to prevent the system from suspend/resume. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=205015 Reported-by: "Brandt, Todd E" Reported-by: Len Brown Signed-off-by: Chen Yu --- drivers/net/ethernet/intel/e1000e/netdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index 45e0b1901440..08bc544e879a 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c @@ -6959,7 +6959,8 @@ static int __e1000_resume(struct pci_dev *pdev) ew32(WUS, ~0); } - e1000e_reset(adapter); + if (_e1000e_reset(adapter)) + schedule_work(&adapter->pm_remove_task); e1000_init_manageability_pt(adapter); -- 2.17.1 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chen Yu Date: Wed, 11 Nov 2020 13:52:07 +0800 Subject: [Intel-wired-lan] [PATCH 4/4][RFC] e1000e: Disable the power management if hardware error detected during resume In-Reply-To: References: Message-ID: <7eb46aa2f49f6c7a2ff0d6cc65ad4195781ae960.1605073208.git.yu.c.chen@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: intel-wired-lan@osuosl.org List-ID: If the hardware error is detected during resume, the NIC might be in a unstable status and blocks the subsequent suspend afterwards. A broken device is not expected to impact the system wide suspend, and this patch disable the power management support of this NIC. So that the borken NIC will not be considered during suspend/resume, thus not to prevent the system from suspend/resume. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=205015 Reported-by: "Brandt, Todd E" Reported-by: Len Brown Signed-off-by: Chen Yu --- drivers/net/ethernet/intel/e1000e/netdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index 45e0b1901440..08bc544e879a 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c @@ -6959,7 +6959,8 @@ static int __e1000_resume(struct pci_dev *pdev) ew32(WUS, ~0); } - e1000e_reset(adapter); + if (_e1000e_reset(adapter)) + schedule_work(&adapter->pm_remove_task); e1000_init_manageability_pt(adapter); -- 2.17.1