Re: Workaround for suspend/resume SD card problems

2008-08-28 Thread Simon Matthews
On Tue, 2008-08-26 at 18:38 +0200, AVee wrote:

 Depending on your usage of the SD card you could also workaround the issue 
 with a few symlinks. When the card is wrongly mounted just add symlinks to 
 the new location of the content of the card in /media/card/. Once you did 
 that /media/card will either contain the contents of the card (before 
 suspend) or valid symlinks to the content of the card (after suspend) which 
 works just as well.

I can't see how this will help if you are booted off the SD card and your
whole file system is on the card. Also this bug/fault is corrupting the
information on the SD card. If it is indeed a bug with the SD card
driver not providing enough SD clock cycles for the card to finish
executing commands it needs to be fixed with modification to the SD card
driver.

My workaround is only providing more clock cycles to the SD card. I
would be interested to know if anyone else has tried it and if it works
for them.

Simon




___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Workaround for suspend/resume SD card problems

2008-08-28 Thread Fox Mulder
Is it possible to execute some script every time the neo comes out from
suspend only once?

I would like to suspend it with a manually script which enables the
sd_idleclk, syncs the sd-card, waits a few seconds and then go to sleep.
But after resume i want to disable sd_idleclk automatically so that the
gps works without problems. And i don't want to do the sd_idleclk
de-/activation trick when starting a gps app.

Fox Mulder wrote:
 Maybe it is possible to get a workaround for this problem until it is
 fixed. When using a custom suspend script we maybe could do this stuff
 manual.
 
 When i would suspend the neo i start a script which first activates the
 sd_idleclk. Than it activates some access to the sd card and after that
 suspend the neo. And after resuming maybe reverse these steps.
 This is quite a workaround, but when it works i'm willing to do this
 until the problem gets fixed. :)
 
 Ciao,
  Rainer
 
 Simon Matthews wrote:
 With my 8G Sandisk SD card, i can reliably fix the problems i have been
 having by turning on the SD clock all the time. To do this type the
 command
 echo 1  /sys/module/glamo_mci/parameters/sd_idleclk
 then do something that will access the SD card before doing a suspend.

 This of course won't do the GPS much good, but i think the real fix
 might be to give the SD card more clock cycles before and after commands
 to give it time to finish executing commands.

 Simon


 ___
 Openmoko community mailing list
 community@lists.openmoko.org
 http://lists.openmoko.org/mailman/listinfo/community

 
 ___
 Openmoko community mailing list
 community@lists.openmoko.org
 http://lists.openmoko.org/mailman/listinfo/community
 

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Workaround for suspend/resume SD card problems

2008-08-28 Thread -stacy
Simon Matthews wrote:

   I
 would be interested to know if anyone else has tried it and if it works
 for them.

Works for me. Two shell scripts:

/etc/apm/suspend.d/00sd_idleclk
which contains


#!/bin/sh

echo 1  /sys/module/glamo_mci/parameters/sd_idleclk

touch /home/root/.profile
sync;sync;sync


and
/etc/apm/resume.d/00sd_idleclk
which contains


#!/bin/sh

echo 0  /sys/module/glamo_mci/parameters/sd_idleclk


with that, suspend and resume works as expected.

-stacy




___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Workaround for suspend/resume SD card problems

2008-08-28 Thread Fox Mulder
That is exactly the thing i was searching for. Scripts that would be
automatically executed before suspend or after resume. :)
Now i will try this and activate suspend support on my neo. Until now i
don't use suspend with my debian system on the sd-card because i don't
want to have problems with the sd-card after resuming.

Ciao,
 Rainer

-stacy wrote:
 Simon Matthews wrote:
 
   I
 would be interested to know if anyone else has tried it and if it works
 for them.
 
 Works for me. Two shell scripts:
 
 /etc/apm/suspend.d/00sd_idleclk
 which contains
 
 
 #!/bin/sh
 
 echo 1  /sys/module/glamo_mci/parameters/sd_idleclk
 
 touch /home/root/.profile
 sync;sync;sync
 
 
 and
 /etc/apm/resume.d/00sd_idleclk
 which contains
 
 
 #!/bin/sh
 
 echo 0  /sys/module/glamo_mci/parameters/sd_idleclk
 
 
 with that, suspend and resume works as expected.
 
 -stacy
 
 
 
 
 ___
 Openmoko community mailing list
 community@lists.openmoko.org
 http://lists.openmoko.org/mailman/listinfo/community
 

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Workaround for suspend/resume SD card problems

2008-08-28 Thread Christian Adams
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

here another workaround i worked out this evening:

first i turned off apmd - when running it prevents system from
suspending - more investigation going on

what's actually running for me is:

mv /usr/bin/apm /usr/bin/apm.o

creating /usr/bin/apm with following content:

- - -  snip 
#!/bin/sh
echo 1  /sys/module/glamo_mci/parameters/sd_idleclk
apm.o ${*}
echo 0  /sys/module/glamo_mci/parameters/sd_idleclk
- - -  snap ---

regards, morlac

Am 25.08.2008 um 17:10 schrieb Simon Matthews:

 With my 8G Sandisk SD card, i can reliably fix the problems i have  
 been
 having by turning on the SD clock all the time. To do this type the
 command
 echo 1  /sys/module/glamo_mci/parameters/sd_idleclk
 then do something that will access the SD card before doing a suspend.

 This of course won't do the GPS much good, but i think the real fix
 might be to give the SD card more clock cycles before and after  
 commands
 to give it time to finish executing commands.

 Simon



- -BEGIN CONTACT BLOCK-
   eMail:   [EMAIL PROTECTED]
   Jabber:  [EMAIL PROTECTED]
- --END CONTACT BLOCK--

- -BEGIN GEEK CODE BLOCK-
Version: 3.1
GCS$/IT;d-;s:;a?;C++(+++);UL;P++(+++);
L++(+++);E---;W++;N(+);o?;K?;!w;!O;!M+;!V;PS(+);PE;
Y+;PGP++;t+(++);5(+)++;X(+);R*;tv-+;b++(+++);DI++;
D++(+++);G(+)++;e;h-()++;r++;y++;
- --END GEEK CODE BLOCK--

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (Darwin)

iD8DBQFItyqqr81gVylJyzERAknuAJ9WKxTsXLYJtchRMFewgdzX+MJXuACfeN0n
yFiutYym/UweTTo3/oRz7gI=
=P9ji
-END PGP SIGNATURE-

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Workaround for suspend/resume SD card problems

2008-08-25 Thread Simon Matthews
With my 8G Sandisk SD card, i can reliably fix the problems i have been
having by turning on the SD clock all the time. To do this type the
command
echo 1  /sys/module/glamo_mci/parameters/sd_idleclk
then do something that will access the SD card before doing a suspend.

This of course won't do the GPS much good, but i think the real fix
might be to give the SD card more clock cycles before and after commands
to give it time to finish executing commands.

Simon


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Workaround for suspend/resume SD card problems

2008-08-25 Thread arne anka
 This of course won't do the GPS much good, but i think the real fix
 might be to give the SD card more clock cycles before and after commands
 to give it time to finish executing commands.

wouldn't it be sensible to turn on the sd clock before suspend and do  
somthing? after resume the clock might be turned off again, so allowing  
gps to work.

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Workaround for suspend/resume SD card problems

2008-08-25 Thread Fox Mulder
Maybe it is possible to get a workaround for this problem until it is
fixed. When using a custom suspend script we maybe could do this stuff
manual.

When i would suspend the neo i start a script which first activates the
sd_idleclk. Than it activates some access to the sd card and after that
suspend the neo. And after resuming maybe reverse these steps.
This is quite a workaround, but when it works i'm willing to do this
until the problem gets fixed. :)

Ciao,
 Rainer

Simon Matthews wrote:
 With my 8G Sandisk SD card, i can reliably fix the problems i have been
 having by turning on the SD clock all the time. To do this type the
 command
 echo 1  /sys/module/glamo_mci/parameters/sd_idleclk
 then do something that will access the SD card before doing a suspend.
 
 This of course won't do the GPS much good, but i think the real fix
 might be to give the SD card more clock cycles before and after commands
 to give it time to finish executing commands.
 
 Simon
 
 
 ___
 Openmoko community mailing list
 community@lists.openmoko.org
 http://lists.openmoko.org/mailman/listinfo/community
 

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community