changeset 358:7c3694ed38db

Fix mtdif erasing to work properly for inband tags
author charles <charles>
date Fri, 19 Feb 2010 01:00:14 +0000
parents defe00903f31
children ccdc0d9af0de
files yaffs_mtdif.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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_Devic
 {
 	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_Devic
 
 	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;