Skip to contentSkip to conversation

nftl: write support is broken

PATCH New [email protected] 1 participant 1 message Aug 18, 2009 1 message not in the archive Memory technology devices (MTD)

lore
Share & tools
lore
#1 lore raw

PATCH 1/1 nftl: write support is broken

In reply to a message not in the archive

Write support is broken in NFTL. Fix it.

Signed-off-by <[email protected]>

---

drivers/mtd/nftlcore.c +1 -1
index fb86cac..665d3eb 100644
@@ -181,7 +181,7 @@ static int nftl_write(struct mtd_info *mtd, loff_t offs, size_t len,
 	int res;
 
 	ops.mode = MTD_OOB_PLACE;
-	ops.ooboffs = offs;
+	ops.ooboffs = offs & (mtd->writesize - 1);
 	ops.ooblen = mtd->oobsize;
 	ops.oobbuf = oob;
 	ops.datbuf = buf;