From patchwork Thu Oct 21 08:25:42 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislaw Gruszka X-Patchwork-Id: 68543 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id B297DB7103 for ; Thu, 21 Oct 2010 19:23:52 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753639Ab0JUIXh (ORCPT ); Thu, 21 Oct 2010 04:23:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:21891 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753537Ab0JUIXf (ORCPT ); Thu, 21 Oct 2010 04:23:35 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o9L8NQCu032296 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 21 Oct 2010 04:23:26 -0400 Received: from localhost (dhcp-1-246.brq.redhat.com [10.34.1.246]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id o9L8NPVd017018; Thu, 21 Oct 2010 04:23:25 -0400 From: Stanislaw Gruszka To: Francois Romieu , netdev@vger.kernel.org Cc: Denis Kirjanov , Stanislaw Gruszka Subject: [PATCH 7/8] r8169: (re)init phy on resume Date: Thu, 21 Oct 2010 10:25:42 +0200 Message-Id: <1287649543-6569-8-git-send-email-sgruszka@redhat.com> In-Reply-To: <1287649543-6569-1-git-send-email-sgruszka@redhat.com> References: <1287649543-6569-1-git-send-email-sgruszka@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Fix switching device to low-speed mode after resume reported in: https://bugzilla.redhat.com/show_bug.cgi?id=502974 Reported-and-tested-by: Laurentiu Badea Signed-off-by: Stanislaw Gruszka --- drivers/net/r8169.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index ad3f37a..1165e7d 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -4824,6 +4824,9 @@ static int rtl8169_resume(struct device *device) { struct pci_dev *pdev = to_pci_dev(device); struct net_device *dev = pci_get_drvdata(pdev); + struct rtl8169_private *tp = netdev_priv(dev); + + rtl8169_init_phy(dev, tp); if (netif_running(dev)) __rtl8169_resume(dev); @@ -4864,6 +4867,8 @@ static int rtl8169_runtime_resume(struct device *device) tp->saved_wolopts = 0; spin_unlock_irq(&tp->lock); + rtl8169_init_phy(dev, tp); + __rtl8169_resume(dev); return 0;