Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757788AbbBEQf3 (ORCPT ); Thu, 5 Feb 2015 11:35:29 -0500 Received: from mail-by2on0099.outbound.protection.outlook.com ([207.46.100.99]:55947 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753684AbbBEQf2 (ORCPT ); Thu, 5 Feb 2015 11:35:28 -0500 Message-ID: <54D397C8.808@opensource.altera.com> Date: Thu, 5 Feb 2015 10:18:16 -0600 From: Graham Moore User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: Richard Weinberger CC: Dinh Nguyen , Dinh Nguyen , Brian Norris , David Woodhouse , , Josh Triplett , "linux-mtd@lists.infradead.org" , Linux List Subject: Re: [PATCH] mtd: denali: Disable sub-page writes in Denali NAND driver References: <1421249930-21229-1-git-send-email-dinguyen@opensource.altera.com> In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [64.129.157.38] X-ClientProxiedBy: CO1PR06CA041.namprd06.prod.outlook.com (10.242.160.31) To DM2PR03MB446.namprd03.prod.outlook.com (10.141.85.17) Authentication-Results: gmail.com; dkim=none (message not signed) header.d=none; X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:DM2PR03MB446; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004);SRVR:DM2PR03MB446; X-Forefront-PRVS: 0478C23FE0 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6049001)(6009001)(479174004)(377454003)(51704005)(164054003)(92566002)(23676002)(83506001)(62966003)(77156002)(2950100001)(77096005)(33656002)(110136001)(122386002)(40100003)(42186005)(50466002)(64126003)(47776003)(87976001)(54356999)(50986999)(65816999)(76176999)(66066001)(65806001)(65956001)(46102003)(86362001);DIR:OUT;SFP:1101;SCL:1;SRVR:DM2PR03MB446;H:[137.57.160.195];FPR:;SPF:None;MLV:sfv;LANG:en; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:DM2PR03MB446; X-OriginatorOrg: opensource.altera.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Feb 2015 16:21:08.0021 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR03MB446 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1456 Lines: 42 On 02/03/2015 04:23 PM, Richard Weinberger wrote: ... > > So this driver never worked? > If it worked for some users we have to make sure that your change does not break > existing setups. > /me thinks of UBI. > Actually, we made this change to make UBIFS work. So, yes, the driver never worked for UBI. Worked fine for JFFS2, raw data. A customer reported an issue with ECC errors when using UBIFS on NAND flash with Altera SoC. We debugged it and found the ECC errors occur because the UBI subsystem is trying to write sub-pages in the NAND, but neither the NAND chip itself nor the Denali NAND controller support sub-page writes. In more detail, the UBIFS tries to write a sub-page, but the controller writes a whole page instead. The controller's buffer is initialized to FF, so all the data outside the subpage is FF. But in this case, part of the page in the device is already non-FF. And that data does not change when FF is written to it. The Denali controller calculates ECC on the data written, but that data will not match the data in the device, and so the ECC is incorrect. When a subsequent read occurs, the ECC will not match and an error will occur. Thanks, Graham Moore -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/