From a42ebdd3e9a3382511ba4afebfba1fac23745f4d Mon Sep 17 00:00:00 2001 From: charles Date: Fri, 19 Feb 2010 01:00:14 +0000 Subject: [PATCH] Fix mtdif erasing to work properly for inband tags --- yaffs_mtdif.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yaffs_mtdif.c b/yaffs_mtdif.c index 25d92ed..8532e8c 100644 --- a/yaffs_mtdif.c +++ b/yaffs_mtdif.c @@ -12,7 +12,7 @@ */ const char *yaffs_mtdif_c_version = - "$Id: yaffs_mtdif.c,v 1.23 2010-02-18 01:18:04 charles Exp $"; + "$Id: yaffs_mtdif.c,v 1.24 2010-02-19 01:00:14 charles Exp $"; #include "yportenv.h" @@ -211,7 +211,7 @@ int nandmtd_EraseBlockInNAND(yaffs_Device *dev, int blockNumber) { struct mtd_info *mtd = yaffs_DeviceToContext(dev)->mtd; __u32 addr = - ((loff_t) blockNumber) * dev->nDataBytesPerChunk + ((loff_t) blockNumber) * dev->param.totalBytesPerChunk * dev->param.nChunksPerBlock; struct erase_info ei; @@ -219,7 +219,7 @@ int nandmtd_EraseBlockInNAND(yaffs_Device *dev, int blockNumber) ei.mtd = mtd; ei.addr = addr; - ei.len = dev->nDataBytesPerChunk * dev->param.nChunksPerBlock; + ei.len = dev->param.totalBytesPerChunk * dev->param.nChunksPerBlock; ei.time = 1000; ei.retries = 2; ei.callback = NULL; -- 2.30.2