From patchwork Wed Feb 15 11:48:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell King - ARM Linux X-Patchwork-Id: 141313 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from merlin.infradead.org (unknown [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 399CA1007D4 for ; Wed, 15 Feb 2012 22:50:44 +1100 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1RxdM8-0000Lp-0n; Wed, 15 Feb 2012 11:49:04 +0000 Received: from [2002:4e20:1eda::1] (helo=caramon.arm.linux.org.uk) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1RxdM2-0000Lb-Qt for linux-mtd@lists.infradead.org; Wed, 15 Feb 2012 11:49:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=arm.linux.org.uk; s=caramon; h=Sender:Content-Type:MIME-Version:Message-ID:Subject:To:From:Date; bh=kglPByQMrpMK4NDFj06096Fq5USxnYb5bhZYA6Zu5jo=; b=HXfgXCA9jD5MZ913NcBJoKhJRBqJ6LTBlI0RdbyjxxbLHl4f23u0l+sOw6OZT6G88s6m6gxygVMP1bAu3o2ViazE6xmu6cXzsrCxaNRur/LPNZCxBIRKJsrqin1fMrtKEI7U0xBcMC/tyLFM5FUvJgJAaHqMApaaZJHqkg+F2rA=; Received: from n2100.arm.linux.org.uk ([2002:4e20:1eda:1:214:fdff:fe10:4f86]:47915) by caramon.arm.linux.org.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1RxdLg-0004Vh-G9; Wed, 15 Feb 2012 11:48:37 +0000 Received: from linux by n2100.arm.linux.org.uk with local (Exim 4.76) (envelope-from ) id 1RxdLf-0006gV-73; Wed, 15 Feb 2012 11:48:35 +0000 Date: Wed, 15 Feb 2012 11:48:34 +0000 From: Russell King - ARM Linux To: David Woodhouse , Artem Bityutskiy , linux-mtd@lists.infradead.org Subject: [PATCH] Fix 'Flash device refused suspend due to active operation' message Message-ID: <20120215114834.GG13673@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) X-Spam-Note: CRM114 invocation failed X-Spam-Score: -1.2 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.8 RDNS_NONE Delivered to internal network by a host with no rDNS X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Russell King While debugging on SA11x0, the following message was observed: "Flash device refused suspend due to active operation (state 20)" Signed-off-by: Russell King --- I'm afraid that it's been too long since I looked at this, and I no longer remember the details behind this to write a proper commit log, so maybe someone who understands the code can do that. I seem to remember dwmw2 said the current code was in error, so here's the patch. drivers/mtd/chips/cfi_cmdset_0001.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c index e1e122f..709a11f 100644 --- a/drivers/mtd/chips/cfi_cmdset_0001.c +++ b/drivers/mtd/chips/cfi_cmdset_0001.c @@ -2483,7 +2483,7 @@ static int cfi_intelext_suspend(struct mtd_info *mtd) allowed to. Or should we return -EAGAIN, because the upper layers ought to have already shut down anything which was using the device anyway? The latter for now. */ - printk(KERN_NOTICE "Flash device refused suspend due to active operation (state %d)\n", chip->oldstate); + printk(KERN_NOTICE "Flash device refused suspend due to active operation (state %d)\n", chip->state); ret = -EAGAIN; case FL_PM_SUSPENDED: break;