[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200217121807.3ac0de4c@collabora.com>
Date: Mon, 17 Feb 2020 12:18:07 +0100
From: Boris Brezillon <boris.brezillon@...labora.com>
To: Schrempf Frieder <frieder.schrempf@...tron.de>
Cc: Boris Brezillon <bbrezillon@...nel.org>,
Jeff Kletsky <git-commits@...ycomm.com>,
liaoweixiong <liaoweixiong@...winnertech.com>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Peter Pan <peterpandong@...ron.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-mtd@...ts.infradead.org" <linux-mtd@...ts.infradead.org>,
"Richard Weinberger" <richard@....at>
Subject: Re: [PATCH 2/3] mtd: spinand: Explicitly use MTD_OPS_RAW to write
the bad block marker to OOB
On Tue, 11 Feb 2020 16:35:43 +0000
Schrempf Frieder <frieder.schrempf@...tron.de> wrote:
> From: Frieder Schrempf <frieder.schrempf@...tron.de>
>
> When writing the bad block marker to the OOB area the access mode
> should be set to MTD_OPS_RAW as it is done for reading the marker.
> Currently this only works because req.mode is initialized to
> MTD_OPS_PLACE_OOB (0) and spinand_write_to_cache_op() checks for
> req.mode != MTD_OPS_AUTO_OOB.
>
> Fix this by explicitly setting req.mode to MTD_OPS_RAW.
>
> Fixes: 7529df465248 ("mtd: nand: Add core infrastructure to support SPI NANDs")
> Signed-off-by: Frieder Schrempf <frieder.schrempf@...tron.de>
Reviewed-by: Boris Brezillon <boris.brezillon@...labora.com>
> ---
> drivers/mtd/nand/spi/core.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c
> index 5d267a67a5f7..925db6269861 100644
> --- a/drivers/mtd/nand/spi/core.c
> +++ b/drivers/mtd/nand/spi/core.c
> @@ -609,6 +609,7 @@ static int spinand_markbad(struct nand_device *nand, const struct nand_pos *pos)
> .ooboffs = 0,
> .ooblen = 2,
> .oobbuf.out = marker,
> + .mode = MTD_OPS_RAW,
> };
> int ret;
>
Powered by blists - more mailing lists