Jonas Wielicki | 3 Aug 2012 15:51
Gravatar

Working on ATA: Less internal state, more asking

Hi all,

I'm (still *sigh*) hunting my SSD issues on iriver (as posted previously
on the list[1][2]). I think it basically reduces to a “have you tried
turning it off and on again” fix, because somehow the SSD seems to get
stuck sometimes, a powercycle can mitigiate that in most of the cases.

BUT, in the course I implemented some ATA parts which might come in
handy with devices which are behaving weirdly, like going to sleep
automatically, namely, I removed the internal rockbox state about the
drive's power management state and added requests to get the current
state instead (using CMD_CHECK_POWER_MODE).

I realize that I'll probably have to keep some of my rockbox kernel
patched to work more or less with that SSD (I really should try to
return it, maybe it's just broken). But some of these changes may give
rockbox advantages when dealing with buggy devices. Here is a summarized
list of changes:

* check the current power mode of the device before using it
* explicitly wake it up, if needed
* two levels of error handling:
  1. do a hard reset
  2. powercycle the IDE bus

I wonder what, if any, of this is appreciated by rockbox so that I can
wrap it up as one or more nice commits for review at gerrit.

best regards,
Jonas Wielicki
(Continue reading)

Jonathan Gordon | 4 Aug 2012 12:31
Picon
Gravatar

Re: Working on ATA: Less internal state, more asking

On 3 August 2012 23:51, Jonas Wielicki <j.wielicki <at> sotecware.net> wrote:
> Hi all,
>
> I'm (still *sigh*) hunting my SSD issues on iriver (as posted previously
> on the list[1][2]). I think it basically reduces to a “have you tried
> turning it off and on again” fix, because somehow the SSD seems to get
> stuck sometimes, a powercycle can mitigiate that in most of the cases.
>
> BUT, in the course I implemented some ATA parts which might come in
> handy with devices which are behaving weirdly, like going to sleep
> automatically, namely, I removed the internal rockbox state about the
> drive's power management state and added requests to get the current
> state instead (using CMD_CHECK_POWER_MODE).
>
> I realize that I'll probably have to keep some of my rockbox kernel
> patched to work more or less with that SSD (I really should try to
> return it, maybe it's just broken). But some of these changes may give
> rockbox advantages when dealing with buggy devices. Here is a summarized
> list of changes:
>
> * check the current power mode of the device before using it
> * explicitly wake it up, if needed
> * two levels of error handling:
>   1. do a hard reset
>   2. powercycle the IDE bus
>
> I wonder what, if any, of this is appreciated by rockbox so that I can
> wrap it up as one or more nice commits for review at gerrit.
>
> best regards,
(Continue reading)

Jonas Wielicki | 11 Aug 2012 16:00
Gravatar

Re: Working on ATA: Less internal state, more asking

On 04.08.2012 12:31, Jonathan Gordon wrote:
> Please put up your patches on gerrit and then we can figure out wether
> or not they are wanted in git (sounds like they are!).
Thank you for your reply. FYI, I finally managed to push the changes to
gerrit:

<http://gerrit.rockbox.org/r/#/c/308/>

cheers,
-- Jonas


Gmane