public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Savin Zlobec <savin@epico.si>
Cc: linux-mtd@lists.infradead.org
Subject: Re: [PATCH] AT91RM9200 NAND support
Date: Tue, 20 Jun 2006 17:53:50 +0200	[thread overview]
Message-ID: <1150818830.6780.232.camel@localhost.localdomain> (raw)
In-Reply-To: <449819F1.2010104@epico.si>

Savin,

On Tue, 2006-06-20 at 17:53 +0200, Savin Zlobec wrote:
> >
> The problem is in nand_wait, the function is called (when writting files 
> to jffs2) with
> chip->state=FL_READING and state=FL_WRITING and consequently the waiting
> is terminated instantly (chip->state != state) leaving the chip in busy 
> state.

The problem is the calling code. Doh - where is the brown paperbag ?

Thanks for tracking that down.

	tglx

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 77406fc..0fd1052 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -501,7 +501,6 @@ static void nand_command(struct mtd_info
 	case NAND_CMD_ERASE2:
 	case NAND_CMD_SEQIN:
 	case NAND_CMD_STATUS:
-		chip->cmd_ctrl(mtd, NAND_CMD_NONE, NAND_NCE);
 		return;
 
 	case NAND_CMD_RESET:
@@ -1532,7 +1531,7 @@ static int nand_write(struct mtd_info *m
 	if (!len)
 		return 0;
 
-	nand_get_device(chip, mtd, FL_READING);
+	nand_get_device(chip, mtd, FL_WRITING);
 
 	chip->ops.len = len;
 	chip->ops.datbuf = (uint8_t *)buf;
@@ -1659,7 +1658,7 @@ static int nand_write_oob(struct mtd_inf
 		return -EINVAL;
 	}
 
-	nand_get_device(chip, mtd, FL_READING);
+	nand_get_device(chip, mtd, FL_WRITING);
 
 	switch(ops->mode) {
 	case MTD_OOB_PLACE:

  reply	other threads:[~2006-06-20 15:52 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-20  6:54 [PATCH] AT91RM9200 NAND support Andrew Victor
2006-06-20  7:08 ` Thomas Gleixner
2006-06-20  7:17   ` Andrew Victor
2006-06-20  7:43     ` Savin Zlobec
2006-06-20  8:00       ` Thomas Gleixner
2006-06-20  8:08         ` Thomas Gleixner
2006-06-20  9:07         ` Savin Zlobec
2006-06-20  9:18           ` Thomas Gleixner
2006-06-20 10:49             ` Savin Zlobec
2006-06-20 11:12               ` Thomas Gleixner
2006-06-20 11:42                 ` Savin Zlobec
2006-06-20 11:55                   ` Thomas Gleixner
2006-06-20 12:28                     ` Savin Zlobec
2006-06-20 12:44                       ` Thomas Gleixner
2006-06-20 12:52                         ` Thomas Gleixner
2006-06-20 13:17                           ` Savin Zlobec
2006-06-20 13:01                         ` Savin Zlobec
2006-06-20 13:21                           ` Thomas Gleixner
2006-06-20 13:48                             ` Savin Zlobec
2006-06-20 13:57                               ` Thomas Gleixner
2006-06-20 14:24                                 ` Savin Zlobec
2006-06-20 14:24                                   ` Thomas Gleixner
2006-06-20 14:29                                   ` Thomas Gleixner
2006-06-20 15:53                                     ` Savin Zlobec
2006-06-20 15:53                                       ` Thomas Gleixner [this message]
2006-06-20 16:03                                         ` Savin Zlobec
2006-06-20  9:07   ` David Woodhouse
2006-06-20  9:14     ` Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1150818830.6780.232.camel@localhost.localdomain \
    --to=tglx@linutronix.de \
    --cc=linux-mtd@lists.infradead.org \
    --cc=savin@epico.si \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox