From patchwork Tue Nov 18 19:51:39 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Jenkins X-Patchwork-Id: 9474 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 957EDDDDEF for ; Wed, 19 Nov 2008 06:51:50 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752364AbYKRTvq (ORCPT ); Tue, 18 Nov 2008 14:51:46 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752321AbYKRTvp (ORCPT ); Tue, 18 Nov 2008 14:51:45 -0500 Received: from ey-out-2122.google.com ([74.125.78.25]:51428 "EHLO ey-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751935AbYKRTvp (ORCPT ); Tue, 18 Nov 2008 14:51:45 -0500 Received: by ey-out-2122.google.com with SMTP id 6so1236369eyi.37 for ; Tue, 18 Nov 2008 11:51:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding:sender; bh=A0X8f0rQ0qOvG2jhhtvsmu+Sy/LWcA4oymmfqexhlDc=; b=iJthETV2btsDvwsGIn99HReEX5Cp/YESKddmKXE4GqCWBnpff0RDZcBzFAfpSfC1Op yrjsFShvJa5xcg1Wr+21NGmGJNzT63oK8knb7PL2uSFqjwJIEAzXbrfqDOSR1HYadZDu s24F0+te1CYmh60YFwUjOIdUZLxrepC2BEYgM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding :sender; b=Uj5oYjY2Tpjw8Gunri7MshmhuWHjzDV/RgMiXtHsIaQN98wmAZDHgf2glgYOhFb2F9 i/w4rhsAUFwUUC2HGUbeT7hkLvPeFlwINsHIJ7rzM7iBDpykH96O+JdmJHoD+x5Jrycl l21T8CVO/uoRA49qpYcramJrCTKmvM7RVRMBE= Received: by 10.210.45.17 with SMTP id s17mr196263ebs.108.1227037902815; Tue, 18 Nov 2008 11:51:42 -0800 (PST) Received: from ?10.222.147.176? ([86.53.68.233]) by mx.google.com with ESMTPS id t2sm3362011gve.5.2008.11.18.11.51.40 (version=SSLv3 cipher=RC4-MD5); Tue, 18 Nov 2008 11:51:41 -0800 (PST) Message-ID: <49231CCB.8010900@tuffmail.co.uk> Date: Tue, 18 Nov 2008 19:51:39 +0000 From: Alan Jenkins User-Agent: Thunderbird 2.0.0.17 (X11/20080925) MIME-Version: 1.0 To: Jay Cliburn CC: csnook@redhat.com, atl1-devel@lists.sourceforge.net, linux-kernel , netdev@vger.kernel.org Subject: Re: [atl1-devel] atl2: don't mess up irq on suspend/resume (probably msi only) References: <49201401.1060600@tuffmail.co.uk> <4921E574.3090602@tuffmail.co.uk> <20081117181336.1a270561@osprey.hogchain.net> <4922D195.9010505@tuffmail.co.uk> <4922FD09.2070007@tuffmail.co.uk> In-Reply-To: <4922FD09.2070007@tuffmail.co.uk> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Alan Jenkins wrote: > Alan Jenkins wrote: >> Jay Cliburn wrote: >>> [adding netdev to cc list] >>> >>> On Mon, 17 Nov 2008 21:43:16 +0000 >>> Alan Jenkins wrote: >>> >>> >>>> Don't listen to me. The problem went away because when I was testing >>>> my patch, I plugged the ethernet in and actually used it. My patch >>>> doesn't seem to fix anything. >>>> >>>> So I now have the steps to reproduce this warning: remove the ethernet >>>> cable and suspend. >>>> >>>> Also, I was speaking rubbish because the warning isn't on the resume >>>> path. It seems to be when network-manager re-opens the device on >>>> resume. >>>> >>>> I'll have another look for possible culprits. Hints appreciated :). >>> Does this help? >> >> Ah! Yes, that fixes it, thanks. > > Just noticed another problem. If I suspend with the cable plugged in, > I get a warning message about freeing the IRQ which was caused by your patch. It works better (for both cable plugged and unplugged cases) if I do this instead: --- 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 diff --git a/drivers/net/atlx/atl2.c b/drivers/net/atlx/atl2.c index f5bdc92..8571e8c 100644 --- a/drivers/net/atlx/atl2.c +++ b/drivers/net/atlx/atl2.c @@ -1690,9 +1690,11 @@ static int atl2_resume(struct pci_dev *pdev) ATL2_WRITE_REG(&adapter->hw, REG_WOL_CTRL, 0); - err = atl2_request_irq(adapter); - if (netif_running(netdev) && err) - return err; + if (netif_running(netdev)) { + err = atl2_request_irq(adapter); + if (err) + return err; + } atl2_reset_hw(&adapter->hw);