diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c index 906b8cd94bc4b4b865e87f0dad59210d0703527b..7dc7889f84b4d6ac7c82f317ed17e52a741df76c 100644 --- a/drivers/mtd/nand/raw/nand_base.c +++ b/drivers/mtd/nand/raw/nand_base.c @@ -3279,7 +3279,10 @@ static int nand_do_read_ops(struct nand_chip *chip, loff_t from, break; } - /* Transfer not aligned data */ + /* + * Copy back the data in the initial buffer when reading + * partial pages or when a bounce buffer is required. + */ if (use_bufpoi) { if (!NAND_HAS_SUBPAGE_READ(chip) && !oob && !(mtd->ecc_stats.failed - ecc_failures) && @@ -4074,7 +4077,10 @@ static int nand_do_write_ops(struct nand_chip *chip, loff_t to, else use_bufpoi = 0; - /* Partial page write?, or need to use bounce buffer */ + /* + * Copy the data from the initial buffer when doing partial page + * writes or when a bounce buffer is required. + */ if (use_bufpoi) { pr_debug("%s: using write bounce buffer for buf@%p\n", __func__, buf);