From patchwork Mon Aug 3 10:50:44 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Wippich X-Patchwork-Id: 30498 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by bilbo.ozlabs.org (Postfix) with ESMTPS id CDE92B7099 for ; Mon, 3 Aug 2009 21:17:03 +1000 (EST) Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1MXvVc-0001wU-Cv; Mon, 03 Aug 2009 11:15:16 +0000 Received: from mail.gw-instruments.de ([82.144.60.34] helo=redbean.intranet.gw-instruments.de) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1MXvVV-0001QI-3F for linux-mtd@lists.infradead.org; Mon, 03 Aug 2009 11:15:13 +0000 Received: by redbean.intranet.gw-instruments.de (Postfix, from userid 1000) id E8B3B2D0B1; Mon, 3 Aug 2009 12:50:44 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by redbean.intranet.gw-instruments.de (Postfix) with ESMTP id D8C2A891 for ; Mon, 3 Aug 2009 12:50:44 +0200 (CEST) Date: Mon, 3 Aug 2009 12:50:44 +0200 (CEST) From: Peter Wippich X-X-Sender: pewi@redbean.intranet.gw-instruments.de To: linux-mtd@lists.infradead.org Subject: [Patch 1/1] don't suspend erase for erase in cfi_cmdset_0002 Message-ID: MIME-Version: 1.0 X-Spam-Score: 0.0 (/) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.11 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 Hi, came around this problem while stress testing jffs2. From time to time the block erase failed and the file system overflows. I don't know if there are any Nor chips out there which allow a new erase to start when in erase suspend. However, the chips on my board dont't. And even when it doesn't make much sense to suspend an erase operation for another erase. Patch below fixes the problem for me. Have fun and take care, Peter Signed-off-by: Peter Wippich diff -Naur a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c --- a/drivers/mtd/chips/cfi_cmdset_0002.c 2007-07-10 20:56:30.000000000 +0200 +++ b/drivers/mtd/chips/cfi_cmdset_0002.c 2009-08-02 19:55:34.000000000 +0200 @@ -521,6 +521,10 @@ case FL_ERASING: if (mode == FL_WRITING) /* FIXME: Erase-suspend-program appears broken. */ goto sleep; + if (mode == FL_ERASING) { + printk(KERN_INFO "attempt erase suspend with mode FL_ERASING\n") ; + goto sleep; + } if (!( mode == FL_READY || mode == FL_POINT