public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Re: [iPAQ] Sleep/resume problems, etc.
       [not found] <01050718392500.02834@dbm.wireless.net>
@ 2001-05-08  7:20 ` David Woodhouse
  2001-05-09  7:50   ` Devin Butterfield
  0 siblings, 1 reply; 2+ messages in thread
From: David Woodhouse @ 2001-05-08  7:20 UTC (permalink / raw)
  To: Devin Butterfield; +Cc: ipaq, linux-mtd

dbutter@wireless.net said:
>  The other more serious problem (which seems to only be related to
> resuming  from deep sleep) is that the entire OS seems to become
> unresponsive  (processes will not run) after a resume and I'll see
> these messages on the  console:

> waiting for chip to be ready timed out in read. WSM status = e0021985
> Error reading node from 0x0030fa84: -5

The power cycle has reset the flash chip into read mode. The driver still 
thinks it's in status mode.

The chip driver's resume function needs to make sure the chip is in a known 
state, rather than assuming it'll still be in the same state it was before 
the sleep.

I'm sure I'd done this before. 

diff -u -r1.72 cfi_cmdset_0001.c
--- cfi_cmdset_0001.c	2001/03/26 13:51:15	1.72
+++ cfi_cmdset_0001.c	2001/05/08 07:19:12
@@ -1582,7 +1582,9 @@
 		spin_lock_bh(chip->mutex);
 		
 		if (chip->state == FL_PM_SUSPENDED) {
-			chip->state = chip->oldstate;
+			/* We need to force it back to a known state. */
+			cfi_write(map, CMD(0xff), cmd_addr);
+			chip->state = FL_READY;
 			wake_up(&chip->wq);
 		}
 


--
dwmw2

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

* Re: [iPAQ] Sleep/resume problems, etc.
  2001-05-08  7:20 ` [iPAQ] Sleep/resume problems, etc David Woodhouse
@ 2001-05-09  7:50   ` Devin Butterfield
  0 siblings, 0 replies; 2+ messages in thread
From: Devin Butterfield @ 2001-05-09  7:50 UTC (permalink / raw)
  To: David Woodhouse; +Cc: ipaq, linux-mtd

> The power cycle has reset the flash chip into read mode. The driver still
> thinks it's in status mode.
>
> The chip driver's resume function needs to make sure the chip is in a known
> state, rather than assuming it'll still be in the same state it was before
> the sleep.
>
> I'm sure I'd done this before.
>
> diff -u -r1.72 cfi_cmdset_0001.c
> --- cfi_cmdset_0001.c	2001/03/26 13:51:15	1.72
> +++ cfi_cmdset_0001.c	2001/05/08 07:19:12
> @@ -1582,7 +1582,9 @@
>  		spin_lock_bh(chip->mutex);
>
>  		if (chip->state == FL_PM_SUSPENDED) {
> -			chip->state = chip->oldstate;
> +			/* We need to force it back to a known state. */
> +			cfi_write(map, CMD(0xff), cmd_addr);
						  ^^^^^^^^
What should cmd_addr be here? It's not defined.
--
Regards, Devin.

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

end of thread, other threads:[~2001-05-09  7:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <01050718392500.02834@dbm.wireless.net>
2001-05-08  7:20 ` [iPAQ] Sleep/resume problems, etc David Woodhouse
2001-05-09  7:50   ` Devin Butterfield

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