public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Nand flash: hang after erase
@ 2002-01-24 12:13 Elizabeth Clarke
  2002-01-24 13:23 ` David Woodhouse
  0 siblings, 1 reply; 5+ messages in thread
From: Elizabeth Clarke @ 2002-01-24 12:13 UTC (permalink / raw)
  To: linux-mtd

I'm playing with nandtest on an mtd partition, and found it hangs after
it has erased the first block. Putting in some debug I find that it gets
as far as the schedule call in mtdchar.c mtd_ioctl line 324. Here's a
snapshot:

	/*
	  FIXME: Allow INTERRUPTIBLE. Which means
	  not having the wait_queue head on the stack.
	  
	  If the wq_head is on the stack, and we
	  leave because we got interrupted, then the
	  wq_head is no longer there when the
	  callback routine tries to wake us up.
	*/
	ret = mtd->erase(mtd, erase);
	if (!ret) {
		set_current_state(TASK_UNINTERRUPTIBLE);
		add_wait_queue(&waitq, &wait);
		if (erase->state != MTD_ERASE_DONE &&
		    erase->state != MTD_ERASE_FAILED)
			schedule();
		remove_wait_queue(&waitq, &wait);
		set_current_state(TASK_RUNNING);
			ret = (erase->state == MTD_ERASE_FAILED)?-EIO:0;
	}

Since I'm still on the beginning of the learning curve somewhat I have
no idea what this is trying to achieve, or where to go from here. Ideas,
pointers, please?

Ta,
Beth

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

end of thread, other threads:[~2002-01-24 19:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-01-24 12:13 Nand flash: hang after erase Elizabeth Clarke
2002-01-24 13:23 ` David Woodhouse
2002-01-24 13:47   ` Elizabeth Clarke
2002-01-24 17:35     ` Elizabeth Clarke
2002-01-24 19:13   ` Thomas Gleixner

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