|
Rockbox mail archiveSubject: Re: Red led dead - this is where it goes wrong!!!Re: Red led dead - this is where it goes wrong!!!
From: Mike Holden <rockbox_at_mikeholden.uklinux.net>
Date: Thu, 31 Jul 2003 17:47:07 +0100 (BST) 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 > _at__at_ -185,6 +185,7 _at__at_ > return -1; > } > } > +#ifdef USE_SLEEP > else { > if (perform_soft_reset()) { > mutex_unlock(&ata_mtx); > _at__at_ -192,6 +193,7 _at__at_ > return -1; > } > } > +#endif > } > > timeout = current_tick + READ_TIMEOUT; > _at__at_ -334,6 +336,7 _at__at_ > return -1; > } > } > +#ifdef USE_SLEEP > else { > if (perform_soft_reset()) { > mutex_unlock(&ata_mtx); > _at__at_ -341,6 +344,7 _at__at_ > return -1; > } > } > +#endif > } > > ATA_SELECT = ata_device; > _at__at_ -490,7 +494,11 _at__at_ > 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/~rockboxReceived on 2003-07-31 Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy |