Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6565630imu; Sun, 2 Dec 2018 21:55:41 -0800 (PST) X-Google-Smtp-Source: AFSGD/U7LuydWFTuH/lg+aPPkVfOXibL6WocKe8rhF2DvrEXa80R1jWxTiQ8ODUlJyq5FLf3Xf15 X-Received: by 2002:a17:902:bb86:: with SMTP id m6mr14949758pls.315.1543816541800; Sun, 02 Dec 2018 21:55:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543816541; cv=none; d=google.com; s=arc-20160816; b=f76iqDRglU+SY6o26YtlPoP6KqaO8eVQljO4d0Wb2P/fa108DuYUvEeIO6a+9A4YrG EGgicENoedtlh1Kuqw+pALyrXoE0e6rHt+NvdjsDZjvsS3NnBGz9JUfFYy5TUMucBYrU KduIm/nGSFLt6aqLvraRBeVLWqHzYuaibHkQO7i5dd+VHvv6V5kab8qtD9kNRy6EeOXG SbXpxoppiEtRBZI4cmn6h4uGvxUZOZJuMsNKbOA92W6QM7cy13+dkWrTuLyVDoW0OJfv AnEzu4mNmWDNWfbFdKEbK5QkOjtn5mYJjdzZM5UvbtT3t3bYqhPe97O261kBmtOeNcTK 0Qlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=6f6oxaZMnwdN2jPHtC3isfzTkRXJ/WHk9b+AN4FtH3Y=; b=b+MIp/jxsNk+6E+SV2ycy56grs+cxnKl8vlF0YzL7QU3TZHVdV2Gtn33n9AukmfsPO 4pSRZK8Hy67/rn/6x1+NsI70bgmtRTTerchYCDRixT9ovoxeV8RNu7S3QTHm1pGmBgHk 1Tr/fo1XSTKaEl4RNWEnLzPvzjIgvGssJCQYYcvCfr1Ft80aY329F2uaWRB8B4AQJfUd zmX5f4vNzBxbcck/VZS9WE0iaIhp2OyeXTooarPHatY4s8xkCh082J5GYgVLw+B36kpy AkTWxSmwsggT69FuSbMtIjOJAfzKRTV9KbBq0UI6KaeV8gHFoKUUht77g1yFPGXiXCQD wlhA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s191si14743290pfs.53.2018.12.02.21.55.26; Sun, 02 Dec 2018 21:55:41 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725842AbeLCFyz (ORCPT + 99 others); Mon, 3 Dec 2018 00:54:55 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:60686 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725812AbeLCFyy (ORCPT ); Mon, 3 Dec 2018 00:54:54 -0500 Received: from 61-220-137-37.hinet-ip.hinet.net ([61.220.137.37] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1gThBs-0004y2-Jz; Mon, 03 Dec 2018 05:54:45 +0000 From: Kai-Heng Feng To: jeffrey.t.kirsher@intel.com Cc: davem@davemloft.net, intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Kai-Heng Feng Subject: [PATCH] igb: Fix an issue that PME is not enabled during runtime suspend Date: Mon, 3 Dec 2018 13:54:38 +0800 Message-Id: <20181203055438.363-1-kai.heng.feng@canonical.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 subsytem enables PME. Fixes: 42eca2302146 ("PCI: Don't touch card regs after runtime suspend D3") Signed-off-by: Kai-Heng Feng --- 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.17.1