From patchwork Sun Sep 27 14:49:58 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yong Zhang X-Patchwork-Id: 34343 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 56924B7BA6 for ; Mon, 28 Sep 2009 00:50:48 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753086AbZI0Ot5 (ORCPT ); Sun, 27 Sep 2009 10:49:57 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752974AbZI0Ot4 (ORCPT ); Sun, 27 Sep 2009 10:49:56 -0400 Received: from mail-pz0-f188.google.com ([209.85.222.188]:33431 "EHLO mail-pz0-f188.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752944AbZI0Otz convert rfc822-to-8bit (ORCPT ); Sun, 27 Sep 2009 10:49:55 -0400 Received: by pzk26 with SMTP id 26so1730251pzk.4 for ; Sun, 27 Sep 2009 07:49:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=PbfJm5820OaOs1hnXWIvtOTsW+/4VaUx5zdZm91aNw8=; b=GzL1zD51lKWZG73vDIdlUK48+Ujb63m1J1E00ElpRh7Adx0wTPyjzYR8y9E7qgpgOh 6sLqgK+F7TSVKUli5c5yIA2m2VxJtRY8RLwjsBfMT2WWFy8zubeNr4d6xKC3Z/9c5VQP BJKWij2Ojr7zLFuBRyvCzCht5cAGOfWniSpbk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=xCYsff2tHjJ34y9PEEPngupEsRuKnC7udHTTa6eItJ4nSGKqUQbks+y8KT+t5QFxIL cMUVrlHWAMZo3Dvmu0AmZbVKG/onurThXoi6RNKFWTYaXEfbwHgIYZZuwdN798nxc8k6 9SefDr1mc2NVF+y3r3liwulOp/+x9xFgZg/Po= MIME-Version: 1.0 Received: by 10.143.21.41 with SMTP id y41mr163929wfi.209.1254062999068; Sun, 27 Sep 2009 07:49:59 -0700 (PDT) In-Reply-To: <2674af740909270701u6febabdbpc5c772fabc193b32@mail.gmail.com> References: <8db1092f0909270105x4b49daf8k268e453d2379020c@mail.gmail.com> <2674af740909270127s464a3cb2xef5e7f4cd61b0eb7@mail.gmail.com> <2674af740909270130h359a5d23taa7e8b63e6a18a4d@mail.gmail.com> <8db1092f0909270325j67825cem82fc93cf19336d6f@mail.gmail.com> <2674af740909270701u6febabdbpc5c772fabc193b32@mail.gmail.com> Date: Sun, 27 Sep 2009 22:49:58 +0800 Message-ID: <2674af740909270749u339671a1ia81d5736eeb750fa@mail.gmail.com> Subject: Re: [2.6.31-git17] WARNING: at kernel/hrtimer.c:648 hres_timers_resume+0x40/0x50()/WARNING: at drivers/base/sys.c:353 __sysdev_resume+0xc3/0xe0() From: Yong Zhang To: Maciej Rutecki Cc: Linux Kernel Mailing List , "Rafael J. Wysocki" , clemens@ladisch.de, venkatesh.pallipadi@intel.com, gregkh@suse.de, zambrano@broadcom.com, davem@davemloft.net, netdev@vger.kernel.org Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Add cc'ed. On Sun, Sep 27, 2009 at 10:01 PM, Yong Zhang wrote: > On Sun, Sep 27, 2009 at 6:25 PM, Maciej Rutecki > wrote: >> 2009/9/27 Yong Zhang : >>> >>> Oops, TABLE is corrupted. Please use the attachment. >> >> kernel/time/timekeeping.c: In function ‘timekeeping_resume’: >> kernel/time/timekeeping.c:577: error: ‘xtime_locks’ undeclared (first >> use in this function) >> kernel/time/timekeeping.c:577: error: (Each undeclared identifier is >> reported only once >> kernel/time/timekeeping.c:577: error: for each function it appears >> in.) >> make[3]: *** [kernel/time/timekeeping.o] Błąd 1 >> make[2]: *** [kernel/time] Błąd 2 >> >> >> I change: >> write_seqlock(&xtime_locks); >> to: >> write_seqlock(&xtime_lock); >> > > Oh, typo error. > >> Corrected patch in attachment. >> >> First warning has gone, but still I have this: >> [  120.868049] SMP alternatives: switching to UP code >> [  120.872570] CPU0 attaching NULL sched-domain. >> [  120.872574] CPU1 attaching NULL sched-domain. >> [  120.872581] CPU0 attaching NULL sched-domain. >> [  120.872787] CPU1 is down >> [  120.872846] Extended CMOS year: 2000 >> [  120.872945] PM: Creating hibernation image: >> [  120.876009] PM: Need to copy 107120 pages >> [  120.872009] PM: Restoring platform NVS memory >> [  120.872009] CPU0: Thermal monitoring handled by SMI >> [  120.872009] Extended CMOS year: 2000 >> [  120.872009] ------------[ cut here ]------------ >> [  120.872009] WARNING: at drivers/base/sys.c:353 >> __sysdev_resume+0xc3/0xe0() >> [  120.872009] Hardware name: HP Compaq nx6310 (EY501ES#AKD) >> [  120.872009] Interrupts enabled after timekeeping_resume+0x0/0x1c0 > > Irq is enabled after timekeeping_resume(), the previous patch do something > sensible. But we even don't know when the irq is enabled. such as in > timekeeping_resume() or before enter timekeeping_resume(). But it > seem that this is not due to timekeeping_resume(). Instead I'm afraid > it's caused by buggy driver. > It seem this is cause by b44 dirver. Can you give a try? From 05ee2f22a7ea065e05bf8b5294d222a3700d2cc8 Mon Sep 17 00:00:00 2001 From: Yong Zhang Date: Sun, 27 Sep 2009 22:42:41 +0800 Subject: [PATCH] net/b44: keep irq state at suspend_resume suspend() and resume() assume irq is disabled. So keep the irq state when do this. Signed-off-by: Yong Zhang --- drivers/net/b44.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) if (bp->flags & B44_FLAG_WOL_ENABLE) { @@ -2288,6 +2289,7 @@ static int b44_resume(struct ssb_device *sdev) struct net_device *dev = ssb_get_drvdata(sdev); struct b44 *bp = netdev_priv(dev); int rc = 0; + unsigned long flags; rc = ssb_bus_powerup(sdev->bus, 0); if (rc) { @@ -2305,12 +2307,12 @@ static int b44_resume(struct ssb_device *sdev) return rc; } - spin_lock_irq(&bp->lock); + spin_lock_irqsave(&bp->lock, flags); b44_init_rings(bp); b44_init_hw(bp, B44_FULL_RESET); netif_device_attach(bp->dev); - spin_unlock_irq(&bp->lock); + spin_unlock_irqrestore(&bp->lock, flags); b44_enable_ints(bp); netif_wake_queue(dev); diff --git a/drivers/net/b44.c b/drivers/net/b44.c index e046943..97b467f 100644 --- a/drivers/net/b44.c +++ b/drivers/net/b44.c @@ -2258,20 +2258,21 @@ static int b44_suspend(struct ssb_device *sdev, pm_message_t state) { struct net_device *dev = ssb_get_drvdata(sdev); struct b44 *bp = netdev_priv(dev); + unsigned long flags; if (!netif_running(dev)) return 0; del_timer_sync(&bp->timer); - spin_lock_irq(&bp->lock); + spin_lock_irqsave(&bp->lock, flags); b44_halt(bp); netif_carrier_off(bp->dev); netif_device_detach(bp->dev); b44_free_rings(bp); - spin_unlock_irq(&bp->lock); + spin_unlock_irqrestore(&bp->lock, flags); free_irq(dev->irq, dev);