Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp4231671pxt; Wed, 11 Aug 2021 00:39:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLovQwUzfbJeFZEwbJf2P8QSy5zvpGtz+9EGAYYPCcGK2XayWe+JxCFGRgKES/7A7xGP7v X-Received: by 2002:a17:906:a24c:: with SMTP id bi12mr2397307ejb.530.1628667590411; Wed, 11 Aug 2021 00:39:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628667590; cv=none; d=google.com; s=arc-20160816; b=IeJkgRRqzWPppq2hHlirDHmez91HhW/LnXZnE17qHNzhHLFOzcXO7pWeMkdrTj7LqA lOjHhb5nE09ndJr4XVojJ25yWOThWVQJV+d3j8UBcUxWvrZ0BsZroBgj6Rvo6bH7HXUl QtXAv9jevv3xCuOghoPAi7ftlq5fd98Ls+Oks1RPXWZ1TCgi/pgirxfcTSAN7qhyghEW 32YMycLAuPHtLPb60WMp8BlmEEYfJumtCvplwLfjXXJrck4d2kl09TmHrozU1qmKmgdI GgAdqYxanJm7qsIX6Vlq9ZX4TYpmwjqhhIk9jcYM8aq1gGmXYW3hKW6iwGTEEplAjmvU BPFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=KY+zRy9hKXyNf5Kmtc6yl/ru0cuaPUULXfigVpYJwxQ=; b=XgQlbBxGqpC6xNfyFP3nD1a8GHdeTNiGvs4bFGsRUcw78H75AWutdvwHee2rtK6ZFp gIOzL0KI4sKRakGZ/crxyXtzMmPSlsZZQo7MZD+ALrzY9luOIL1/CWb3RjMu+03oT6ML 9cKYKcoareHfjT3SvbufjQNWuk+PdDShhqisniAojPlGNqR49QWNe74YoSqSHVoxyCFy uM+DI/3cRej58tJ1/d20raKkNgFDHGQHOU+xMFUPtzUo5qPNkFtdY/SYsyKI2MEKm9Fq YaMDmmf+IqVtzHnCVKvk+zZ7YDGfzm+fdUDpWLd5IjDGAoGnpVbRE+Y7jxk2gKdvkAM5 WEgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@0x0f.com header.s=google header.b="sGY/P6Nt"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r24si25968436ejy.194.2021.08.11.00.39.25; Wed, 11 Aug 2021 00:39:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@0x0f.com header.s=google header.b="sGY/P6Nt"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235239AbhHKHia (ORCPT + 99 others); Wed, 11 Aug 2021 03:38:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233182AbhHKHia (ORCPT ); Wed, 11 Aug 2021 03:38:30 -0400 Received: from mail-qt1-x82a.google.com (mail-qt1-x82a.google.com [IPv6:2607:f8b0:4864:20::82a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B33A8C061765 for ; Wed, 11 Aug 2021 00:38:06 -0700 (PDT) Received: by mail-qt1-x82a.google.com with SMTP id w10so1353076qtj.3 for ; Wed, 11 Aug 2021 00:38:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=0x0f.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KY+zRy9hKXyNf5Kmtc6yl/ru0cuaPUULXfigVpYJwxQ=; b=sGY/P6NtAnbm69Lm7vXOE9Jk/dGMYwJgcyYfv0WSY5iC0Q9bkFcLqQcYBDwR9v+C3Z ee+eEFLvK0ppuCf3J9hBRv1S3lsmUuxTVGCxmvb1EFA7yrX0Gby+gFFT7V0xHKfRlDSg JaiHjzgFMaY2k40bT5RLsOq6wdALAOyM5HICs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KY+zRy9hKXyNf5Kmtc6yl/ru0cuaPUULXfigVpYJwxQ=; b=UMZjSZFuLTapNtCCZBjYhyqmIf7zC4k6JJGOrCVk3/l5SvglMRam09D44XUgyVISdu 58np5K1LBfM8gl08FI1nXAvlIo179Gq9Mt8Ll4J716XpK1SEbUo9QCr+gpMgfbhCEQGW ++WipYd0GSXREMt/4SHWlRUn45eq1hVCxzFaDdF5KyvB3qkbzn2SG2qrmqgoskkxprUz hLYUvdG/FJ1qwkOvpSSWcfZpenKxMRHb8w5tOc3CKvomdoqDJiD1UHsGyURf8n7A5d4A vYQqqJORIyloQXcVG4cfnLC/abiLv0+fmfaOTw6kjnEGRoSaw1vfLIovRD7Mdh1CM061 ovtg== X-Gm-Message-State: AOAM533/MW5RrQsQE9aMDShGSnnT5ZsXH6uKdjCSjHjij8KjvsyDYks4 Jih3VNr+/hxc8XdejAMQJwfWA1WYC9+Um3GTLNN7/0ujiaY= X-Received: by 2002:a05:622a:387:: with SMTP id j7mr29561897qtx.132.1628667485754; Wed, 11 Aug 2021 00:38:05 -0700 (PDT) MIME-Version: 1.0 References: <20210617110842.2358461-1-daniel@0x0f.com> <20210806220242.4b83237d@xps13> In-Reply-To: <20210806220242.4b83237d@xps13> From: Daniel Palmer Date: Wed, 11 Aug 2021 16:37:55 +0900 Message-ID: Subject: Re: [RFC PATCH] mtd: spinand: core: Properly fill the OOB area. To: Miquel Raynal Cc: richard@nod.at, linux-mtd@lists.infradead.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Miquel, On Sat, 7 Aug 2021 at 05:02, Miquel Raynal wrote: > This change looks fine, I'll use spinand->oobbuf instead of databuf + > offset (will update when applying). Thanks for looking at this for me. One thing I was worried about is why the SPI NAND subsystem worked before this change with winbond etc parts. You probably don't remember now but I sent a patch to include support for the longsys foresee parts that have the weird quirk of having no ECC data in the OOB so it's all usable by the user except for the bad block marker and the ECC status bits being next to useless. I found this issue while trying to validate ubi + my ECC status decoding worked. [0] The SPI NAND subsystem in u-boot worked fine as it could create the ubi formatting on the flash and that would survive reboots but any blocks written by Linux would be bad on reboot. When Linux created the ubi format it would work until a reboot as the correct data was cached in memory then u-boot would complain because all of the blocks were marked bad. But winbond parts mounted on the same board, same code etc worked just fine. I guess the OOB is getting fixed somewhere else for other parts. Maybe it only happens on the longsys parts because there is no ECC in OOB? Anyhow I was worried my fix hid some other issue/broke other parts. Cheers, Daniel 0 - https://lore.kernel.org/lkml/20210408174922.55c1149f@xps13/