projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add a workaround preventing libtool from hardcoding library path in shared libs
[openwrt.git]
/
target
/
linux
/
generic-2.6
/
files
/
fs
/
yaffs2
/
yaffs_mtdif1.c
diff --git
a/target/linux/generic-2.6/files/fs/yaffs2/yaffs_mtdif1.c
b/target/linux/generic-2.6/files/fs/yaffs2/yaffs_mtdif1.c
index
2b33c2c
..
ce7174e
100644
(file)
--- a/
target/linux/generic-2.6/files/fs/yaffs2/yaffs_mtdif1.c
+++ b/
target/linux/generic-2.6/files/fs/yaffs2/yaffs_mtdif1.c
@@
-34,9
+34,8
@@
#include "linux/mtd/mtd.h"
/* Don't compile this module if we don't have MTD's mtd_oob_ops interface */
#include "linux/mtd/mtd.h"
/* Don't compile this module if we don't have MTD's mtd_oob_ops interface */
-#if (
MTD_VERSION_CODE > MTD
_VERSION(2,6,17))
+#if (
LINUX_VERSION_CODE > KERNEL
_VERSION(2,6,17))
-const char *yaffs_mtdif1_c_version = "$Id: yaffs_mtdif1.c,v 1.7 2007-12-13 15:35:18 wookey Exp $";
#ifndef CONFIG_YAFFS_9BYTE_TAGS
# define YTAG1_SIZE 8
#ifndef CONFIG_YAFFS_9BYTE_TAGS
# define YTAG1_SIZE 8
@@
-189,7
+188,7
@@
int nandmtd1_ReadChunkWithTagsFromNAND(yaffs_Device *dev,
ops.datbuf = data;
ops.oobbuf = (__u8 *)&pt1;
ops.datbuf = data;
ops.oobbuf = (__u8 *)&pt1;
-#if (
MTD_VERSION_CODE < MTD
_VERSION(2,6,20))
+#if (
LINUX_VERSION_CODE < KERNEL
_VERSION(2,6,20))
/* In MTD 2.6.18 to 2.6.19 nand_base.c:nand_do_read_oob() has a bug;
* help it out with ops.len = ops.ooblen when ops.datbuf == NULL.
*/
/* In MTD 2.6.18 to 2.6.19 nand_base.c:nand_do_read_oob() has a bug;
* help it out with ops.len = ops.ooblen when ops.datbuf == NULL.
*/
@@
-288,7
+287,7
@@
int nandmtd1_MarkNANDBlockBad(struct yaffs_DeviceStruct *dev, int blockNo)
int blocksize = dev->nChunksPerBlock * dev->nDataBytesPerChunk;
int retval;
int blocksize = dev->nChunksPerBlock * dev->nDataBytesPerChunk;
int retval;
- yaffs_trace(YAFFS_TRACE_BAD_BLOCKS, "marking block %d bad
\n
", blockNo);
+ yaffs_trace(YAFFS_TRACE_BAD_BLOCKS, "marking block %d bad", blockNo);
retval = mtd->block_markbad(mtd, (loff_t)blocksize * blockNo);
return (retval) ? YAFFS_FAIL : YAFFS_OK;
retval = mtd->block_markbad(mtd, (loff_t)blocksize * blockNo);
return (retval) ? YAFFS_FAIL : YAFFS_OK;
@@
-327,7
+326,6
@@
int nandmtd1_QueryNANDBlock(struct yaffs_DeviceStruct *dev, int blockNo,
{
struct mtd_info * mtd = dev->genericDevice;
int chunkNo = blockNo * dev->nChunksPerBlock;
{
struct mtd_info * mtd = dev->genericDevice;
int chunkNo = blockNo * dev->nChunksPerBlock;
- loff_t addr = (loff_t)chunkNo * dev->nDataBytesPerChunk;
yaffs_ExtendedTags etags;
int state = YAFFS_BLOCK_STATE_DEAD;
int seqnum = 0;
yaffs_ExtendedTags etags;
int state = YAFFS_BLOCK_STATE_DEAD;
int seqnum = 0;
@@
-341,16
+339,11
@@
int nandmtd1_QueryNANDBlock(struct yaffs_DeviceStruct *dev, int blockNo,
}
retval = nandmtd1_ReadChunkWithTagsFromNAND(dev, chunkNo, NULL, &etags);
}
retval = nandmtd1_ReadChunkWithTagsFromNAND(dev, chunkNo, NULL, &etags);
- etags.blockBad = (mtd->block_isbad)(mtd, addr);
if (etags.blockBad) {
yaffs_trace(YAFFS_TRACE_BAD_BLOCKS,
if (etags.blockBad) {
yaffs_trace(YAFFS_TRACE_BAD_BLOCKS,
- "block %d is marked bad
\n
", blockNo);
+ "block %d is marked bad", blockNo);
state = YAFFS_BLOCK_STATE_DEAD;
}
state = YAFFS_BLOCK_STATE_DEAD;
}
- else if (etags.eccResult != YAFFS_ECC_RESULT_NO_ERROR) {
- /* bad tags, need to look more closely */
- state = YAFFS_BLOCK_STATE_NEEDS_SCANNING;
- }
else if (etags.chunkUsed) {
state = YAFFS_BLOCK_STATE_NEEDS_SCANNING;
seqnum = etags.sequenceNumber;
else if (etags.chunkUsed) {
state = YAFFS_BLOCK_STATE_NEEDS_SCANNING;
seqnum = etags.sequenceNumber;
@@
-366,4
+359,4
@@
int nandmtd1_QueryNANDBlock(struct yaffs_DeviceStruct *dev, int blockNo,
return YAFFS_OK;
}
return YAFFS_OK;
}
-#endif /*
MTD
_VERSION*/
+#endif /*
KERNEL
_VERSION*/
This page took
0.033213 seconds
and
4
git commands to generate.