Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1370886yba; Tue, 2 Apr 2019 07:41:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqwj7JJGsgsJQQ/YLfWRre+TWRDsUXLJL26AaH9XbW1rnNtYEBP9LqHkTc56ttcHDkHJMpkU X-Received: by 2002:a65:6091:: with SMTP id t17mr66612552pgu.328.1554216087906; Tue, 02 Apr 2019 07:41:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554216087; cv=none; d=google.com; s=arc-20160816; b=knW93eS7Ax6bzcpmTK+8BUp1gWyWeFBMvlHjWbfhlU4BOUvHg96Pf+Vpfj+gjSDZF1 cVn8qog4hnsuEgAj5wBV3Zx5eEL9btuYUB/Wrqcqr88z79fl41ztbrfq4ZEQhzK0fk5L YxS632imk+RFPe/YIJpihtSRpfzENKl/53BMuFhcVYhEr1Ziu1+je7w7B7RQmEEVc7el qxyRk4BjVZ6czPYZdh2er/D4ahfxztLOaUgjJJwwpr6wmIR4Xyz8FWMoV2uf6SkuQAYC OgNgxrjaBOfRJqk0OMQnu46tcSEc1guraP83zxIayaNFsaFhC7NX2i/grSK9PwYF5CxP kTBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=eEu0mmQUMMuqfSZDBW1ulDmNHFzkoxfh3Ou6OTkgt2c=; b=ZSiSgpNKpGf8rr86X99J/SFtI1EDB3KAc1Ba/cw0ZAcqN24fDZLBuivcrxZd2TRe8N SobO48WzHLDZxeTgZ7er5TA8EAPX4Ll9TGMw20f9LKtlREkXbXW4Aa7oDVGGqXKqjZ6K wc3SeB6qnh+d9X50UDBELclDdGr1Yn2ZU1oeQbXDXAvfCiiqhxYXwBsonV8GN42GVy3/ pHyJo9zbBn7mQdq4gXdN+pxBX8ynfbA7cp+k5dOtSZyctisfiPPwdl/+7zvYK/wlDrgz 91eEP7JKfWUa41r87NBhE2SYzrg6pj/+Lcj1Oo0MWvcXdJd/slLaQc03FkSxzUDAHhpB 2/Fg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z8si11174598pgh.82.2019.04.02.07.41.12; Tue, 02 Apr 2019 07:41:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731636AbfDBNk0 (ORCPT + 99 others); Tue, 2 Apr 2019 09:40:26 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:43352 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731460AbfDBNkH (ORCPT ); Tue, 2 Apr 2019 09:40:07 -0400 Received: from [167.98.27.226] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hBJe0-0002oa-I1; Tue, 02 Apr 2019 14:40:04 +0100 Received: from ben by deadeye with local (Exim 4.92) (envelope-from ) id 1hBJdx-0004wA-BH; Tue, 02 Apr 2019 14:40:01 +0100 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, Denis Kirjanov , "Jeff Kirsher" , "Aaron Brown" , "Kai-Heng Feng" Date: Tue, 02 Apr 2019 14:38:28 +0100 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) X-Patchwork-Hint: ignore Subject: [PATCH 3.16 71/99] igb: Fix an issue that PME is not enabled during runtime suspend In-Reply-To: X-SA-Exim-Connect-IP: 167.98.27.226 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.65-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Kai-Heng Feng commit 1fb3a7a75e2efcc83ef21f2434069cddd6fae6f5 upstream. I210 ethernet card doesn't wakeup when a cable gets plugged. It's because its PME is not set. Since commit 42eca2302146 ("PCI: Don't touch card regs after runtime suspend D3"), if the PCI state is saved, pci_pm_runtime_suspend() stops calling pci_finish_runtime_suspend(), which enables the PCI PME. To fix the issue, let's not to save PCI states when it's runtime suspend, to let the PCI subsystem enables PME. Fixes: 42eca2302146 ("PCI: Don't touch card regs after runtime suspend D3") Signed-off-by: Kai-Heng Feng Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher Signed-off-by: Ben Hutchings --- drivers/net/ethernet/intel/igb/igb_main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -7419,9 +7419,11 @@ static int __igb_shutdown(struct pci_dev igb_clear_interrupt_scheme(adapter); #ifdef CONFIG_PM - retval = pci_save_state(pdev); - if (retval) - return retval; + if (!runtime) { + retval = pci_save_state(pdev); + if (retval) + return retval; + } #endif status = rd32(E1000_STATUS);