[PATCH] mtd: denali: fix write_oob_data() function

Brian Norris computersforpeace at gmail.com
Fri May 9 19:12:26 PDT 2014


On Thu, Apr 17, 2014 at 07:22:54PM +0900, Masahiro Yamada wrote:
> Since write_oob_data is calling denali_send_pipeline_cmd()
> with access_type=SPARE_ACCESS, this might has no impact.

"Might"? Are you sure? Do you have any test results? I don't want to
change this code based on a whim...

> But calling it with tranfser_spare=false looks weird because
> write_oob_data() is the function for transferring the spare area.
> 
> Signed-off-by: Masahiro Yamada <yamada.m at jp.panasonic.com>
> ---
>  drivers/mtd/nand/denali.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c
> index c07cd57..a55b9d4 100644
> --- a/drivers/mtd/nand/denali.c
> +++ b/drivers/mtd/nand/denali.c
> @@ -841,7 +841,7 @@ static int write_oob_data(struct mtd_info *mtd, uint8_t *buf, int page)
>  
>  	denali->page = page;
>  
> -	if (denali_send_pipeline_cmd(denali, false, false, SPARE_ACCESS,
> +	if (denali_send_pipeline_cmd(denali, false, true, SPARE_ACCESS,
>  							DENALI_WRITE) == PASS) {
>  		write_data_to_flash_mem(denali, buf, mtd->oobsize);
>  

Brian



More information about the linux-mtd mailing list