git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge to Fedora kernel-2.6.18-1.2224_FC5 patched with stable patch-2.6.18.1-vs2.0...
[linux-2.6.git]
/
drivers
/
mtd
/
onenand
/
onenand_bbt.c
diff --git
a/drivers/mtd/onenand/onenand_bbt.c
b/drivers/mtd/onenand/onenand_bbt.c
index
4510d33
..
1b00dac
100644
(file)
--- a/
drivers/mtd/onenand/onenand_bbt.c
+++ b/
drivers/mtd/onenand/onenand_bbt.c
@@
-17,6
+17,9
@@
#include <linux/mtd/onenand.h>
#include <linux/mtd/compatmac.h>
#include <linux/mtd/onenand.h>
#include <linux/mtd/compatmac.h>
+extern int onenand_do_read_oob(struct mtd_info *mtd, loff_t from, size_t len,
+ size_t *retlen, u_char *buf);
+
/**
* check_short_pattern - [GENERIC] check if a pattern is in the buffer
* @param buf the buffer to search
/**
* check_short_pattern - [GENERIC] check if a pattern is in the buffer
* @param buf the buffer to search
@@
-87,13
+90,13
@@
static int create_bbt(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_descr
/* No need to read pages fully,
* just read required OOB bytes */
/* No need to read pages fully,
* just read required OOB bytes */
- ret =
mtd->read_oob(mtd, from + j * mtd->oobblock
+ bd->offs,
- readlen, &retlen, &buf[0]);
+ ret =
onenand_do_read_oob(mtd, from + j * mtd->writesize
+ bd->offs,
+
readlen, &retlen, &buf[0]);
if (ret)
return ret;
if (ret)
return ret;
- if (check_short_pattern(&buf[j * scanlen], scanlen, mtd->
oobblock
, bd)) {
+ if (check_short_pattern(&buf[j * scanlen], scanlen, mtd->
writesize
, bd)) {
bbm->bbt[i >> 3] |= 0x03 << (i & 0x6);
printk(KERN_WARNING "Bad eraseblock %d at 0x%08x\n",
i >> 1, (unsigned int) from);
bbm->bbt[i >> 3] |= 0x03 << (i & 0x6);
printk(KERN_WARNING "Bad eraseblock %d at 0x%08x\n",
i >> 1, (unsigned int) from);