[prev in list] [next in list] [prev in thread] [next in thread] 

List:       rockbox
Subject:    Re: Red led dead - this is where it goes wrong!!!
From:       "Mike Holden" <rockbox () mikeholden ! uklinux ! net>
Date:       2003-07-31 16:47:07
Message-ID: 53456.213.106.144.113.1059670027.squirrel () aslan ! floof
[Download RAW message or body]

Björn Stenberg said:
> What is definitely worth trying, however, is to use power mode STANDBY
> instead of SLEEP. It draws a little bit more power, but does not require
> a reset to wake up. Silly of me not to try this before. Here's a patch:
>
> =================================================================== RCS
> file: /cvsroot/rockbox/firmware/drivers/ata.c,v
> retrieving revision 1.82
> diff -u -b -r1.82 ata.c
> --- firmware/drivers/ata.c      28 Apr 2003 12:02:14 -0000      1.82 +++
> firmware/drivers/ata.c      1 May 2003 20:44:58 -0000
> @@ -185,6 +185,7 @@
>                  return -1;
>              }
>          }
> +#ifdef USE_SLEEP
>          else {
>              if (perform_soft_reset()) {
>                  mutex_unlock(&ata_mtx);
> @@ -192,6 +193,7 @@
>                  return -1;
>              }
>          }
> +#endif
>      }
>
>      timeout = current_tick + READ_TIMEOUT;
> @@ -334,6 +336,7 @@
>                  return -1;
>              }
>          }
> +#ifdef USE_SLEEP
>          else {
>              if (perform_soft_reset()) {
>                  mutex_unlock(&ata_mtx);
> @@ -341,6 +344,7 @@
>                  return -1;
>              }
>          }
> +#endif
>      }
>
>      ATA_SELECT = ata_device;
> @@ -490,7 +494,11 @@
>          return -1;
>      }
>
> +#ifdef USE_SLEEP
>      ATA_COMMAND = CMD_SLEEP;
> +#else
> +    ATA_COMMAND = CMD_STANDBY_IMMEDIATE;
> +#endif
>
>      if (!wait_for_rdy())
>      {

Just catching up on some old emails.

I replied to this mail a while ago saying that this patch was a good idea
as it seemed to reduce the number of RLD occurrences, and made it more
likely that the disk would recover from shocks.

I suggested that this patch be implemented, and also suggested that the
timeouts in wait_for_bsy() and wait_for_rdy() in ata.c be reduced from 10
seconds to something like 2 seconds, or even 1 second. When a wait in
these 2 functions succeeds, the wait time is less than 200 ticks (0.2
seconds), so 1 second should be fine.

I'm not 100% sure my post made it to the list, hence posting it again here!

-- 
Mike Holden

Rockbox page: http://www.mikeholden.org/~rockbox


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic