mtd/drivers/mtd/nand nand_base.c,1.141,1.142
lavinen at infradead.org
lavinen at infradead.org
Mon Apr 11 10:16:11 EDT 2005
Update of /home/cvs/mtd/drivers/mtd/nand
In directory phoenix.infradead.org:/tmp/cvs-serv23051
Modified Files:
nand_base.c
Log Message:
Reverting the change from 1.136 to 1.137 (back to static allocation of ecc
arrays) due to stack corruption and ecc errors.
Index: nand_base.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nand/nand_base.c,v
retrieving revision 1.141
retrieving revision 1.142
diff -u -r1.141 -r1.142
--- nand_base.c 6 Apr 2005 20:13:05 -0000 1.141
+++ nand_base.c 11 Apr 2005 14:16:07 -0000 1.142
@@ -855,7 +855,7 @@
u_char *oob_buf, struct nand_oobinfo *oobsel, int cached)
{
int i, status;
- u_char ecc_code[oobsel->eccbytes];
+ u_char ecc_code[32];
int eccmode = oobsel->useecc ? this->eccmode : NAND_ECC_NONE;
int *oob_config = oobsel->eccpos;
int datidx = 0, eccidx = 0, eccsteps = this->eccsteps;
@@ -961,7 +961,7 @@
int i, j, datidx = 0, oobofs = 0, res = -EIO;
int eccsteps = this->eccsteps;
int hweccbytes;
- u_char oobdata[mtd->oobsize];
+ u_char oobdata[64];
hweccbytes = (this->options & NAND_HWECC_SYNDROME) ? (oobsel->eccbytes / eccsteps) : 0;
@@ -1111,8 +1111,8 @@
int read = 0, oob = 0, ecc_status = 0, ecc_failed = 0;
struct nand_chip *this = mtd->priv;
u_char *data_poi, *oob_data = oob_buf;
- u_char ecc_calc[oobsel->eccbytes];
- u_char ecc_code[oobsel->eccbytes];
+ u_char ecc_calc[32];
+ u_char ecc_code[32];
int eccmode, eccsteps;
int *oob_config, datidx;
int blockcheck = (1 << (this->phys_erase_shift - this->page_shift)) - 1;
More information about the linux-mtd-cvs
mailing list