From patchwork Sat Oct 23 13:43:54 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Enric Balletbo Serra X-Patchwork-Id: 279241 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o9NDiDg9005569 for ; Sat, 23 Oct 2010 13:44:16 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756995Ab0JWNoO (ORCPT ); Sat, 23 Oct 2010 09:44:14 -0400 Received: from mail-ww0-f44.google.com ([74.125.82.44]:37127 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756981Ab0JWNoO (ORCPT ); Sat, 23 Oct 2010 09:44:14 -0400 Received: by wwe15 with SMTP id 15so1916831wwe.1 for ; Sat, 23 Oct 2010 06:44:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=kQVuBu5RtJWSa9ZvucDitQoU6YyM1kKnP9lzE1lKiuM=; b=PWXE5DmIrD6r59Z6XL5uytdcgxOMUzAO8sjXEEj/QOuHLjJpj+6m4TfFEmeb67L4jy 7Fe9Xcsuo7Mvhvce3YUx0IxkeadD99Gbj1xvNjExhciVNEwpbCdUBTv77SZXT6lHM3Yz 8gesh75nIJkLbaUrLBfeeRq8lPP5nS554ZQC8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=uchtx+fE7iUpipwAoylIv+eysCk4zu0a+mZrHxzDiBSYnssTPPIS5pqNpCKwMWSPtH myMaxsFNE5k6g+1Xv6sH5ZZICqTg+TNWBPrSbNtK446lVd/9ItvLIuGUeZm2JVorK0dz 0vVPFIJ2JQl7UUscZEMZxU0dqKqKJM/WbuXBU= Received: by 10.216.66.146 with SMTP id h18mr26622wed.106.1287841452710; Sat, 23 Oct 2010 06:44:12 -0700 (PDT) Received: from localhost.localdomain ([83.52.77.213]) by mx.google.com with ESMTPS id y15sm2718929weq.30.2010.10.23.06.44.10 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 23 Oct 2010 06:44:12 -0700 (PDT) From: Enric Balletbo i Serra To: linux-omap@vger.kernel.org, linux-mtd@lists.infradead.org, kyungmin.park@samsung.com, dwmw2@infradead.org, Artem.Bityutskiy@nokia.com, adrian.hunter@nokia.com, m.szyprowski@samsung.com Cc: Enric Balletbo i Serra Subject: [PATCH 1/1] mtd: OneNAND: fix bufferram management when chip has 2-planes. Date: Sat, 23 Oct 2010 15:43:54 +0200 Message-Id: <1287841434-3349-2-git-send-email-eballetbo@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1287841434-3349-1-git-send-email-eballetbo@gmail.com> References: <1287841434-3349-1-git-send-email-eballetbo@gmail.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Sat, 23 Oct 2010 13:44:16 +0000 (UTC) diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c index a2bb520..53aa13e 100644 --- a/drivers/mtd/onenand/onenand_base.c +++ b/drivers/mtd/onenand/onenand_base.c @@ -1964,6 +1964,10 @@ static int onenand_write_ops_nolock(struct mtd_info *mtd, loff_t to, /* In partial page write we don't update bufferram */ onenand_update_bufferram(mtd, to, !ret && !subpage); + ONENAND_SET_BUFFERRAM1(this); + onenand_update_bufferram(mtd, to + this->writesize, + !ret && !subpage); + if (ret) { printk(KERN_ERR "%s: write failed %d\n", __func__, ret);