Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2656729imj; Mon, 11 Feb 2019 06:34:18 -0800 (PST) X-Google-Smtp-Source: AHgI3IZMFN9DSpHXg/5U7I/Ie1Y43Gp8sRJcFYneOMzO+ecIc713XpgiFgn2O4Uc4BYBgArP4W5G X-Received: by 2002:a17:902:28e9:: with SMTP id f96mr37911709plb.169.1549895658458; Mon, 11 Feb 2019 06:34:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549895658; cv=none; d=google.com; s=arc-20160816; b=n80M0OhExTllX8YtyhHrPi84fClccTi/EsCitiV1Dynn0A6eIB8jWswFjkJZKT7kFh 0L8kDoU8Fw4cKmOU7Fp/vfLcSxzXv2keYbiTC5cmR3EGLGeEWk+UlMa+WQnBWPVnkVD8 YuDoFQ8CjiOb93aIL/uy/M1Qi86gr7mcYs4F9k9VSR6cKFsXkZ8EawH2+f/7A7zES+Fh xkE1XXr4nZ0jK3oN4+Pfea407ja6L9+t6UHbnL/bqn5DX/OUGQJFp/LVS0GsmdI0VjtT BkUMpVKyyV74RUPs+0I8ZzyyoOa1qnFHnuzICi63Dg2/rEayznSCBQaC+ILd/Ryd8tcu PJUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=GxiIAopfh/03wOMg3wX8gxH4xUtwVXyDt/GC6/OFSKo=; b=a/Ef2f5ZLlMwJ/jKSvpKbWV+wsxyUj7q3gIYPGzMAFxE+oNr0Ot3jIa7gYW+MeO65Z YQkbOcGkp3/EpW9Dar2AzoFc+llZOLJydLGQhyPWd2ZAXXjKGapA0huMvhYkoSF3SxSj A2NnZRrc6jcJ6muL4F+ufzJIv79TEL7A9EVizjvdAKHhDXlgNHX3mu0zAmbAPPUE7pgh ICsad195iELpmpbF/v2fYVMqOc2N4y5kM5YoOUO4Qb/QS3Nfz5aLI7yr9cKaNPq38meV iHc8PhWx0+jc3Vb5AyHs5oOpjyt/MVEqy7OThBQ2qpNm/+XUyYo11TRhCQTl8+M5MFcz KaZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rPr1hmhM; 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 a20si577421pgk.581.2019.02.11.06.34.01; Mon, 11 Feb 2019 06:34:18 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=rPr1hmhM; 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 S1730453AbfBKOcT (ORCPT + 99 others); Mon, 11 Feb 2019 09:32:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:39598 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730057AbfBKOcR (ORCPT ); Mon, 11 Feb 2019 09:32:17 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6AF1020844; Mon, 11 Feb 2019 14:32:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549895536; bh=EId+U0MsXjnDhSp0pjHm/nY3TmxzbZzqdtBgU01niI0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rPr1hmhM1huyF0Wd03y84kTvlQLuD5GXSbRIEvRBepoaiCsimTHvou5/EJ2FTuoD2 w+1K7ARt0XsttWCnls4MrUVzeuPTsSmifdC+FIK0lwZxiausC9ozrBKPisKmVpDQzp jznHcT7d2WKzNLyIPptvfq6J1EtlBQVAqY54Gqjw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kai-Heng Feng , Aaron Brown , Jeff Kirsher , Sasha Levin Subject: [PATCH 4.20 237/352] igb: Fix an issue that PME is not enabled during runtime suspend Date: Mon, 11 Feb 2019 15:17:44 +0100 Message-Id: <20190211141902.256534655@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141846.543045703@linuxfoundation.org> References: <20190211141846.543045703@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 1fb3a7a75e2efcc83ef21f2434069cddd6fae6f5 ] 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: Sasha Levin --- drivers/net/ethernet/intel/igb/igb_main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index 5df88ad8ac81..93f150784cfc 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -8770,9 +8770,11 @@ static int __igb_shutdown(struct pci_dev *pdev, bool *enable_wake, rtnl_unlock(); #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); -- 2.19.1