[PATCH] mtd: Fallback to ->_read/write_oob() when ->_read/write() is missing

Boris Brezillon boris.brezillon at free-electrons.com
Sat Jun 24 13:12:19 PDT 2017


Le Thu, 22 Jun 2017 14:26:06 -0700,
Brian Norris <computersforpeace at gmail.com> a écrit :

> On Sun, Jun 11, 2017 at 10:42:55PM +0200, Boris Brezillon wrote:
> > Some MTD sublayers/drivers are implementing ->_read/write_oob() and
> > providing dummy wrappers for their ->_read/write() implementations.
> > Let the core handle this case instead of duplicating the logic.
> > 
> > Signed-off-by: Boris Brezillon <boris.brezillon at free-electrons.com>
> > ---
> > Note that the goldfish_nand driver (currently in staging) has not been
> > updated because some the ops->len != mtd->writesize check done in
> > goldfish_nand_read/write_oob() prevents us from using this function as
> > a fallback for ->_read/write().
> > 
> > This behavior is buggy anyway, because the core expects drivers
> > implementing ->_read_oob() to support reading more than ->writesize in
> > a single call. Probably something we should fix.  
> 
> Looks OK to me:
> 
> Acked-by: Brian Norris <computersforpeace at gmail.com>
> 
> This touches NAND drivers more than core MTD stuff, so feel free to take
> it in your branch.

Applied to nand/next.



More information about the linux-mtd mailing list