From patchwork Tue Jan 27 13:27:18 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Dobriyan X-Patchwork-Id: 20449 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 5450BDE0D4 for ; Wed, 28 Jan 2009 00:21:48 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754957AbZA0NVn (ORCPT ); Tue, 27 Jan 2009 08:21:43 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754752AbZA0NVm (ORCPT ); Tue, 27 Jan 2009 08:21:42 -0500 Received: from fg-out-1718.google.com ([72.14.220.157]:7177 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754288AbZA0NVl (ORCPT ); Tue, 27 Jan 2009 08:21:41 -0500 Received: by fg-out-1718.google.com with SMTP id 13so136167fge.17 for ; Tue, 27 Jan 2009 05:21:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=ceIMB9It8lYjC4XnUqPyYy5hD4XexlBxqmhJPqYRZ7w=; b=Cle8xMh9TcxvOUnumGfZON/YBG8Z9CNJi2RmQHIN0gRMNEl45ELzJ4hPpDyQ2F0ZEJ yMPM8yk/kcEVVn7aNECRO0ySmKjot/oA9elNpbJRv4MUGjoGYQxctbYj4tHJtreIoSOZ xcIVJ/g76wyJx41Y8FctWnAPO5/yW1x9GpavQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=Gb0pN0CVatlmcSKK3PVcZvNc+lmGhFXfQyaR8lCvc5ZuQ9NbiWLPifO/enWNR/RWaO T1FJaxseuCLyITvXMkcfbJe+SWpClADsJvH29TGMzBH6nXN0oGURiVbYZk8iCUQyyaZQ vZH9He9R8UGEr/gWfOXFVNzEuujWjJdolM/ns= Received: by 10.86.98.18 with SMTP id v18mr114518fgb.50.1233062498756; Tue, 27 Jan 2009 05:21:38 -0800 (PST) Received: from localhost ([213.171.34.224]) by mx.google.com with ESMTPS id d6sm6201712fga.30.2009.01.27.05.21.37 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 27 Jan 2009 05:21:38 -0800 (PST) Date: Tue, 27 Jan 2009 16:27:18 +0300 From: Alexey Dobriyan To: shemminger@linux-foundation.org, jgarzik@pobox.com Cc: netdev@vger.kernel.org Subject: [PATCH] sky2: fix hard hang with netconsoling and iface going up Message-ID: <20090127132718.GA10001@x200.localdomain> References: <20090127120129.GA9696@x200.localdomain> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20090127120129.GA9696@x200.localdomain> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, Jan 27, 2009 at 03:01:29PM +0300, Alexey Dobriyan wrote: > If sky2 interface is netconsoling, then > > ifconfig down; ifconfig up > > leads to hard hang after printing > > sky2 eth0: enabling interface > > SysRq+b reboots the box, nothing else works (or prints something). > > This is with 2.6.28.2 and 2.6.29-rc2-5ee810072175042775e39bdd3eaaa68884c27805. > Most certainly was there since day one. > > Haven't investigated further. Well, duh... [PATCH] sky2: fix hard hang with netconsoling and iface going up Printing anything over netconsole before hw is up and running is, of course, not going to work. Signed-off-by: Alexey Dobriyan Acked-by: Stephen Hemminger --- drivers/net/sky2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 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 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c @@ -1403,9 +1403,6 @@ static int sky2_up(struct net_device *dev) } - if (netif_msg_ifup(sky2)) - printk(KERN_INFO PFX "%s: enabling interface\n", dev->name); - netif_carrier_off(dev); /* must be power of 2 */ @@ -1484,6 +1481,9 @@ static int sky2_up(struct net_device *dev) sky2_write32(hw, B0_IMSK, imask); sky2_set_multicast(dev); + + if (netif_msg_ifup(sky2)) + printk(KERN_INFO PFX "%s: enabling interface\n", dev->name); return 0; err_out: