Re: [PATCH v2 2/3] mtd: rawnand: Add the nand_chip->write_oob hook

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Boris,

> >  /* Sanitize ONFI strings so we can safely print them */
> > diff --git a/include/linux/mtd/rawnand.h b/include/linux/mtd/rawnand.h
> > index 505c13f7a2ba..7fbbd5d7088f 100644
> > --- a/include/linux/mtd/rawnand.h
> > +++ b/include/linux/mtd/rawnand.h
> > @@ -1021,6 +1021,7 @@ struct nand_legacy {
> >   * @setup_read_retry:	[FLASHSPECIFIC] flash (vendor) specific function for
> >   *			setting the read-retry mode. Mostly needed for MLC NAND.
> >   * @erase:		Raw NAND erase operation.
> > + * @write_oob:		Raw NAND write operation.
> >   * @ecc:		[BOARDSPECIFIC] ECC control structure
> >   * @buf_align:		minimum buffer alignment required by a platform
> >   * @oob_poi:		"poison value buffer," used for laying out OOB data
> > @@ -1092,6 +1093,8 @@ struct nand_chip {
> >  	int (*setup_read_retry)(struct nand_chip *chip, int retry_mode);
> >  	int (*erase)(struct nand_chip *chip, struct erase_info *instr,
> >  		     int allowbbt);
> > +	int (*write_oob)(struct nand_chip *chip, loff_t to,
> > +			 struct mtd_oob_ops *ops);
> >    
> 
> Okay, so I'm not sure duplicating the nand_write_oob() logic is the
> best option here. I'd rather go for a post write_page() hook.
> 
> Note that we probably want a post read_page() hook so we can flag
> pages as written by analyzing what's returned to the caller. That would
> saves us unneeded writes when the page has been read.

Ok, this is done the way you propose.

I will wait more feedback before resending this series. Especially on
the last patch which is crucial.

Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux