Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3698091imu; Mon, 28 Jan 2019 09:13:47 -0800 (PST) X-Google-Smtp-Source: ALg8bN4twi0rNo6D7sifUTcUPDvBoh1/vHjNl3W2IRvxtGN7MvyqaM5L7AkFXA/Zheewqffa6xNg X-Received: by 2002:a63:8f45:: with SMTP id r5mr20312257pgn.222.1548695627139; Mon, 28 Jan 2019 09:13:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548695627; cv=none; d=google.com; s=arc-20160816; b=AiA7qxUsnnLgHAcDKXN/WQS6tMf8ln1CX5Yhh28vpSxrcozjVJWIEAxPG4jU2IH7eJ WhdGL6SXjyNeyDnAaoq3SraL8QNxq3mXKRAW7gVNmVZjSOBsAIk7ByoQXu5v7hv/1ZbH qgcZoGLDc92XYmAdz4SUyCYkN4PQMfFPZ+WRjIAqWVzcw+/8ZnqNAn6ke51j/CNQXU5v FvhmiBHy2DIqJS0//rWKp9azAD4oGeOvPcN+WYQha6wki5OIuEHcoJVJ9MrgrbWRaX5v W557gXtw1C7TBQlkmUWTzmID1C8Zu93DcQ7dZOEZ+UcRFlgVSUxlBkRN4B7j7fCrcv4M FItg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=8RmgXc161NxXP5VvYlGAuTqRXHaUETM3fTcKethtIRw=; b=gK3Rx3eCeXG0VCs3IgRgSS8wpCk3yiA10q5JmTa8rAI0mfve+MLrMkdd3VkntoknI4 nL0lETaTr0BkkS2XS3vFN7NrS+mB9YZ/GLM+z0MA7p3y/OogyHNO9VrsirjUFAZSHev0 X/i6Xf4g8yzbEl7PkY2kLNFJTLNzor5sNYUsCVKVZhgAnvmYgdvu2s8DmJDzzKCRiYfj 42jQeo0A8htEmMdqNQsZ3C3D0IFEX8UOzn7z+/T8YLZhuupG2zlG6SUpCn1nf6Fj9Hrs 6zslVfLhl26xSjdc4CFk7ikK9W8wE86EkBALa1dHEVCi6KijMgEfXQF8QVmZWiUlEiBe mNrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TOZyuJse; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b17si31906406pgk.581.2019.01.28.09.13.31; Mon, 28 Jan 2019 09:13:47 -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=TOZyuJse; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731185AbfA1QJ0 (ORCPT + 99 others); Mon, 28 Jan 2019 11:09:26 -0500 Received: from mail.kernel.org ([198.145.29.99]:34004 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731930AbfA1QJY (ORCPT ); Mon, 28 Jan 2019 11:09:24 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DF6A92147A; Mon, 28 Jan 2019 16:09:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548691763; bh=hsiB9miFcVT/4ObRk5ldlA2+yT8AQ2zCQhCycgYw2Fs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TOZyuJsesXlTRxUOxG+DmEydZOWnmroC6YRGGESo6BkFMYR0/OFkBTrZa6wJMkmay SVQDY/Mg1pZMhfMp771AZMAfdXJnbZbsXwUGqIEVvQhROdTtAl33UpMZ/+wHVzNO8j P+071zUqg3pB69Vbv05juZDhL5lqadAfmBTjGmP0= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Kai-Heng Feng , Jeff Kirsher , Sasha Levin , netdev@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 209/258] igb: Fix an issue that PME is not enabled during runtime suspend Date: Mon, 28 Jan 2019 10:58:35 -0500 Message-Id: <20190128155924.51521-209-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190128155924.51521-1-sashal@kernel.org> References: <20190128155924.51521-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kai-Heng Feng [ 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 0796cef96fa3..ffaa6e031632 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