summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2020-05-07 12:52:32 +0200
committerMiquel Raynal <miquel.raynal@bootlin.com>2020-05-11 09:51:42 +0200
commit2f959949f2149eb0f76aeea8020e8c7865bb0c53 (patch)
treeea8bcab8ad8844bd65c5da94ae78a7001c11fd32 /drivers
parentce8148d7b8f204a18188e3cd7386c8dddbb461a1 (diff)
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: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Link: https://lore.kernel.org/linux-mtd/20200507105241.14299-5-miquel.raynal@bootlin.com
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/nand/raw/nand_base.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c
index 906b8cd94bc4..7dc7889f84b4 100644
--- a/drivers/mtd/nand/raw/nand_base.c
+++ b/drivers/mtd/nand/raw/nand_base.c
@@ -3279,7 +3279,10 @@ read_retry:
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);