Commit 2f959949 authored by Miquel Raynal's avatar Miquel Raynal

mtd: rawnand: Fix comments about the use of bufpoi

Clarify these comments which are not very accurate (even wrong in the
read case).
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: default avatarBoris Brezillon <boris.brezillon@collabora.com>
Link: https://lore.kernel.org/linux-mtd/20200507105241.14299-5-miquel.raynal@bootlin.com
parent ce8148d7
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment