[Yaffs] Use inband-tags , The nandmtd_EraseBlockInNAND shuld…

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
Delete this message
Reply to this message
Author: fs p
Date:  
To: yaffs
Subject: [Yaffs] Use inband-tags , The nandmtd_EraseBlockInNAND shuld change
The error mesage is "nand_erase: Unaligned address";


Change Like this:

 __u32 addr;
 if(dev->inbandTags) {
  addr =
     ((loff_t) blockNumber) * dev->totalBytesPerChunk
  * dev->nChunksPerBlock;
 }
 else {
  addr =
     ((loff_t) blockNumber) * dev->nDataBytesPerChunk
  * dev->nChunksPerBlock;
 }





if(dev->inbandTags){

ei.len = dev->totalBytesPerChunk * dev->nChunksPerBlock;

}
else {
ei.len = dev->nDataBytesPerChunk * dev->nChunksPerBlock;
}



Is there someone else found this problem