Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756030AbaF3Qjl (ORCPT ); Mon, 30 Jun 2014 12:39:41 -0400 Received: from ns.gsystem.sk ([62.176.172.50]:44075 "EHLO ns.gsystem.sk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755937AbaF3Qjj (ORCPT ); Mon, 30 Jun 2014 12:39:39 -0400 From: Ondrej Zary To: Samuel Chessman Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 10/11] tlan: Enable device at resume Date: Mon, 30 Jun 2014 18:38:36 +0200 Message-Id: <1404146317-3094-11-git-send-email-linux@rainbow-software.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1404146317-3094-1-git-send-email-linux@rainbow-software.org> References: <1404146317-3094-1-git-send-email-linux@rainbow-software.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org pci_disable_device() is called in _suspend but there's no corresponding pci_enable_device() in _resume. This causes "disabling already-disabled device" warning on 2nd suspend. Add pci_enable_device() call to _resume to fix this problem. Signed-off-by: Ondrej Zary --- drivers/net/ethernet/ti/tlan.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/tlan.c b/drivers/net/ethernet/ti/tlan.c index bb805c2..dbded9f 100644 --- a/drivers/net/ethernet/ti/tlan.c +++ b/drivers/net/ethernet/ti/tlan.c @@ -366,8 +366,10 @@ static int tlan_suspend(struct pci_dev *pdev, pm_message_t state) static int tlan_resume(struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata(pdev); + int rc = pci_enable_device(pdev); - pci_set_power_state(pdev, PCI_D0); + if (rc) + return rc; pci_restore_state(pdev); pci_enable_wake(pdev, PCI_D0, 0); netif_device_attach(dev); -- Ondrej Zary -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/