From patchwork Fri Apr 3 17:41:12 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ed Swierk X-Patchwork-Id: 25582 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.176.167]) by ozlabs.org (Postfix) with ESMTP id 54F81DDDA2 for ; Sat, 4 Apr 2009 04:41:49 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934698AbZDCRl3 (ORCPT ); Fri, 3 Apr 2009 13:41:29 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S935328AbZDCRl1 (ORCPT ); Fri, 3 Apr 2009 13:41:27 -0400 Received: from wf-out-1314.google.com ([209.85.200.173]:28614 "EHLO wf-out-1314.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932760AbZDCRlZ (ORCPT ); Fri, 3 Apr 2009 13:41:25 -0400 Received: by wf-out-1314.google.com with SMTP id 29so1298374wff.4 for ; Fri, 03 Apr 2009 10:41:23 -0700 (PDT) Received: by 10.142.113.17 with SMTP id l17mr383741wfc.293.1238780483660; Fri, 03 Apr 2009 10:41:23 -0700 (PDT) Received: from ?172.17.2.29? (65-119-47-100.dia.static.qwest.net [65.119.47.100]) by mx.google.com with ESMTPS id 27sm3169199wfa.10.2009.04.03.10.41.16 (version=SSLv3 cipher=RC4-MD5); Fri, 03 Apr 2009 10:41:19 -0700 (PDT) Subject: Re: [Regression in 2.6.29] forcedeth doesn't work after resume from hibernation (was: Re: Resume after hibernation regression in 2.6.29) From: Ed Swierk To: "Rafael J. Wysocki" Cc: "Tvrtko A. Ursulin" , Pavel Machek , linux-pm , kernel list , Tobias Diedrich , Ayaz Abdulla , netdev , Arthur Jones , Andrew Morton , "David S. Miller" In-Reply-To: <9ae48b020904030824o1f94831asb60f979b3e489a8b@mail.gmail.com> References: <200903261920.32173.tvrtko@ursulin.net> <200903270801.46712.tvrtko@ursulin.net> <200903271255.36429.rjw@sisk.pl> <200903272109.21259.rjw@sisk.pl> <9ae48b020904030824o1f94831asb60f979b3e489a8b@mail.gmail.com> Date: Fri, 03 Apr 2009 10:41:12 -0700 Message-Id: <1238780473.19305.3.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.24.5 (2.24.5-1.fc10) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Fri, 2009-04-03 at 08:24 -0700, Ed Swierk wrote: > On Fri, Mar 27, 2009 at 1:09 PM, Rafael J. Wysocki wrote: > > I was able to reproduce the problem and identify the commit that broke the > > resume of forcedeth, which turned out to be: > > > > commit cb52deba12f27af90a46d2f8667a64888118a888 > > Author: Ed Swierk > > Date: Mon Dec 1 12:24:43 2008 +0000 > > > > forcedeth: power down phy when interface is down > > > > Signed-off-by: Ed Swierk > > Tested-by: Arthur Jones > > Signed-off-by: Andrew Morton > > Signed-off-by: David S. Miller > > > > Since I have no slightest idea of what this commit is supposed to achieve, > > I can only ask for reverting it. It reverts cleanly, BTW. > > The change causes forcedeth to bring down the physical link when an > interface goes down; leaving it up causes the switch at the other end > to think the port is still active, with potentially random speed and > duplex parameters. > > It's possible that the forcedeth driver needs to reset autonegotiation > after bringing it up the link again. > > Can you please try this on a 2.6.29 kernel that's exhibiting the > symptoms you describe, after resuming the machine from hibernation: > > ethtool -s eth1 autoneg off speed 100 duplex full > ethtool -s eth1 autoneg on > > This should reset autonegotiation manually and bring the link. Let me > know how it goes. Also please try this patch; it fixes the problem on my test system (a DFI board with an nVidia MCP55). Signed-off-by: Ed Swierk --- -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- linux-2.6.29.x86_64/drivers/net/forcedeth.c.orig 2009-03-23 16:12:14.000000000 -0700 +++ linux-2.6.29.x86_64/drivers/net/forcedeth.c 2009-04-03 10:11:26.839614710 -0700 @@ -5995,6 +5995,9 @@ for (i = 0;i <= np->register_size/sizeof(u32); i++) writel(np->saved_config_space[i], base+i*sizeof(u32)); + /* restore phy state, including autoneg */ + phy_init(dev); + netif_device_attach(dev); if (netif_running(dev)) { rc = nv_open(dev);