public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Problems compiling nand.c from cvs
@ 2002-09-04 10:50 John Hall
  2002-09-04 11:21 ` Thomas Gleixner
  0 siblings, 1 reply; 2+ messages in thread
From: John Hall @ 2002-09-04 10:50 UTC (permalink / raw)
  To: Linux MTD list (E-mail); +Cc: tglx

[-- Attachment #1: Type: text/plain, Size: 419 bytes --]

Hi,

I was unable to compile the latest nand.c from cvs (revision 1.30). There were several problems, which I've fixed and it now compiles. I haven't been able to test the code yet, just made it compile. Patch is attached.

Regards,
John Hall


-- 
OptionExist Limited.
The Irwin Centre, Scotland Road, Dry Drayton, Cambridge.
Tel: +44 (0)1954 211244, Fax: +44 (0)1954 211565
http://www.optionexist.co.uk/

[-- Attachment #2: nand.c.patch --]
[-- Type: application/octet-stream, Size: 1018 bytes --]

--- mtd/drivers/mtd/nand/nand.c	Wed Sep  4 11:02:06 2002
+++ working/drivers/mtd/nand/nand.c	Wed Sep  4 11:49:21 2002
@@ -491,10 +491,11 @@
 			if (oob_data[i] != readb (this->IO_ADDR_R)) {
 				DEBUG (MTD_DEBUG_LEVEL0, "nand_write_ecc: " "Failed write verify, page 0x%08x ", page);
 				return -EIO;
+			}
 		}
 	} else {
-		if (eccmode != NAND_ECC_NONE && !col && last == this->oobblock) {
-			int ecc_bytes;
+		if (eccmode != NAND_ECC_NONE && !col && last == mtd->oobblock) {
+			int ecc_bytes = 0;
 
 			switch (this->eccmode) {
 			case NAND_ECC_SOFT:
@@ -504,10 +505,10 @@
 			}
 
 			for (i = 0; i < mtd->oobsize; i++)
-				oob_data = readb (this->IO_ADDR_R);
+				oob_data[i] = readb (this->IO_ADDR_R);
 
 			for (i = 0; i < ecc_bytes; i++) {
-				if (oob_data[oob_config.ecc_pos[i]] != ecc_code[i])) {
+				if (oob_data[oob_config[i]] != ecc_code[i]) {
 					DEBUG (MTD_DEBUG_LEVEL0,
 					       "nand_write_ecc: Failed ECC write "
 				       "verify, page 0x%08x, " "%6i bytes were succesful\n", page, i);

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Problems compiling nand.c from cvs
  2002-09-04 10:50 Problems compiling nand.c from cvs John Hall
@ 2002-09-04 11:21 ` Thomas Gleixner
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Gleixner @ 2002-09-04 11:21 UTC (permalink / raw)
  To: John Hall; +Cc: Linux MTD list (E-mail)

On Wed, 2002-09-04 at 12:50, John Hall wrote:
> Hi,
> 
> I was unable to compile the latest nand.c from cvs (revision 1.30)
Should not only compile, should also work now.

Thanks.

-- 
Thomas 
____________________________________________________
linutronix - competence in embedded & realtime linux
http://www.linutronix.de
mail: tglx@linutronix.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-09-04 11:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-04 10:50 Problems compiling nand.c from cvs John Hall
2002-09-04 11:21 ` Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox