From patchwork Mon Nov 17 09:31:40 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Miao X-Patchwork-Id: 9127 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@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 ozlabs.org (Postfix) with ESMTPS id A53C6DDDF5 for ; Mon, 17 Nov 2008 20:33:42 +1100 (EST) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.68 #1 (Red Hat Linux)) id 1L20SP-0003sf-27; Mon, 17 Nov 2008 09:31:45 +0000 Received: from host2.marvell.com ([65.219.4.2] helo=maili.marvell.com) by bombadil.infradead.org with esmtp (Exim 4.68 #1 (Red Hat Linux)) id 1L20SN-0003qK-J5 for linux-mtd@lists.infradead.org; Mon, 17 Nov 2008 09:31:43 +0000 Received: from msiexch01.marvell.com (msiexch01.marvell.com [10.68.76.102]) by maili.marvell.com (Postfix) with ESMTP id 1E24B5EA0A; Mon, 17 Nov 2008 01:31:42 -0800 (PST) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Subject: RE: [PATCH] mtd: OOPS accessing flash operations over STM flash on PXA Date: Mon, 17 Nov 2008 01:31:40 -0800 Message-ID: In-Reply-To: <1226913735-9469-1-git-send-email-den@openvz.org> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH] mtd: OOPS accessing flash operations over STM flash on PXA Thread-Index: AclIlh5Exs1/b6hXQm2L7xGJ9oQCyQAAPs7g References: <1226913735-9469-1-git-send-email-den@openvz.org> From: "Eric Miao" To: "Denis V. Lunev" , X-Spam-Score: 0.0 (/) Cc: linux-mtd@lists.infradead.org X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.9 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 Acked-by: Eric Miao David, please consider merge, thanks. -----Original Message----- From: den@sw.ru [mailto:den@sw.ru] On Behalf Of Denis V. Lunev Sent: Monday, November 17, 2008 5:22 PM To: dwmw2@infradead.org Cc: linux-mtd@lists.infradead.org; Eric Miao; Denis V. Lunev Subject: [PATCH] mtd: OOPS accessing flash operations over STM flash on PXA STM 2Gb flash is a large-page NAND flash. Set operations accordingly. This field is dereferrenced without a check in several places resulting in OOPS (seen in reality). Signed-off-by: Denis V. Lunev --- drivers/mtd/nand/pxa3xx_nand.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) .flash_width = 16, diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c index c0fa9c9..15f0a26 100644 --- a/drivers/mtd/nand/pxa3xx_nand.c +++ b/drivers/mtd/nand/pxa3xx_nand.c @@ -269,6 +269,7 @@ static struct pxa3xx_nand_timing stm2GbX16_timing = { static struct pxa3xx_nand_flash stm2GbX16 = { .timing = &stm2GbX16_timing, + .cmdset = &largepage_cmdset, .page_per_block = 64, .page_size = 2048,