[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK7LNASmq=N=uzw1pNFH+Cnm35EUFFsVQWQv1=i8k1ECkupSjA@mail.gmail.com>
Date: Tue, 21 Mar 2017 18:07:45 +0900
From: Masahiro Yamada <yamada.masahiro@...ionext.com>
To: Boris Brezillon <boris.brezillon@...e-electrons.com>
Cc: linux-mtd@...ts.infradead.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Marek Vasut <marek.vasut@...il.com>,
Brian Norris <computersforpeace@...il.com>,
Richard Weinberger <richard@....at>,
David Woodhouse <dwmw2@...radead.org>,
Cyrille Pitchen <cyrille.pitchen@...el.com>
Subject: Re: [PATCH] mtd: nand: use .read_oob() instead of .cmdfunc() for bad
block check
Hi Boris,
2017-03-15 16:55 GMT+09:00 Boris Brezillon <boris.brezillon@...e-electrons.com>:
> On Wed, 15 Mar 2017 09:55:13 +0900
> Masahiro Yamada <yamada.masahiro@...ionext.com> wrote:
>
>> Hi Boris,
>>
>> Thanks for your review.
>>
>> 2017-03-15 5:58 GMT+09:00 Boris Brezillon <boris.brezillon@...e-electrons.com>:
>> > On Wed, 15 Mar 2017 02:45:48 +0900
>> > Masahiro Yamada <yamada.masahiro@...ionext.com> wrote:
>> >
>> >> The nand_default_block_markbad() is the default implementation of
>> >> chip->block_markbad(). This is called for marking a block as bad.
>> >> It invokes nand_do_write_oob(), then calls a higher level accessor
>> >> ecc->write_oob().
>> >>
>> >> On the other hand, when reading BBM from the OOB, chip->block_bad()
>> >> is called, and nand_block_bad() is the default implementation. This
>> >> function calls a lower level chip->cmdfunc(). If a driver wants to
>> >> re-use nand_block_bad(), it is required to support NAND_CMD_READOOB
>> >> in its cmdfunc().
I just noticed duplicated efforts for reading BBM.
When creating BBT at initialization, functions are called as follows:
check_create()
create_bbt()
scan_block_fast()
scan_block_fast() calls high-level API mtd_read_oob() to check BBM.
On the other hand, we have nand_block_bad() implemented with lower API.
Perhaps, we can merge them.
So, do you want to align to the scan_block_fast approach
(high level API)?
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists