X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=yaffs_mtdif.c;h=8532e8cb0e2be59472d55e9d25318f2fa17a433d;hb=111724f0295cd86f0eb18b91af745e6828003bcc;hp=25d92ed6347bf36007767b5d2f3dfe9943eb5af2;hpb=30ab3ff5e311e8e2b488c3f62f30e7450dc6bee9;p=yaffs2.git 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;