mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/5] mtd: nand: Allow non page aligned length writes
@ 2020-12-11  8:15 Sascha Hauer
  2020-12-11  8:15 ` [PATCH 2/5] nand: omap: Fix BCH16 read Sascha Hauer
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Sascha Hauer @ 2020-12-11  8:15 UTC (permalink / raw)
  To: Barebox List

When copying images to nand with plain cp it can happen that the length
of the image is not page aligned. Allow misaligned image lengths as we
used to before the last NAND layer update.

Fixes: b6bcd96de5 ("mtd: nand: Update to Linux-5.9")
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/mtd/nand/nand_base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 2c3c0b360f..e190db7308 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -4031,7 +4031,7 @@ static int nand_do_write_ops(struct nand_chip *chip, loff_t to,
 		return 0;
 
 	/* Reject writes, which are not page aligned */
-	if (NOTALIGNED(to) || NOTALIGNED(ops->len)) {
+	if (NOTALIGNED(to)) {
 		pr_notice("%s: attempt to write non page aligned data\n",
 			   __func__);
 		return -EINVAL;
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-12-11  8:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-11  8:15 [PATCH 1/5] mtd: nand: Allow non page aligned length writes Sascha Hauer
2020-12-11  8:15 ` [PATCH 2/5] nand: omap: Fix BCH16 read Sascha Hauer
2020-12-11  8:15 ` [PATCH 3/5] mtd: nand: omap: print error when ELM config failed Sascha Hauer
2020-12-11  8:15 ` [PATCH 4/5] mtd: nand: omap: Bail out when omap_gpmc_eccmode() fails Sascha Hauer
2020-12-11  8:15 ` [PATCH 5/5] mtd: nand: Make write support optional Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox